Omnimaga

Calculator Community => TI Calculators => General Calculator Help => Topic started by: AngelFish on March 06, 2011, 02:22:23 am

Title: Good game [and program] design
Post by: AngelFish on March 06, 2011, 02:22:23 am
Good game and program design is actually a very simple thing, but it has to be done carefully to be successful.

Game design


Program design:

Title: Re: Good game [and program] design
Post by: DJ Omnimaga on March 06, 2011, 02:51:06 am
Yeah I agree with that. I hated when I downloaded a 60 KB RPG once, only to realize it has 4 rooms.

Also one thing I can't stress enough: Disable the friggin axises! So many games forces me to manually disable them. Or at least, use a GDB or something to re-enable previous settings once exiting the game.

As for documentation, however, I think moderately large readmes can be ok if you want them to look great, like Axe Parser, but yeah, 500 KB max in most cases should be enough. Also, although if you use .doc, include a txt version of your readme too, for people who don't have OpenOffice or Word.

And yeah debugging is important. One thing I want to point out about missing files: Once you finished your game, do one more backup, then delete every variable/list/strings from the calc (that won't come with the game). Then test the game again for dependencies.

To TI-Nspire BASIC programmers: Please include a README with your game. I noticed none of the BASIC games had one. Most people put the readme in the game, but what about people who wants to know what they are gonna install and the controls before playing?

  • If you're writing any sort of quadratic solver, give up, go home, and please don't release it. Your users will be perfectly content picking from among the other 3000 quadratic solvers. Now, Nth degree polynomial solvers that can find complex roots are another matter...
But what if it got grayscale? D:
Title: Re: Good game [and program] design
Post by: leafy on March 06, 2011, 02:52:16 am
Please. FnOff, then FnOn when you quit the game. (In BASIC)
Title: Re: Good game [and program] design
Post by: Hot_Dog on March 06, 2011, 02:57:13 am
* Don't make the user download a required file.  If a game requires Xlib, include Xlib.  If it requires Celtic III, don't make the user download Celtic III.  "Batteries not included" is not a good option.
Title: Re: Good game [and program] design
Post by: DJ Omnimaga on March 06, 2011, 03:01:36 am
Oh yeah I despise that. It especially sucks when you got no internet at home and are in a hurry to download stuff at school...

Sadly, sometimes it's impossible due to copyrights, though.
Title: Re: Good game [and program] design
Post by: FinaleTI on March 06, 2011, 10:27:24 am
* Don't make the user download a required file.  If a game requires Xlib, include Xlib.  If it requires Celtic III, don't make the user download Celtic III.
This isn't always viable, as Kerm usually doesn't let anyone include DCS in downloads. That said, if you can't include a program, at least provide a direct link, because it makes getting the program so much faster.
Title: Re: Good game [and program] design
Post by: DJ Omnimaga on March 08, 2011, 12:40:35 pm
Yeah that's what I meant. If you can include the file, then do so. Please read the license first, though. With Omnicalc, for example, the entire source must be included. If you can't include the file, then warn in your description at the very beginning that this require an extra file and put the link to it.

Otherwise I hate when I download a software somewhere or even a game, only to be greeted with a "This program could not be ran because something.dll is missing from my computer"
Title: Re: Good game [and program] design
Post by: Freyaday on March 08, 2011, 03:07:37 pm
What about Axe? I know I am ethically obligated to say "This is an Axe Program" and give all due credit to Quigibo, but do I have to include the Axe App/link to it as well?
Title: Re: Good game [and program] design
Post by: Munchor on March 08, 2011, 03:08:36 pm
What about Axe? I know I am ethically obligated to say "This is an Axe Program" and give all due credit to Quigibo, but do I have to include the Axe App/link to it as well?

Nah, you don't, it's actually the Assembly program you distribute.

But you can credit him for creating the language, if you want too, but then again, nobody credits Texas for making TI-Basic.
Title: Re: Good game [and program] design
Post by: Raylin on March 08, 2011, 04:07:04 pm
*Elegantly handle errors.
Title: Re: Good game [and program] design
Post by: AngelFish on March 08, 2011, 04:10:44 pm
Edited in.
Title: Re: Good game [and program] design
Post by: DJ Omnimaga on March 08, 2011, 04:22:37 pm
What about Axe? I know I am ethically obligated to say "This is an Axe Program" and give all due credit to Quigibo, but do I have to include the Axe App/link to it as well?

Nah, you don't, it's actually the Assembly program you distribute.

But you can credit him for creating the language, if you want too, but then again, nobody credits Texas for making TI-Basic.
If you distribute the source too, make sure to specify which version of Axe was used to compile it, and don't be approximative. Some people say Around Axe 0.4.8, but might work with other versions too. It's best to just link to the right version on Omni forums.
Title: Re: Good game [and program] design
Post by: DJ Omnimaga on March 13, 2011, 04:36:15 am
I noticed that in the past year or so, many calc games have ridiculously high difficulty levels. Games must not be too easy, otherwise it gets boring for a lot of people, but the opposite is also true for a lot of people. I understand that many people here got a lot of inspiration from Donut Quest and love this game, but I think people in general, especially puzzle game fans, are going way too overkill on difficulty. You may be extremly good at solving puzzles and have good dexterity and reflexes to play games that requires extremly precise timing, but it doesn't mean it'S the case for everyone. In fact, you may be singling out many more players than you think, and they might even recommend their school friends against downloading your game if they found it unreasonably hard.

I think games must start somewhat easy (not necessarily super easy, but at least medium difficulty. For 1st levels difficulty, you should base yourself on the level difficulty in Super Mario Bros world 1 through 4 or something like that. Then later, increase the difficulty. If it's a puzzle game it's good that the last few levels are extremly hard too.

To sum up, even though you may be able to beat Kaizo Mario hacks easily, it doesn't mean everyone can. So please try to not take Kaizo difficulty as inspiration for your calc games.

As for RPGs, don't start with extremly hard enemies either. I remember playing Lunar for the Playstation 1 and I died 6 times in the first enemy encounter. Don't make it so you have to fight an enemy, go all the way back to the town to buy potions, then back to the dungeon to fight one enemy, hoping you survive, then go back to the town, repeating the process 30 times to level up. Some people like to grind but too much of it can be boring, so it's good to keep the RPG difficulty curve not too steep and not start it too high. Don't make leveling up too fast either, because I remember somebody spent 8 hours leveling up in Chapter 2 of Illusiat 11 once and managed to reach LV 99 there. He had a 15 MHz calc, though.
Title: Re: Good game [and program] design
Post by: jnesselr on March 13, 2011, 12:29:38 pm
Crysis on your Prizm.
Is this a hint at something Qwerty...
Otherwise, nice guide indeed.
Title: Re: Good game [and program] design
Post by: DJ Omnimaga on March 13, 2011, 04:04:08 pm
WHo knows, maybe he'll port Crysis for real one day. O.O
Title: Re: Good game [and program] design
Post by: alberthrocks on March 13, 2011, 05:51:36 pm
Speaking of good design, I'd like to suggest a few things:

* For selecting, use BOTH 2nd and Enter. That way, you don't have any crazy confusion.
* For info screens (like "High score!", etc.) 2nd, Enter, AND Clear. I've ran into games that would seem to use 2nd to continue on, but I end up having to press some other weird button to continue on, almost thinking that I've crashed! :P The same applies to the above suggestion.
* AxesOff and AxesOn is a must, as well as FnOff. For the first part, not everyone turns off their graph axes, nor should you assume that they know how. DO IT! :D For FnOff, no one wants to see a graph of y=x^2 unless you are making a quad solver (in which there are thousands, mind you :P). As for FnOn... beware that it *might* cause a graph to be drawn (if there is one). I'm not too nimble on preventing that, so you're on your own. (You can try my code below though to see if my guessing works!)

For those BASIC programmers out there, here's what I do every time:
Code: [Select]
ClrHome
FnOff
AxesOff
ClrDraw
"You're done! Have fun coding! :)
"(code goes here)
"OK, time to give the user their graph back!
ClrDraw
AxesOn
ClrHome
FnOn
ClrHome
For FnOn, beware that FnOn turns all of the functions on. You may wish to add "1" to the end of FnOn.
The code snipplet above is designed to (hopefully) prevent the user from seeing the graph, and therefore hiding the fact that you're using that place to draw. ;)

As for Axe programmers - although this doesn't apply to you, I've seen some programs that have forgotten to ClrHome and ClrDraw! Unless you do an interesting homescreen transition (I have done and loved that a LOT, but most of the time if it isn't needed, don't do it), you should ClrHome. Finally, ClrDraw might be "corrupted" - some other program may have made a mess in there, or like some shells, leave the screen in the buffer. Erase it! ClrDraw^r is also a must if you use the backbuffer as well.
* Mental tip: never assume that the user will be like you, nor will they be as smart as you! :) All of the above stuff basically follows this rule! :) If you are deviating from the standard keyset, etc., include help inside the game. Give really simple directions, keymaps like "2nd to jump!" and "Clear to exit!". This will ensure wide acceptance and enjoyability of your game! :D
* Mental tip #2: never assume your environment is the same as your target user's environment! This pretty much encompasses everything above, but I thought to mention it if you already haven't realized it.

