• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Save/Load Ideas. (Could use help here)

Status
Not open for further replies.
Level 12
Joined
Feb 23, 2008
Messages
587
So. I am happy with people in general being able to make 500 tracks.
So every time you set a track it needs to know, if it was Left , Right, Up, Down , Set.
So its a value between 1-5.

If I counted Right there's 70 different key inputs.

Well What if i said when you use save/load mode, every time you press a key for a track, it does it twice. So in other words no sharp corners. That would bring the amount of needed values max down to 250.

Then if we had keys representing 2 values. 5x5. that would take 25 chars of the 70 used. And would bring us down to 125 Max Chars for a code.

That is still a bit too long. I have a way to take a string and put it in the code so then in the game you can load it with out typing it, but you would first have to send me the code, and wait for the next version to have your code in the game. But that way there could be many creative coasters that people could ride, if they didn't feel like building one.

I am still looking into ways to bring the max possible length of the code down.

Even with the max of 125 chars for a code, its likely it would be less, and more likely i could find patterns to make the code at least a little shorter.

I could reduce the amount of tracks to 250, and force the 2 tracks at once method on them. putting it down to 125 (1-5) values, and then / 2 because of different key inputs. would put a max of 65. Perhaps that's the way to go. Any Ideas or feed back on this? Ill clean this up soon and think of other approach soon.
 
It can be reduced converting a pair of characters into one:

11 = A
12 = a
13 = B
14 = b
15 = C
21 = c
22 = D
23 = d
24 = E
25 = e
31 = F
32 = f
33 = G
34 = g
35 = H
41 = h
42 = I
43 = i
44 = J
45 = j
51 = K
52 = k
53 = L
54 = l
55 = M

(I may sound crazy for writing this, lol)

This way you can halve the code and make it more confusing, what is great, so people won't copy them, and won't write scratch made coasters.

But even more...You have the other half of the alphabet available, and also the numbers from 0-9, the special characters, the characters like these: "á, à, ä, â, é, è, ë, ê.....and some polish altered latin letters, turkish ones, and many russion (but not everyone have these in their keyboards, so its not so convenient)
If you make use of these, you can halve your string lenght again:

aa = m
Aa = N
AA = n
ab = N

[...]
meaning that you will get 1/4 of the size.
Well, probably not, I should need to count the characters you would use and figure out how much...
if you cant make it to 1/4, you can make it to 1/3:

111 = A
112 = a
113 = B
114 = b
115 = C
121 = c
122 = D

[...]

325 = !
326 = ?
327 = &

[...]

422 = 1
423 = 2

[...]

This one is pretty possible.
Think about it. It not only will reduce the size, but also make the code be harder to decipher.
 
Level 12
Joined
Feb 23, 2008
Messages
587
Ah, That would help but it would still be too big i think :(

When answering someones Question I thought of this idea.

Question

i love making upside-down roller coasters lol its hard to get rightside up again.

Response

Any suggestions to make that easier?

I have considered having a setting to do chucks of a coaster at a time. Like small loop, mid loop, large loop, go upside down/upside up,wide twist, mid twist, tight twist, 90 degree turn, 45 degree turn, 15 degree turn, go straight small distance, mid distance, and long distance.

By doing it this way users would have about 4-6 options, and each option would have 1-3 ways of changing it, like loop would be (one of 4-6) and (small,mid,large) would be one of the (1-3).

The Plus side of this, would allow users to much more quickly and easily make a coaster (like going from upside down to upside up). Also Save load codes would be do-able using this method. The Bad side of this is the game is much less flexible.

But perhaps i should add the ability to do one or the other. But most likely doing both would cause big problems. As the pre-built one i could make sure everything lines up and getting the ground would be very easy.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,180
Every 2 digets can store 5 coster instructions using a 56 character system if there are 5 instructions. Thus 500 pieces needs 200 losless. 250 (lossy using the double method) uses 100 characters.
With the 250 max lossy approach that would be 50 characters needed.
50 characters should be enterable.

However if you look at it, a lot of instructions are repeated. Thus it may be more efficent to fall down in to multiple instruction sets representing the number of times each button was clicked.
Using this system suddenly you have suddenly a possiability of 60 instructions per character with a 60 long character map. 60/5 allows you a total of 12 numbers allocated to each type of instruction. Each of those numbers represents the number of times an instruction was used. Thus using this method you can get up to 12 steps per character.
Thus lets say the person uses each opperation in steps of 12 only, a fully 500 long track could be stored in a mear 42 characters. The problem with this however is that the code length is pretty proportional to the number of times you change opperation type. With a limate of only 250 though it only needs 21 characters atleast. This method may be more efficent for this type of storage as 2 characters can yield 5 instructions in the other way, while 2 character can yield between 2 and 24 instructions depending on the repetition used. As quite often certain opperations are reptead a lot, this would probably store loslessly a lot more efficently than the other way, resulting in far smaller code sizes. However it will be totally usless if used on a track with an average change rate greater than every 3 steps

However I am thinking of a third possiable method, which combines both of them together to allow for even more space saving by switching between storage types when most efficent to.
 
Level 2
Joined
Jun 11, 2008
Messages
20
What if you just saved the sequence of buttons pressed? That way you wouldnt have to save each value and the coaster could load in the same way it was built. It might be a bit laggy to load, but it would take up a lot less space.
 
Level 12
Joined
Feb 23, 2008
Messages
587
Ya I have. The only issue is what you said before. It would make "Most" codes much shorter. But ya if there was a few approchs depending on how they do it.

I just want the max possible amount to be enter able. But Ya I think this is do able.

I have been trying to find a way to make is super short. And i have a few options but If its been done the way i am thinking before i havent found it. And my concept my not be possible.

Basically taking a HUGE Number. and turning it into a equation. And if needed keep all prime numbers (Or alot of them) in a text file. (assuming i can use that)
I have spent a about 6-8 hours working on a way to bring it back, so far i haven't got it. It may be too hard to code or possible but not end up helping all that much.


But so far yours is the best approach (Besides making another set of controls so they can do alot at once, but eh.. thats alot of work, and I still got alot of stuff to do). I dont think ill be working on the save load for the game at least in the editor for a bit. I still got a bunch of bugs I got to clean out. But hopefuly fairly soon.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,180
Without some form of compression, the character requirements will remain extreeme.

You could always use my variable length method and let players enter codes over multiple lines. Basically what it does is when saving groups the same instruction repeated together to allow for pretty good compression (lots of the same opperation stored efficently). Remember that tracks may not always be 500 pieces long so actual code size may be less.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
You could always make them variable length, and compress patterns; for example, going up five times could become 05, up ten times would be 0A, etc.

This wouldn't work for entirely random tracks, but even assuming anyone is stupid enough to try to save one, you could just implement more than one algorithm.
 
Level 12
Joined
Feb 23, 2008
Messages
587
K Sounds like you guys know the best idea for the bulk of the coasters, and makeing a 2ed one if they decided to build a crazy coaster would solve my only other concerns. This may come soon but likey 3 versions from now.

Next version - Major Bugs Fix
Next version - AI Challange Mode
Next version - Save/Load
 
Status
Not open for further replies.
Top