Pokemon Purple

A forum where you can announce your awesome project(s).

Moderator: MaxCoderz Staff

tifreak8x
Sir Posts-A-Lot
Posts: 297
Joined: Mon 11 Jul, 2005 4:42 pm
Location: Indiana
Contact:

Post by tifreak8x »

I have decided to change how I store the save data. Thanks to Weregoose, I now have a list to string converter, which will allow me to use Celtic to store the actual data to a program. This will increase the time it takes to save a game, but it cannot be helped.

The lists themselves takes roughly 1300 bytes, while storing the data to a program takes a lil over 600 bytes. There are 30 lists so far, so you can see why I would opt for this. I figure, it will be better to split the data between 3 programs, at least. I might even take it to 4, because I would like to keep all programs below 5kb.

So, now all I have to do is rebuild the New/Continue/Save functions, and I should be ready for the next stage. :)
http://tifreakware.net - Connecting TI communities
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

that is a really evil optimization, floating point numbers are 9 bytes each, why isn't the string 9 or 4,5 times as small? (depending on whether you use 1 or 2 bytes per number)

you could also store the lists as lists (lol) but half the number of entries, store every second entry in the fractional part of every entry before it (divide it by 1000 first or something) since fPart and iPart work on lists the loading should be quite fast.. (a list of 1300 bytes would become ~650 bytes, slightly bigger, but much faster)
If you are serious about saving as a string then it only makes sense to make it 2 bytes per entry..
tifreak8x
Sir Posts-A-Lot
Posts: 297
Joined: Mon 11 Jul, 2005 4:42 pm
Location: Indiana
Contact:

Post by tifreak8x »

I am not saving it as a string. Celtic takes a string, and pastes the contents to a program. So in the end, I have a list in the program, waiting on me. :)
http://tifreakware.net - Connecting TI communities
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

where does that string come from then?

do you just have a program like this:

Code: Select all

{3,5,7,2,6,5,2,43,5,7,2,3,5->LX
in which case a string could be smaller
tifreak8x
Sir Posts-A-Lot
Posts: 297
Joined: Mon 11 Jul, 2005 4:42 pm
Location: Indiana
Contact:

Post by tifreak8x »

The string is just for the input part of Celtic. The routine I have turns the list into a string, and Celtic will go to the program that you want, and paste the contents of that string to the program, on whatever line you want it to be on.

This way, the data will be safer than being left to lists...
http://tifreakware.net - Connecting TI communities
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

do you lock the progams?
(they can be unlocked just as easily, but many people don't know how)
tifreak8x
Sir Posts-A-Lot
Posts: 297
Joined: Mon 11 Jul, 2005 4:42 pm
Location: Indiana
Contact:

Post by tifreak8x »

I don't know if I am going to or not. The lists are not going to be named when stored in the program, so a person will have no idea what they will be dealing with if they tried to mess with the data.

I will probably lock the programs, once the game is closer to being completed (and only God knows when that will be, since this project is one and a half years old now...
http://tifreakware.net - Connecting TI communities
tifreak8x
Sir Posts-A-Lot
Posts: 297
Joined: Mon 11 Jul, 2005 4:42 pm
Location: Indiana
Contact:

Post by tifreak8x »

Save system is going together fairly smoothly. I have the first 8 lists saved into a program, which takes roughly 5k in the program. The lists were normally 13kb, but when sent to the program to be stored, they are only600 bytes, give or take a couple bytes. ;) And this is if they all have 3 digit numbers stored in the list. The smaller the numbers, the less room it will take in the save programs, to be sure.

Once I get the program to save all the lists, and recall them, I will see about setting up an indicator bar of sorts, to show saving and loading progress. This way, the person doesn't think the calc has frozen on them or anything...
http://tifreakware.net - Connecting TI communities
tifreak8x
Sir Posts-A-Lot
Posts: 297
Joined: Mon 11 Jul, 2005 4:42 pm
Location: Indiana
Contact:

Post by tifreak8x »

Update:

I have found and killed a bug that was causing problems in the text display, when it was sped up.

Also, the status bar has been created for the save system, though I sort of forgot to program in the save detection, so, that is what I will be doing tomorrow, to add that in and see what happens. :)
http://tifreakware.net - Connecting TI communities
tifreak8x
Sir Posts-A-Lot
Posts: 297
Joined: Mon 11 Jul, 2005 4:42 pm
Location: Indiana
Contact:

Post by tifreak8x »

Well, save system works fine, the detection system works fine, but the blasted thing won't overwrite a saved game. <.<

Still working at it though...
http://tifreakware.net - Connecting TI communities
User avatar
Halifax
Sir Posts-A-Lot
Posts: 225
Joined: Mon 01 Jan, 2007 10:39 am
Location: Pennsylvania, US

Post by Halifax »

haha well I hope you get it working tifreak
bfr
New Member
Posts: 22
Joined: Sat 02 Sep, 2006 8:39 pm

Post by bfr »

>.> I hope you get this fixed. It seems like an odd error though. Maybe you have code initializing the save data at the beginning of your program or something like that (which would overwrite any previously saved data)...? I don't program in TI-83+ TI-BASIC much though, so I might not really know what I'm talking about....
tifreak8x
Sir Posts-A-Lot
Posts: 297
Joined: Mon 11 Jul, 2005 4:42 pm
Location: Indiana
Contact:

Post by tifreak8x »

the problem was I forgot to set CELTIC to write, once that part was fixed, everything worked fine. :)

Working on the Continue function...
http://tifreakware.net - Connecting TI communities
User avatar
Super Speler
Regular Member
Posts: 113
Joined: Fri 09 Feb, 2007 2:20 am
Location: Alpha Centuri

Post by Super Speler »

Hazaa to progress!
tifreak8x
Sir Posts-A-Lot
Posts: 297
Joined: Mon 11 Jul, 2005 4:42 pm
Location: Indiana
Contact:

Post by tifreak8x »

Well, I have been debating on the saving system, and I became unhappy with it because it took up to 2 minutes to save the data. This is of course, unacceptable.

I now have an idea that I will be implementing, that will hopefully give it more of an original look (ie like the Red/Blue games) where the extra pokemon are stored to the PC boxes. This will allow for 6 pokemon lists at a time, and the rest of their data can be saved to the "PC Boxes" programs. Then the only real save data I will have to contend with would be the events list, the party pokemon data, and the NPC lists. This should also allow for the user to catch more than one of any type, and I hope to have this implemented by this weekend at the latest.
http://tifreakware.net - Connecting TI communities
Post Reply