If there's anything that I've gotten wrong, feel free to correct me. I haven't done any serious BASIC game dev in quite a while... :P (Especially those involving the graph screen!)
I think this topic should be stickied; it would be very useful to new and existing BASIC/Axe devs. :)
Title: Re: Good game [and program] design
Post by: AngelFish on March 13, 2011, 06:37:33 pm
WHo knows, maybe he'll port Crysis for real one day. O.O

Better :P
Title: Re: Good game [and program] design
Post by: DJ Omnimaga on March 13, 2011, 06:41:19 pm
About using both 2nd and ENTER the problem is that sometimes the programmer might be running extremly low in the 8 KB code limit (where every byte matters) and in BASIC speed. Every 0.05 seconds lost on an extra instruction/check/command can matter in long terms.
Title: Re: Good game [and program] design
Post by: Freyaday on March 14, 2011, 02:56:07 pm
Along the lines of users with different environments, also :GridOff. You never know.
Title: Re: Good game [and program] design
Post by: DJ Omnimaga on March 14, 2011, 02:58:00 pm
Yeah true. Personally, if possible, I think it's best, before the game starts, to store the graph settings, then apply appropriate game changes, then once exiting, recall the old settings. The issue with AxeOn is that someone might already have Axe turned OFF so if they're turned ON everytime he quits the game he might be annoyed as much.
Title: Re: Good game [and program] design
Post by: Freyaday on March 14, 2011, 03:07:37 pm
Another thing is to Delvar all the vars generated by the program. I got so freaked out about the mess my cubic solver left behind I wrote a program that Delvars just about all the user vars as cleanup
Title: Re: Good game [and program] design
Post by: aeTIos on March 22, 2011, 02:33:42 pm
One suggestion more, if you use the graph vars: StoreGDB0 (the last, is least used) and afterward RecallGDB0
Title: Re: Good game [and program] design
Post by: DJ Omnimaga on March 22, 2011, 07:34:02 pm
Yeah that's the best solution when in need to turn axises off. Else people get annoyed that their settings are changed. X.x

