Videopac / Odyssey2 forum
December 12, 2019, 04:53:57 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Al lot of attachments from Nov 2011 till april 2012 are damaged. Please ask the original poster to re-upload if you need them.
 
   Home   arcade Help Login Register links videopac.nl  
Pages: 1 2 [3] 4   Go Down
  Print  
Author Topic: Nice Ice 2  (Read 7892 times)
Chris!
Give this man a Jopac!
******
Posts: 1148



WWW
« Reply #30 on: August 17, 2015, 06:25:39 PM »

I played this for a good 30 minutes. 15 on O2EM and 15 on real hardware. Every time, the three objects showed up. I thought on real hardware it didn't once, but I guess I missed a room somehow because I eventually found the missing bag. So when you get a chance, play this and see if all three objects show up for you.
Logged

All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html
Chris!
Give this man a Jopac!
******
Posts: 1148



WWW
« Reply #31 on: August 17, 2015, 11:48:48 PM »

Turns out I didn't fix it after all. Can someone look at my code and tell me what I'm doing wrong? The part I'm having trouble with is the bag and Santa random room getting numbers, which is lines 735-870 in my code. I cleaned up the code erasing multiple blank spaces so it's easier to read. The cane random room getting number is just fine, it's just the bag and Santa numbers I'm having trouble with. Valid room number values are between 1-23 only.
Logged

All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html
Rafael
Pedit5
I take the Videopac and leave the Canoli!
*
Posts: 2502



« Reply #32 on: August 17, 2015, 11:58:50 PM »

I tried it. But for some reason in soem random point the game returns to open screen Huh?
Logged
Chris!
Give this man a Jopac!
******
Posts: 1148



WWW
« Reply #33 on: August 18, 2015, 12:25:38 AM »

I've never had that happen to me. I wonder if it's a Videopac thing or if I just haven't experienced it yet. It would be kind of odd that I haven't if it does that.
Logged

All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html
Chris!
Give this man a Jopac!
******
Posts: 1148



WWW
« Reply #34 on: August 19, 2015, 09:48:34 PM »

It only took two tries to add in a timer, but dozens to make it work right. The timer will stop at ten minutes. Because that's a time limit. I had to move some boundaries around on the screen in order for everything to work correctly. I'm still having a problem with the random functions for the bag and Santa. If you want to help, they're at lines 745-880 in this new, improved code. I figure a redesign of the maze is in order once I get the random function fixed. It's too easy to go from room to room. I need dead ends and stuff. Anyway, here's the code and the latest binary file.
Logged

All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html
Chris!
Give this man a Jopac!
******
Posts: 1148



WWW
« Reply #35 on: August 20, 2015, 05:14:10 AM »

OK, so here is another attempt to fix the bag and Santa not showing up. This involves a new value called "addition" which serves its purpose since I cut the random number getting from 31 down to 15. The addition number is added to the bag and Santa's value (which is now anywhere between 1-15), so since 15+7=22, it fits perfectly in my game, since it has 23 rooms. Here is the code I used:
Code:

mov r1,#addition ; new value to add to the room numbers since they
; only go from 1-15.
mov a,t
anl a,#007h  ; you will only get values from 00 to 07
mov @r1,a


mov r1,#bagroom
mov a,t
anl a,#00fh  ; you will only get values from 00 to 0f
add a,#001h ; add 1 in case it's 0
mov @r1,a

mov r0,#bagroom
mov a,@r0
add a,#007h
mov @r0,a



get_random_places_1
mov r1,#addition
mov a,@r1
mov r6,a

mov r0,#bagroom
movx a,@r0
add a,r6 ; add addition to bag room
movx @r0,a


mov r1,#bagroom
mov a,@r1 ; put bagroom in
mov r6,a ; store in R6

mov r0,#caneroom
mov a,@r0
xrl a,r6 ; compare two digits
jz get_random_places_3

jmp get_random_places_2

get_random_places_3
mov r0,#bagroom
mov a,@r0
add a,#0ffh
mov @r0,a

jmp get_random_places_2


get_random_places_2
mov r0,#0a5h
movx a,@r0
anl a,#00fh ; get santa's value between 1-15
add a,#001h ; add 1 in case it's 0


mov r0,#santaroom
mov @r0,a



mov r1,#addition
mov a,@r1
mov r6,a ; store addition in R6

mov r0,#santaroom
movx a,@r0
add a,r6 ; add the addition
movx @r0,a

get_place_s_0
mov r1,#santaroom
mov a,@r1
mov r6,a ; store in R6

mov r0,#bagroom
mov a,@r0
xrl a,r6 ; if santa and bag room are the same, go to get_place_s_1
jz get_santa_random_2

get_place_s_1
mov r1,#santaroom
mov a,@r1
mov r6,a ; store santa's room info in R6

mov r0,#caneroom
mov a,@r0
xrl a,r6 ; compare santa's room value with cane room's value
jz get_santa_random_22

get_place_s_2
ret

get_santa_random_2
mov r0,#santaroom
mov a,@r0
add a,#0ffh
mov @r0,a ; if santa's room and bag room are the same, subtract 1 from santa's room

mov r0,#santaroom
mov a,@r0
xrl a,#000h
jz santa_random_4 ; if santa's room was subtracted 1 from,
; make sure santa's room number isn't 0.

jmp get_place_s_1

get_santa_random_22
mov r0,#santaroom
mov a,@r0
add a,#0ffh
mov @r0,a

mov r0,#santaroom
mov a,@r0
xrl a,#000h
jz santa_random_4 ; if santa's room was subtracted 1 from,
; make sure santa's room number isn't 0.

