Page 3 of 4

Re: New Game: Zooming Secretary

Posted: Wed Nov 01, 2017 12:34 am
by D3thAdd3r
Forced it to 0 and all the symptoms you say are reproduced, with Earth 100% of the time. It makes sense the bonus crashes(I assume it doesn't immediately, but after you approach a phone for the second time), since when it teleports a phone it generates random numbers until it gets one that is a different position from it's current one. The first position is hardcoded at table 5, then PRNG rolls 0 so it goes there, then it cannot leave 0 since it can't generate anything but that and it is stuck in a while() trying to get a good value.

So I think it is safe to assume in these cases the PRNG was seeded with 0. Going forward, it seems like it is a reasonable idea for games to not directly use the entropy but instead to add it to some known decent seed. Then at least if it returns 0, things wont unexpectedly get wonky(I never did get this to happen until I forced it to 0).

Then I wonder, if this only happens on hardware for you(or maybe just *that* specific Uzebox), is the internal RC timing for your Uzebox so close that simply not enough entropy is generated? I never did extensive randomness testing on my machines. What happens if you put it in the freezer for a while before playing? :lol:

Re: New Game: Zooming Secretary

Posted: Wed Nov 01, 2017 4:48 am
by uze6666
I will check, but I think a 0 seeded PRNG in the current code will continually output 0, I think you just confirmed that in your post
Yeah, zero is the only value invalid in LFSRs (at least the type used in the Uzebox kernel).
BTW is this on hardware or emulator too?
Been happening my hardware...the oldest I have so far (V1.1 pcb) beside the prototype!

It works most of the time really, but I've had the snag 3 times already..sheer badluck? I don't know the cause of this, but for sure the entropy generator code should be fixed to retry again if it gets zero, well, it can happen!

For most use cases I recon the plain old "accumulator-in-the-start-menu-wait-loop" trick should be good enough. And you'll save a couple bytes of flash too. This thing was really implemented for programs like Buddah where you don't type anything or want a different Uzebox logo everything you boot type of things. Also, it was pretty cool to generate truly random number on an otehrwise deterministic MCU. :P

Re: New Game: Zooming Secretary

Posted: Wed Nov 01, 2017 5:39 am
by D3thAdd3r
Thinking you are right, especially if I don't do an attract mode. If I do an attract mode, if I am honest with myself, I will likely give it minimal effort and just a few demos for which a non-random order wouldn't matter anyway. I'll stick with the simple approach here.

Re: New Game: Zooming Secretary

Posted: Wed Nov 01, 2017 9:00 am
by Jubatian
uze6666 wrote: Wed Nov 01, 2017 4:48 am
I will check, but I think a 0 seeded PRNG in the current code will continually output 0, I think you just confirmed that in your post
Yeah, zero is the only value invalid in LFSRs (at least the type used in the Uzebox kernel).
I have a PRNG which has similar randomness to LFSR's (I did extensive testing on this), and doesn't have this limitation. It is used in FoaD for example: here. A limitation of this PRNG compared to LFSR's is that it is very difficult to find constants for it which allow it to generate a full cycle (all the 65536 possibilities for 16 bits), but I ran a brute force method on this sometime in the past, so now I have a table of all the possible constants for 16 bits. Of course it isn't such a big thing, but sometimes might be useful.

Re: New Game: Zooming Secretary

Posted: Fri Dec 29, 2017 11:52 am
by Jubatian
A few of us came together, and again, I had a real HW Uzebox at hand to play around with. We tried this game, however while it works fine, we found an issue with it: It seems very cumbersome to play it with the real SNES controller as it is quite difficult to align with the ladders. Now at home I am realizing that it works well if you try to push Up / Down along with Left / Right while walking towards a ladder, but due to the geometry of the controller, this isn't something very ergonomic to do with it (in FoaD I assigned look / fire upwards with left shoulder as well for this reason: it is easier to hold down the shoulder button while moving). It would be nice if the ladders had a wider access area.

Re: New Game: Zooming Secretary

Posted: Fri Dec 29, 2017 11:52 pm
by D3thAdd3r
Still need to wrap up a couple loose ends on this one, so I will smooth it out a bit to address that issue. Thinking to just adding a whole extra tile width, since there is no downside to it really. Thank you for the gameplay feedback.

Re: New Game: Zooming Secretary

Posted: Thu Aug 17, 2023 6:38 am
by D3thAdd3r
Added the ladder smoothing Jubatian suggested. If you are pushing up or down, and there is a ladder within a few tiles to the left or right, the secretary automatically moves horizontally towards the ladder(which if you keep holding up/down will automatically climb the ladder once you arrive). Overall, I think this is an improvement, especially for real hardware play.

I actually prefer a keyboard over a joypad for this one especially. Arguably it adds a bit of "slop" to climbing ladders when you reach the floor you intended, but now you didn't let up quick enough, you may have to correct the correction... But it it pretty cool on some stages to climb multiple unaligned ladders just with 1 button. So there are ups and downs to it(oh yeah!).

I might add something where you need to hold a shoulder button for it to happen, or perhaps better a toggle(with confirmation sound). Not sure, probably default this feature should be on, it's more useful than annoying and likely makes it easier to approach this game.

Anyway fixed version working with the modern kernel, and optimized out with compress music is up at: https://github.com/weber21w/uzebox-zooming-secretary
zs-hearts.png
zs-hearts.png (23.51 KiB) Viewed 660 times
ZMSECRTY.uze
(59.41 KiB) Downloaded 55 times

Re: New Game: Zooming Secretary

Posted: Fri Aug 18, 2023 7:48 am
by danboid
Are you going to update/upgrade every Uzebox game?

Re: New Game: Zooming Secretary

Posted: Fri Aug 18, 2023 5:46 pm
by D3thAdd3r
I used to rely on a compiler assumption which ought not be relied upon, but I think few others did? That left my little library halfway unusable.

Often times I would crank ram_tiles at the beginning of development, then back off by 1 until it stopped crashing. The idea is that during the course of development, you get lots of free testing whether it's sustainable or not, so you can be confident it's maxed out to the edge. Frog Feast was at 40, but I noticed an error happening sometimes, not previously?, so I went 39. Stuff like that sure, let me know the game and I'll try.

I do intend to release the kernel options discussed to remove some items by build option(I suspect FF fell victim to this). Specifically Patch Loop and Slide stuff, but there is a bit more I think. Then something like Pacman...with modern techniques, that could fit with the bootloader with the optional extras. I hesitate to start tearing at someones code, the way it is left, I feel, represents state of the art at that point in time. That said, breaking items which need minimal updating should obviously be done for preservation.

Re: New Game: Zooming Secretary

Posted: Tue Sep 12, 2023 12:42 am
by D3thAdd3r
Found a cool site for Retro Game Achievements. Looks like there a several requests for achievement sets on several Uzebox games. An example of their records stuff, with Zooming Secretary for example: https://retroachievements.org/game/24793

Seems pretty cool, they also have some Space Age, Alter Ego, etc. Not all Uzebox games on their have implemented achievements, but maybe someone wants to make some? I could see linking to that in the wiki for a game, it would be a good cooperation with other Retro Game Enthusiasts :ugeek:

Check out the full list for Uzebox:
https://retroachievements.org/gameList.php?c=80