Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Snapshots in QB64?
#11
I'm a fan of the _MEM idea, provided you know how to read it back.
Tread on those who tread on you

Reply
#12
@40wattstudio

about 

Quote:Recently I've been learning about saving data in games. It seems like most games only save the variables that have changed during the course of gameplay. But with this method you have to specify which variables get saved and that can be an extremely long list to keep track of.
...

the argument is so large with different kind of saving and restoring...and different kind of games
the kind of game has an important influence on the practice of saving and restoring the game status.

Let's talk about a simple example:
Arkanoid: a simple game in which the player must survive destroying the bricks of the level using a bouncig ball.

-the saving data of the game at a first simple stage is simply saving the level to play, the number of lives of player, the score.
So also the restoring is at a first stage simple, you let start the level to play, setting the number of lives of player and his score.

-thinking to do a more complex saving data, we want to save an intermedial stage when the player is solving a level: so we need more information to restore that time-situation than number of lives of player, level playing and his score: we need position of  ball, speed on the 2 dimensions of the ball, direction of the ball,  the same for the racket/starship (position, direction, status) and for all the items of the level (bricks not broken, shot of starship).

------------------------------------------
Pacman: a yellow ball player walks in a labhyrinth eating  foodpoints and powerpoints and avoiding enemies, also in this game there are stages and each level is showed entirely on the screen. 
Also in this game at a first stage of saving and restoring  we need only of level to play, lives of pacman, scores.
If we want to save during the play  and restore a game state during the playing, we need many information about all items (active/inactive, position, speeds , status)

--------------------------------------------
Command & Conquer: you build and make your troups to win a war against IA that has limited resources in an area covered by a fog. 
The screen shows only a portion of the area/map of the battle/mission.
At first stage of saving/restoring we need of all the mission won and the areas conquered, the score/money .
At second stage saving/restoring during the battle we need informations about each item (status, position, movement, speed, behaviour of AI ) .

So at the end it is more simple if you use the path showed by TerryRitchie, while it is interesting the way of Steve... but in that case I thought more a freezed status of the whole application in RAM that only the status of variables in RAM. Moreover in the first case you overwrite the program that is in Ram, while with the second way (_MEMsave only RAM of variables) needs of a secure procedure to overwrite the only RAM of variables of the program.

-----------------------------------------
Thanks for talking of this fashinating aspect of game programming

I'll remember your good tips.
Reply




Users browsing this thread: 1 Guest(s)