I tend to not do the delvar thing if I'm running out of RAM, though.
Title: Re: Good game [and program] design
Post by: Freyaday on March 22, 2011, 09:46:05 pm
Wait, I thought Delvar frees up memory. Am I missing something here? Also, for anyone who doesn't know, thanks to a bug in TI-BASIC itself, the following is actually legal code.
Code: [Select]
:DelVar ADelVar BDelvar C
This can be continued ad infinitum until you run out of memory, a very useful misbug that shaves a net byte off the two byte Delvar. Please note that you're not actually truncating DelVar, but the ommission of a newline/: saves an otherwise inevitable byte.
Title: Re: Good game [and program] design
Post by: DJ Omnimaga on March 22, 2011, 10:26:08 pm
I mean during game execution. Sometimes you can't afford taking an extra 30-40 bytes string of Delvars at your program exit. X.x
Title: Re: Good game [and program] design
Post by: Freyaday on March 22, 2011, 11:30:12 pm
Oh. But that's why I keep all my DelVars in their own program.
Title: Re: Good game [and program] design
Post by: DJ Omnimaga on March 22, 2011, 11:59:34 pm
I'm not sure what is the difference. ???
Title: Re: Good game [and program] design
Post by: Freyaday on March 23, 2011, 12:26:47 am
That way, instead of chewing up my memory 50 times by putting a whole bunch of DelVars at the end of each program, I only chew up my memory once by putting them all in one program and having the other programs call it when they end. I also use it at the beginning of each program to set all the vars to 0.
Title: Re: Good game [and program] design
Post by: DJ Omnimaga on March 23, 2011, 12:46:51 am
Well I just put them in one program or at the exit myself.
Title: Re: Good game [and program] design
Post by: z80man on March 23, 2011, 02:34:39 am
The problem with having BASIC programs in multiple files is that if a user accidentally deletes one of the supporting files then the program stops working. It is even worse when BASIC progs require you to download pic variables because those are so easily corrupted by other programs.
Title: Re: Good game [and program] design
Post by: Ikkerens on March 23, 2011, 05:28:08 am
* For selecting, use BOTH 2nd and Enter. That way, you don't have any crazy confusion.
Use this myself too, seconded ^^
For those BASIC programmers out there, here's what I do every time:
Code: [Select]
ClrHome
FnOff
AxesOff
ClrDraw
"You're done! Have fun coding! :)
"(code goes here)
"OK, time to give the user their graph back!
ClrDraw
AxesOn
ClrHome
FnOn
ClrHome
You don't have to set things back by hand, TI-basic has a built in function for that, this is what I use:
My own default basic design, ofcourse, edited differently with every program, but usable everywhere:
Code: (TI-Basic) [Select]
::"My MOS header
:StoreGDB GDB1 (or any other GDB0-9)
:FnOff
:AxesOff
:ClrHome
:ClrDraw
:ZStandard
:RectGC
:CoordOff
:GridOff
:LabelOff
:ExprOff
:Normal
:Fix 0
:Degree
:Func
:Connected
:Simul
:Real
:Full
:"Your code
:RecallGDB GDB1 (again 0-9)
And this basically reverts all the user's options to the settings that were there before.
Again, not all the options are needed, but some might seriously screw up your game.
Title: Re: Good game [and program] design
Post by: Freyaday on March 23, 2011, 11:54:34 am
That's why I keep my programs in groups. That way, if something gets messed up, the user can always restore it, provided, of course, that they didn't delete the group.
Title: Re: Good game [and program] design
Post by: Deep Toaster on March 23, 2011, 12:22:04 pm
That's why I keep my programs in groups. That way, if something gets messed up, the user can always restore it, provided, of course, that they didn't delete the group.

