Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => Topic started by: _player1537 on July 25, 2010, 10:03:35 pm
-
I got kinda bored one day, with the lack of ideas for programs/games to make, so I started writing stuff in Basic using only the answer variable. I ended up with one (finished) game, boulder dodge (aka ZZZZZ.8xp), and a game I was going to make kinda like elmgon (the engine that is, which isn't quite finished). I haven't really done too many projects lately I've noticed... so here they are ^^
ZZZZZ.8xp - Boulder dodge, use the arrow keys to move, and avoid the "*". It uses the list "ZHIGH" to store the highscore
ZZZZ.8xp - The elmgon "clone"?, use arrow keys to move, up to jump, and press alpha then an arrow key to shoot a laser (Not finished D:). I plan to add more and finish it soon.
ZZZGTMAP.8xp - a major slowdown in my code, checks for a collision for the lasers
ZZZMAPS.8xp - contains the maps for the program
Note: I cheated a little bit in the elmgon "clone", it uses for() loops to initilize variables, but it keeps answer in tact throughout the program ^^. Oh, and I call it an elmgon "clone" because it was just inspired by it, its not meant to cause competition, I was just bored and loved the way you moved around in elmgon.
-
nice.
i think I might make a asteroids answer game tonight and post it here tommorow. :P
-
will it use the graph screen? Oh, and I just remembered a mouse routine I made that only touched answer, I'll upload in a second
-
nah, it'll use the homescreen, and have it scroll up with Disp"
Just out of curiosity, why do you ask?
-
When you said asteroids, I thought of this: http://www.ticalc.org/archives/files/fileinfo/215/21592.html
I may try and asteroids for the graphscreen with only answer, sounds fun ^^ But it will probably be crazy slow
-
Wow, how did I never see that game before?
If you can do that game in basic with a decent speed, whether it uses ans or not, I would request it to be featured. :)
-
I had a much lower res version on my calculator... well maybe not low res, but lower detail. It stayed on my calc forever, but I couldn't find the exact one on ticalc.org :/ Anyways, I can't promise I will work on it tonight (band camp in the morning) but I'll find time ^^
-
I was never good at making games using answer only x.x i never got the hang of it. Good job on all of these!
-
Wow interesting way of coding. Nice to see we can make basic games with minimal var usage :)
I never managed to figure out myself. Anything I tried to do always seemed to overwrite Ans at one point
-
The main problem is with modifying a single value in a list. Using augment( and seq(, despite being the only way to do it, is slow for a large number of values.
I might try my hand at making an interesting game with this method at some point. :)
-
Well, you can't display scores with it anyway, since pause modifies Ans.
-
You can use Disp, followed by a no-argument Pause ;D
-
wait, doesn't that reset it as well?
-
I don't think so... What would it set it to? :P
-
Nice job tanner! As for movement in Elmgon, I was inspired by Harrier Falcon's Metroid Pi. ;D
-
sorry for the necropost :P
The main problem is with modifying a single value in a list. Using augment( and seq(, despite being the only way to do it, is slow for a large number of values.
On mine, I always just updated the entire list at once:
{ans(1),ans(2),ans(3)+(ans(1)=26)-(ans(1)=24)
{ans(1),ans(2)+1,ans(3)
<etc>
Oh, and for displaying scores, I typically use (assuming ans(1) is my getkey position:
Disp <score>
repeat ans(1
{getKey,<rest of the ans(x) statements>
End
Oh, and to set a variable without disrupting answer:
for(B,-500,<value to set (>-500)>:End
And sometimes, for subroutines, or when I don't want to hard code the positions in (might make sense in the example, or for example when using disp or output() statements), I use:
augment(ans,{value(s)
Output(ans(dim(ans)),1,"The Game
Output(ans(dim(ans)-1),3,"You lost!
I can't really think of any other Answer routines, if I do I'll post/edit them in. If you have any, post them :)
(Oh, and for the asteroids game, it was coming along quite nicely :D I think I have it saved in one of my backups somewhere. It ran really quickly (or looked like it ;)) As did my galaxian clone answer program :D)
-
Oh, and to set a variable without disrupting answer:
for(B,-500,<value to set (>-500)>:End
Doesnt For(B,#,#):End Also work to set B to #+1?
-
Yep :)