jmp get_place_s_2



santa_random_4
mov r0,#santaroom
mov @r0,#23 ; put santa's room as 23 as a last resort.

jmp get_place_s_2
I took out the old comments and put in new ones. Looking at this code, I noticed an error that I just now fixed. On the second to last line I put 023h. That is 35. So I fixed it by omitting the h. (h = hexadecimal. b = binary. nothing = decimal.
So let me know if I did anything wrong.
Logged

All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html
Chris!
Give this man a Jopac!
******
Posts: 1148



WWW
« Reply #36 on: August 20, 2015, 05:41:03 AM »

Forgot to check if bag's room value is 0. If it is, the game will put it in room 22. If Santa's room value is 0, it will put it in 23. Both Santa and the bag's room value cannot be the same value of 22 since if it was, the game would put santa's room value as 21. Or am I wrong somehow? My brain hurts.
Logged

All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html
Chris!
Give this man a Jopac!
******
Posts: 1148



WWW
« Reply #37 on: August 20, 2015, 06:26:21 PM »

I was pretty tired when I posted that code last night. Looking at it with fresh eyes, I saw two things:
#1 - On one occasion, I put "santaroom" instead of "bagroom," that has been fixed.
#2 - I didn't take into account that I had added 1 to the 0-15, so instead of it being from 0-15, it would then be 1-16, not 1-15. Well, thankfully my game has 23 rooms, but I had to look and see if anything was affected by that oversight. It doesn't look like it, as the room being 23 for multiple room values would be checked by the program. So here is the latest ROM. Working on this reminds me that it's like a dreaded math class, with story problem or logic puzzle logic. Again, if you spot anything wrong between lines 746-887 of my code (or if you want to be really adventurous and check the whole thing), let me know.
Logged

All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html
Chris!
Give this man a Jopac!
******
Posts: 1148



WWW
« Reply #38 on: August 21, 2015, 03:14:23 AM »

Using the code from version 13b, I made a new version 14. In this one, there is a finish. Once you get three items, you must go back to the first screen and use the exit to your left. Then your final time will be displayed. You can press ACTION to start a new game.
Logged

All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html
Rafael
Pedit5
I take the Videopac and leave the Canoli!
*
Posts: 2502



« Reply #39 on: August 21, 2015, 04:13:38 AM »

Silly question: Why the game is called Ice NIce 2 and its screen is predominantly hot? Perhaps it would be better to use icy colors and mirror various pines across the screen to make the game more joyful.
Not so silly question: who will be the game's enemies?
Logged
Chris!
Give this man a Jopac!
******
Posts: 1148



WWW
« Reply #40 on: August 21, 2015, 12:37:20 PM »

The game's colors are red and green - for Christmas. But I will change them. Hadn't thought of putting enemies in.How would that work?
Logged

All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html
Rafael
Pedit5
I take the Videopac and leave the Canoli!
*
Posts: 2502



« Reply #41 on: August 22, 2015, 12:13:11 AM »

The game's colors are red and green - for Christmas. But I will change them. Hadn't thought of putting enemies in.How would that work?

There´s a X-mas Jim Carrey´s movie with ghosts. If I´m not wrong there was 3 ghosts. maybe you can use ghosts with 3 diferent colors to represent they.
Some sugestions: Maybe you can put 3 diferent houses somewhere in the maze, so instead to get  all itens and return to start point the player should take each present a different house.
Maybe he could only carry this one at a time?
Maybe if a ghost caught him he would steal the gift and put elsewhere in the maze?
Perhaps, instead of using a timer could start the game on December 1 (DEC 01) and the deadline for delivering the gift would be until the 25th?
Perhaps the day could be divided into day and night (I think this is easy to do)
Well, just some possibilties...
Logged
Chris!
Give this man a Jopac!
******
Posts: 1148



WWW
« Reply #42 on: September 16, 2015, 11:02:21 AM »

I'm trying to make the maze bigger but I can't. The grid ends up being scrambled and I can't tell what's wrong:
Code:
get_a_room_4

mov r0,#room_number
mov @r0,#001h

mov r0,#room_number ; only R0 and R1 can be used as pointers to intram
mov a,@r0




add a,#get_2room_2 & 0ffh - 1
movp a, @a ;get byte
mov r1, a

mov r0,#0e0h
mov r7, #9

get_a_room_5
mov a,r1
movp a,@a ; get byte
movx @r0,a
inc r0
inc r1
djnz r7,get_a_room_5


jmp loop

room23: db 010h,01Eh,002h,01Eh,070h,040h,07Eh,00Bh,008h
room24: db 004h,004h,07Eh,040h,05Ch,054h,074h,004h,004h
room25: db 004h,004h,07Eh,040h,05Ch,054h,074h,004h,004h

get_2room_2:
db  room23 & 0ffh
db  room24 & 0ffh
db  room25 & 0ffh
« Last Edit: September 16, 2015, 11:08:24 AM by Chris! » Logged

All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html
Rene_G7400
Pedit5
I take the Videopac and leave the Canoli!
*
Posts: 2519



WWW
« Reply #43 on: September 17, 2015, 09:41:50 AM »

You've used too many ROM pages, your game is now larger than 2k.
Logged
Chris!
Give this man a Jopac!
******
Posts: 1148



WWW
« Reply #44 on: September 17, 2015, 11:33:13 PM »

But it says I only used 1,700 or so bytes.
Logged

All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html
Pages: 1 2 [3] 4   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!