The problem with groups though is that they're by far the most easily corrupted, and the least compatible between different linking software. TI-Connect for Windows, TI-Connect for Mac, and TiLP each use a different filetype for a TI group.

So for groups I suggest keeping them grouped while on your calc but releasing them as separate variables.
Title: Re: Good game [and program] design
Post by: Freyaday on March 23, 2011, 12:28:51 pm
Huh. Why are they so easily corrupted?
Title: Re: Good game [and program] design
Post by: Deep Toaster on March 23, 2011, 12:38:21 pm
In certain conditions (such as when some header in the group happens to sit on the border between two pages, the group can't be ungrouped, giving you either ERR:VERSION, ERR:MEMORY, or ERR:BAD ADDRESS (all of which don't apply). Apparently, it's caused by some bad coding mistakes in the operating system, as thepenguin77 found here (http://ourl.ca/3687/120282). Basically, it's TI's fault.

All the major bugs (and some patches courtesy of the penguin) are listed in this thread (http://ourl.ca/3687).
Title: Re: Good game [and program] design
Post by: DJ Omnimaga on March 24, 2011, 03:54:39 am
Yeah I would advise against using groups. In fact I wonder if some of the typos in my english RPG translations didn't come from group corruption. I remember trying Mana Force 2 years after making it and one of the program gave me an ERR:SYNTAX. In worst cases, you lose an entire program.

Some people use GroupTools, but I heard it wasn't always reliable either. The best thing to do is to backup on a computer.
Title: Re: Good game [and program] design
Post by: Ikkerens on March 24, 2011, 03:55:56 am
I lost my Splut source once due to group corruption, luckily I had a backup on my pc from about 2 weeks ago ^^
Backups will help you win the game.
Title: Re: Good game [and program] design
Post by: DJ Omnimaga on March 24, 2011, 04:02:05 am
Damnit I lost. X.x

But yeah, another thing is that group formats are different between TI linking softwares. A group transfered from the calc to the computer using TI-Graph Link will not work fine if sent back with TI-Connect 1.5 or higher.

Even a TI-Connect 1.2 group will not send fine with TI-Connect 1.5.
Title: Re: Good game [and program] design
Post by: Deep Toaster on March 24, 2011, 07:54:47 pm
Some people use GroupTools, but I heard it wasn't always reliable either. The best thing to do is to backup on a computer.

Yeah, sometimes the group itself is corrupted, so you lose all your data.