Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Calc84 on November 19, 2007, 12:51:00 pm

Title: V Factor
Post by: Calc84 on November 19, 2007, 12:51:00 pm
Well, this is my very first game I have ever made.  It's not very original, but its the best I can do so far.  Any feedback or improvements would be nice.  Keep in mind that this is my first game!
(its in BASIC)
This is it, so try it out, and let me know how it is.  Read the readme!



Title: V Factor
Post by: trevmeister66 on November 19, 2007, 04:13:00 pm
Pretty good for a first game (beats the heck out of my first game(s)  %)rolleyes2.gif )

Some optimizations:
Teacher key: You eliminate the equations, and just display a number. Itll save you a bit of memory.

I suggest using booleans instead of if's
ex:

your code
c1-->
CODE
ec1If G=25
-1->D
If G=34
1->D
If A=1
1->D
If A=60
-1->D
If G=26
->Dc2
ec2

can be
c1
-->
CODE
ec1-(G=25 or A=60)+(G=34 or A=1)*not(G=26->Dc2
ec2

It is smaller and faster, a win-win.

Also Lbl-Goto's can be memory killers, although I think you did a good job of avoiding this. But to make it faster and, I think, easier, make it one big loop where you have
c1
-->
CODE
ec1Repeat pxl-Test(A,B
...
main game code
...
Endc2
ec2
I think it would end up being smaller and faster (and it's a good habit to avoid Lbl-Goto's whenever you can, which is almost all of the time)

All in all, a very good program to begin with. Now that you have the basic's down, you should try a pure BASIC fully graphical RPG.. jk. But none the less, great job.  :thumbup:google.gif
Title: V Factor
Post by: JonimusPrime on November 19, 2007, 04:21:00 pm
Not bad but is also not very hard Though it looks harder that it is.
Title: V Factor
Post by: simplethinker on November 19, 2007, 04:49:00 pm
It runs nicely, not too fast or not too slow. :thumbup:google.gif (I've never even heard of this game though, so it might be me guessing how this is supposed to be)
It's programmed well, and a lot better than most people's first attempts (especially mine).

Like trevmeister66 said, the biggest improvement you can make is utilizing loops rather than Lbl/Gotos, because the calc actually starts searching for them at the very top of the program, so if you have a large program they will slow it down considerably.  This page http://tibasicdev.wikidot.com/controlflow has a lot of detailed information on looping and program structure, and looking around the rest of the site can be useful for you too :Dbiggrin.gif

One more side note: when you're using disp, you don't have to have each on a separate line, you can separate the strings with commas, like
c1-->
CODE
ec1:Disp "thing1","thing2","thing3"c2
ec2

Now for the fun part, optimizing   :Dbiggrin.gif

[edit] I just tried putting it in warp mode in PTI (super-fast mode in an emulator), and without pressing any buttons I somehow got to level 8 without dying, it was kind of weird (this has nothing to do with the code but it was kind of funny  :lmao:ptdr.gif )
Title: V Factor
Post by: DJ Omnimaga on November 19, 2007, 07:03:00 pm
hmm I will try this asap I am curious about what it is :)smile.gif
Title: V Factor
Post by: Halifax on November 20, 2007, 02:07:00 pm
Yes, I would have liked a little bit more of a description. ;)wink.gif Just to know what it is...,but I guess I will download it and try it out either way, because I too am curious since it seems to have recieved good reviews from others here at Omnimaga.