Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Elsewhere on February 13, 2011, 12:19:23 pm
-
Yay, finished my first Axe game!
I didn't know if it warranted a new thread or not but I erred on the side of caution and put it here.
So, anyway, Polarizer! Basically, you try to fill all the squares in, but filling in a square makes it so you can't fill in adjacent squares until you fill in another. Use the arrows to select, 2nd to confirm, and Clear to exit level/menu/game. Beating all the levels might get you something nice! Warning: This game has to be run by either DCS, MOS, or some similar shell to work. The two versions are also slightly different due to TI weirdness. Nothing big, though.
Currently I need help coming up with harder levels because a lot of them are just huge pushovers. Anyone who thinks they came up with a tough one, feel free to share it and I could overwrite one of the filler levels.
So... tell me what you think!
EDIT: Newest version is here (http://ourl.ca/9182/176886)
-
Wow, this looks great! Nice job! I think it should be a stand-alone topic. Would you like me to do that for you? ;)
-
(http://www.omnimaga.org/index.php?action=dlattach;topic=1564.0;attach=6096;image)
Elsewhere, that sure looks cool, I imagine how hard it was to write the algorithm of the game (and the squares) looks quite complex maths to me ;D
-
ztrumpet: Uh, if you want to; that is, if you think it's big enough to warrant one. I haven't a scope of these things.
Scout: Nah, just a lot of tongue-in-cheek For( loops and way too many variables. For later projects I'll have to be more careful, though, as I had a hard time cramming this under 8811 and it was initially supposed to be a small getting-to-know-Axe project.
-
ztrumpet: Uh, if you want to; that is, if you think it's big enough to warrant one. I haven't a scope of these things.
Scout: Nah, just a lot of tongue-in-cheek For( loops and way too many variables. For later projects I'll have to be more careful, though, as I had a hard time cramming this under 8811 and it was initially supposed to be a small getting-to-know-Axe project.
Was it your first Axe program? Or just your first game?
-
for a first project, this most definitely merits it's own thread. i can't say i'm a huge fan of the sprite set, but it's definitely consistent(which is difficult to manage). if you're worried about things being too massive you could always post source and ask people about how to go about optimising.
-
Nice to see a particular thread for it ;D It's quite cool.
-
Scout: Yeah, first program with Axe, but it's not like I'm new to programming or anything.
shmibs: Yeah, it's just my everyday programmer art... enough to get the job done, but just barely :P
So, I'm not planning on adding much except bugfixes and the like because I'm simply out of space... I guess I'll link to the really inefficient source code for anyone who wants to try and optimize it. Just be warned, it's probably really bad.
POLSRC (http://pastebin.com/9KE7Kpnd) (Main thing)
POLINIT (http://pastebin.com/STnkQktj) (Loads sprites and stuff)
-
http://pastebin.com/XzXgSpp4
Some optimizations.
I skipped many obvious ones because I didn't want to double check some things.
This should be at least 200 bytes smaller.
Probably much much smaller ;)
-
This reminds me of that Lights Off game for the iPhone.
Great work!
-
I just noticed on the screen shot you posted it seems like on the levels there was supposed to be grayscale in the background because of the checkerboard pattern. To get the grayscale effect you need to constantly update the buffer by using DispGraphr. This can be done with either a custom interrupt routine or you can place it in the getkey loop in your code.
-
Nah, I think the were meant for just black and white - when the screen's updated they don't flicker back and forth. :)
-
Yeah if it were greyscale the checkerboard would alternate.
-
And the pattern's different for different levels.
-
I don't really get it from the screenshot, but it looks nice. It reminds me of lights-out, but I'll have to try it eventually to figure out how to play.
-
Happybobjr: Thanks! After implementing it, it's about 500 bytes smaller! I'll have to remember that Else!If trick for later.
z80man: It's not grayscale, but I'm planning on doing grayscale on another project, so thanks for the tip!
Anyway, I'm trying to figure out what to do with the extra space! I could either add content or improve upon some preexisting aspect. Or I could even just keep it the way it is and have a smaller game for doing so. Hmm...
-
Do you mean extra space as in free memory? I guess it would be fine if the game remains at its current size, although if it's a Flash APP on its final release it's best to use all the 16384 bytes available. Some people prefer smaller games but large ones aren't necessarily bad (since they generally have more features)
-
I think it's fine to leave it as is. It looks like a great game! ;D
-
Yeah, I guess I'm pretty close to being done, but I'm trying to get some music in there just because. Once I get that figured out, I guess I can finally call it quits on this one.
-
I you're having any trouble, you may want to look at these topics/posts:
http://ourl.ca/4129/100021
http://ourl.ca/6263
Good luck! ;D
-
Hm, but how would I go about getting the .8xvs onto my 84+? There's no GraphLink for 84s I can find anywhere and TI Connect won't accept them. Is there something I'm missing?
-
You could use CalcSys to change the file types if you needed to. :)
-
Strange, normally TI-Connect should accept 8xv files. Maybe they're corrupted?
-
The problem is that MiditoAxe doesn't properly calculate the checksum. Opening them in Wabbit, then exporting them will fix this.
-
Happybobjr: Thanks! After implementing it, it's about 500 bytes smaller! I'll have to remember that Else!If trick for later.
want me to optimise more?
I have never used pastebin before this :P Now i realize that it can save me hours of transfers. :D
-
The problem is that MiditoAxe doesn't properly calculate the checksum. Opening them in Wabbit, then exporting them will fix this.
Oh ok. X.x Maybe Quigibo could fix this eventually?
-
Bah, well I can't find a 3.5 to 2.5mm adapter for my headphones. :P I guess I'll have to wait until I can get one. The exporting with Wabbit seemed to do the trick though, and I could send the files, so I guess it works. In the meantime I guess I can do some work on the actual song.
Happybobjr: Any optimization is good optimization! And it should provide me insight on how to make my files smaller in the future, so it's really helpful.
-
Any reason that with your L= checks, you have L=0 through L=16. and L=18 through L=(big nnumber).
What about L=17?
-
That's the empty level, and all the values are already set as 0 at the start of the LV label, so I didn't need anything for it. Also, I had 3 and 16 or something mixed around in there, but I eventually fixed it in the code.
-
That's the empty level, and all the values are already set as 0 at the start of the LV label, so I didn't need anything for it. Also, I had 3 and 16 or something mixed around in there, but I eventually fixed it in the code.
lol I just fixed that. I did some other optimizations too. But not as big as the first one.
There is quite a decrease in the source code size too :P
-
Okay, haven't been making much headway on the music front. I got it to work on Wabbit but it didn't sound like the song... I'll probably just keep the game as it is with the reduced source code.
Happybobjr: Currently I'm at 8432 bytes, and it seems like a bit of a dream, but could your optimizations push it under 8192? Then I'd just have to release one Asm(-runnable program ;)
-
eh, that looks cool! nice work :D
-
Happybobjr: Currently I'm at 8432 bytes, and it seems like a bit of a dream, but could your optimizations push it under 8192? Then I'd just have to release one Asm(-runnable program ;)
i will try my best.
do you mind posting your current source on pastebin?
-
I can help too with optimizing ;)
-
POLSRC (http://pastebin.com/HWNes3v4)
POLINIT (http://pastebin.com/9xGLAPjV)
Okay, here they are! Note that I haven't changed much besides the implementation of optimizations and a few more backgrounds. Mostly I'd been trying to implement music but I eventually gave up. :-X Also, anyone know of something that takes .8xps and converts them directly into Axe code? Right now I have to manually change everything to make it look nice ::)
-
I think cemetech has something... checking
EDIT: http://www.cemetech.net/projects/basicelite/sourcecoder2.php
EDIT 2: 10 bytes saved here i think http://pastebin.com/8zULvxqg
EDIT 3: Can you give me a list of unused variables?
EDIT 4: Saved 150 bytes so far I think.
EDIT 5: Sorry I think I can only save you 200 of the 240 byes needed.
EDIT 6: Scratch that! I made it! Just need to finish up on it tomorrow.
-
Okay, awesome! I think I used all the variables, however. Ans could always be used for very temporary storage, if it was really necessary. Good work, though! ;D
-
6444 bytes.
Let me know if I messed anything up.
-
NOOO!!!!
I didn't make it in time.
Squidgetx: did you put all the repeated commands into subroutines and reorder the pictures so you could use Sub(SUB,#)
-
It mostly worked, although I'll have to make a few modifications because some aspects didn't work as they should. Also, why did you get rid of all the spaces in the Text( commands? Do extra characters take up a lot of bytes?
-
That's how they showed up in pastebin ??? ...They do take up extra space, but you've got plenty of room, so you can put them back in.
-
Oh, alright. However, I'm experiencing some weird happenings. The saving thing wasn't working so I tried to modify the code but nothing seemed to work, and after running the game my calculator would freeze and I'd have to take out the battery and clear my RAM to get up and running again. I figured it was something with the calculator itself so I reset it but it's still experiencing the same freezes or slowdowns after running the game. Got any ideas, anyone? Also, the bug with saving and probably why my calc keeps resetting almost definitely stems from the game not being able to create the saving appvar and then reading and writing to some unknown place in storage.
The things one will do for optimizations :P
-
There! It was just one small little fix, but it took forever to find. Well, here's the 6407-byte version, and it can be run through Asm(. Thanks for the optimizations, squidgetx and Happybobjr!
About the only difference from the original is the size, so don't expect much to be new.
Finally. (Sigh of relief)
EDIT: There was an 8 where there should have been a 9. Fixed.
-
Finally. (Sigh of relief)
I feel ya. ;) What was the bug?
-
Putting my code on pastebin had an adverse side effect. It gave me "appv" (lowercase letters) instead of the [2nd][8] token. It was really hard to detect (someone else ended up asking me if I used the token, and I told them I had but I checked anyway and therein was the problem).
-
I kinda prefer Pastie.org to share code, although I am not certain it is perfect, because Pastebin changed non-ASCII chars to weird stuff sometimes. SourceCoder also works.