Page 2 of 2

Re: What am I missing? - Calling RND from assembly.

Posted: Mon Sep 28, 2020 12:48 pm
by dr beep
You need to test before you move the elevator up if on the new position of the elevator your player is.
If so, then move that up too.

Re: What am I missing? - Calling RND from assembly.

Posted: Mon Sep 28, 2020 7:07 pm
by Spinnetti
Thanks.. debugging the elevator. I've got variables for both elevator and player, so rather than do in either move routine, this runs and does a compare on both variables. The player rides up, but stops early. Not sure why yet. When we have this in the can, I want to try my hand at hirez Robotron.

Re: What am I missing? - Calling RND from assembly.

Posted: Mon Jan 18, 2021 7:20 pm
by stefano
the problem with randomization often happens working on emulators when the autoloading features are used or when the emulated computer is reset automatically when a program file is open and "run".
In that case the frame counter will always be at a determined position and RANDOMIZE will initialise the SEED always with the same value.
on a real zx81 with the standard ROM this situation is just impossible.

Re: What am I missing? - Calling RND from assembly.

Posted: Tue Jan 19, 2021 9:25 pm
by Spinnetti
Stefano, thanks, great point! When we are done with it, we'll run it on our real TS1000/TS1500's but sure is a lot easier to develop on modern computer. Even with that constraint we got it working ok now, and can only be more random on the real thing. On to code optimization and arrays....

Thanks!

Re: What am I missing? - Calling RND from assembly.

Posted: Wed Jan 20, 2021 4:42 pm
by stefano
It was an easy guess to me because I'm hitting the same problem again and again when using the emulators.
Everytime the ancient randomization invented by Leor Zolman on his BDS C comes to my mind: his language variant had a funny randomization inside the a function which was just ..waiting for a keypress.
It strikes me for its simplicity, you might, e.g. invoke RND in a similar loop at the startup screen and you'll have it fixed because the SEED would be altered an indefinite number of times.

Re: What am I missing? - Calling RND from assembly.

Posted: Thu Jan 21, 2021 3:44 am
by Spinnetti
I should have thought of a key press... I dynamically define the key functions at startup anyway. I'll file that one away for future use too.

Re: What am I missing? - Calling RND from assembly.

Posted: Thu Mar 11, 2021 3:53 am
by JohnsBargs
Spinnetti wrote: Sun Sep 27, 2020 10:03 pm Thanks!

That 1k Hi rez example is great - game premise is good too!

Next thing I'd like to learn, if ya'll are willing to guide or example is how to do an object array. I'm assuming this is the best way to track multiple objects, and move them?

In our Donkey Kong example (Zonkey Kong as we call it). We've got to spawn, move and remove all the barrels and flaming balls depending on level. Right now we just have a brute force method with 5 sets of variables for location and direction. How would we use an array for those so we can use common functions and just pass pointers to each object?

Game screens are attached. All the rounds work, The player can run and jump, Barrels roll out, the "Princess" dances about and cries for help, the monkey waves his arms and "flames" flicker, and you can knock out the girder keystones in level 4, but having a bit of trouble with the player on the elevators in round 3 and still need to finish up some of the animations. Hard stuff is done, just adding all the fun details since we are "splurging" on 16K. Our original was a single screen and ran on our original TS1000's that we initially developed it on (and hand typed in all the hex!).
Did this ever get finished/released?

Re: What am I missing? - Calling RND from assembly.

Posted: Thu Mar 11, 2021 4:45 am
by Spinnetti
Hi, we are just about done with "Zonkey Kong". Again, nothing special except our learning from it, and we think the game play is pretty good ;) its not an exact copy as we prefer a few things to work differently. it also speeds up with every level you finish so gets pretty frantic after a while. We aren't quick and are are doing finishing touches, and I want to do plenty of code cleanup. We've got some brute force code in there I'd like to replace with better, particularly tracking objects in arrays. All the screens and key bits work, and we've got some of the intro and end screen animations going too. A bit of animation and tweaks is all that's left. Once we've got that polished up, we are going to try our hand at the speccy and the Spectrum Next (still in assembler).