So I saw that Xeda was working on the same thing, so I thought I'd post my version Razz



It's far from done but still fairly impressive in my opinion ^^
It's a port of the famous game Lights Off, where you swap a cross every time you hit 2nd, and your goal is to, well, get the lights off Razz
Yay, that looks awesome!
Looks like an extremely nice version, but isn't the game called Lights Out? Smile
Link? I might break out my TI-83+ for this instead of my PSP.
benryves wrote:
Looks like an extremely nice version, but isn't the game called Lights Out? Smile
That's what I was thinking too. Very Happy What is this written in, pure z80? Axe? Grammer? If one of the latter two, how big is the executable?
The game is written in Axe and will probably be around 6 to 7 k (with 206 levels.)
leafiness0 wrote:
The game is written in Axe and will probably be around 6 to 7 k (with 206 levels.)

My Lights Out program that I made in TI Basic automatically created random, solvable levels. It's really easy to do that, so I don't see why you would need to store pregenerated levels in your program.
Yeah, every level that's symmetric with repect to the origin is solvable, as well as a few other cases. I just prepackaged levels for continuity's sake. I could easily include a random level generator as well.
leafiness0 wrote:
Yeah, every level that's symmetric with repect to the origin is solvable, as well as a few other cases. I just prepackaged levels for continuity's sake. I could easily include a random level generator as well.
If all your boards are 5x5, and they're symmetric about the origin, that means you need only 9 bits (!) per level packed, call it two bytes, so your program code is 5.5-6.5KB or so. I feel like something that cool could probably be made in pure z80 for much smaller, not to detract of the awesomeness. Smile
Right now I'm compressing every 4 lights into a nibble, so each map is 6 bytes. The extra space I'm using is for a menu, achievement system, and other cool stuff to polish it off ^^
leafiness0 wrote:
Right now I'm compressing every 4 lights into a nibble, so each map is 6 bytes. The extra space I'm using is for a menu, achievement system, and other cool stuff to polish it off ^^
Why a nibble? Does some construct of Axe require that, is there just no good way to do bit-packing in Axe, or is it to leave room for some future parameters on lights?
KermMartian wrote:
leafiness0 wrote:
Right now I'm compressing every 4 lights into a nibble, so each map is 6 bytes. The extra space I'm using is for a menu, achievement system, and other cool stuff to polish it off ^^
Why a nibble? Does some construct of Axe require that, is there just no good way to do bit-packing in Axe, or is it to leave room for some future parameters on lights?


Bit packing in Axe isn't very fun at all, it's at least ten times easier in Assembly; though leafiness, you should try doing it anyways, that could be some pretty great compression if you consider doing it that way.
Afaik, quigibo is planning bit things in some new version.
Ashbad, and I advanced my argument in favor of people using Axe as a stepping-stone to z80 ASM, if anything, rather than a destination. Smile I believe that was its initial intended use? aeTIos, that's good.
KermMartian wrote:
Ashbad, and I advanced our argument in favor of people using Axe as a stepping-stone to z80 ASM, if anything, rather than a destination. Smile I believe that was its initial intended use?


Fix'd that for you.
Thanks Ashbad. Smile I think people just seem to think of it as the correct way to write grayscale games, which I don't think it is; games are either fast and bloated or small and slow. Grayscale in z80 is surprisingly trivial with things like Jim E's Grayscale Package, and there's very little reason not to use things like that.
As for the initial intended use, I don't think it really had one -- it was more of a way for the creator to learn about compilers, I think.
I'm still convinced that Quigibo read the same tutorial as me: http://compilers.iecc.com/crenshaw/ If you follow the timeline of Axe towards the beginning, it follows that tutorial exactly. (Expressions first, basic Input/Output, storing to variables, etc). FWIW, I need to continue working through that; I got a very basic/buggy implementation of expression compiling done in Python, but it was awful to follow. :/
_player1537 wrote:
I'm still convinced that Quigibo read the same tutorial as me: http://compilers.iecc.com/crenshaw/ If you follow the timeline of Axe towards the beginning, it follows that tutorial exactly. (Expressions first, basic Input/Output, storing to variables, etc). FWIW, I need to continue working through that; I got a very basic/buggy implementation of expression compiling done in Python, but it was awful to follow. :/


Nice tutorial, thanks for link Wink if nothing else may be an interesting read for me. I had assumed that Quigibo was perhaps learning compiler theories and practices in college, since he is somewhere like a 2nd-3rd year student in a CS degree, IIRC, and I would think you would learn compilers in a class along the way. Though, it does seem to follow this tutorial pretty straight.

I guess this topic has been severely de-railed, I shall give the control of topic execution back to the OP's game. Any updates on compression? I think that the best idea would be possibly to just forget about packing levels at all and follow Souvik's advice.
The easiest way to randomly generate a level would be to start with a completely black square and pick random locations inside that square. Then, you just invert the small square at that location and the other small squares around it.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement