Pokemon Purple
Moderator: MaxCoderz Staff
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.
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
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
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..
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..
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
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
where does that string come from then?
do you just have a program like this:
in which case a string could be smaller
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
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...
This way, the data will be safer than being left to lists...
http://tifreakware.net - Connecting TI communities
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
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...
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
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...
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
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.
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
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...
Still working at it though...
http://tifreakware.net - Connecting TI communities
>.> 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....
the problem was I forgot to set CELTIC to write, once that part was fixed, everything worked fine.
Working on the Continue function...
Working on the Continue function...
http://tifreakware.net - Connecting TI communities
- Super Speler
- Regular Member
- Posts: 113
- Joined: Fri 09 Feb, 2007 2:20 am
- Location: Alpha Centuri
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.
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