Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
a Summer night - @6.93
Activity rating: One Star Posts & Arts: 7/1k.beats Random | Recent Posts | Guild Recents
News: ozwomp is requesting your location :ozwomp: [Agree] Guild Events: There are no events!

+  MelonLand Forum
|-+  World Building
| |-+  ❤︎ ∙ World Building
| | |-+  Implementing a save feature scares me


« previous next »
Pages: [1] Print Embed
Author Topic: Implementing a save feature scares me  (Read 2867 times)
MediocreMetastasis
Sr. Member ⚓︎
****
View Profile WWWArt


Wishlist Skelecool: Remnants Please!!!
⛺︎ My Room
Itch.io: My Games

Guild Memberships:
Artifacts:
Joined 2025!
« on: a Summer night » Embed

This isn't a cry for help. I wanted to talk about how scary save features are. You can't just pause the game until the user wants to play the game again (Well I guess you can under extreme circumstances) so you have to find a way to save the current state to the hard drive. How do you do that? Save everything as a variable and write it to a text file.

For example, Half life 2 lets you save the game anywhere. Which means it needs to make the player's,enemies',all physic objects', projectile's position, rotation, velocity, torque, and ai state as well as ammo, current sound playing and it's current playback position all as variables just to write it to a text file.

Logged


Artifact Swap: The fingerSad DoggoNeutral Doggo
candycanearter07
Hero Member ⚓︎
*****
View Profile WWWArt


i like slimes
⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: candycanearter
Itch.io: My Games
RSS: RSS

Guild Memberships:
Artifacts:
Visited on Melon's 10th Anniversary!it's tbhchansey!Goomy, I Choose You!uh oh! a pigeon got in!Artsy Candy Cane
« Reply #1 on: a Summer day » Embed

Pretty much everything IN programming is controlled by a variable... the issue is about saving ENOUGH to disk that you can get close enough to where you were before, and serializing/de serializing everything properly. Also, getting the variables OUT of the game can be frustrating if you have to get through encapsulation...

Logged

new to oldnet be nice
https://status.cafe/users/candycanearter/badge.png https://abslimeware.neocities.org/assets/images/blinkers/penguins.gif

https://abslimeware.neocities.org/assets/images/blinkers/slimebounce.gif https://card.exophase.com/2/0/268504.png?1727352149

https://i.imgur.com/S1cx8ZZ.pnghttps://i.imgur.com/7ntZZGM.pnghttps://i.imgur.com/xKIpW2A.pnghttps://i.imgur.com/YMPbu9R.png

Artifact Swap: buzzystickershoeBlob Creaturecards all the way downCommon Slorg
Melooon
Hero Member ⚓︎
*****
View Profile WWWArt


So many stars!
⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: melon
iMood: Melonking
Itch.io: My Games
RSS: RSS

Guild Memberships:
Artifacts:
Bug!You're a Star!Flinstone VitaminI got robbed by Dan Q on Melonland!Always working hard!Known Apple shill
« Reply #2 on: a Summer day » Embed

I was recently working on a project that I knew would need a save state, but I didn't really plan for it from the start and ended up with too many variables to easily save. I ended up having to write a mini program that saves your general place in the world, and then every time you load a save it basically simulates everything that would have happened up to that point in order to populate all the variables correctly.

It sounds like a silly solution, but as long as the simulated gameplay matches the real gameplay - it works quite well and means the entire save state can be just a single number  :tongue:

Logged


everything lost will be recovered, when you drift into the arms of the undiscovered

Artifact Swap: Red TulipLurby?here comes the bapSmile on, rainbow flower!Plank
MediocreMetastasis
Sr. Member ⚓︎
****
View Profile WWWArt


Wishlist Skelecool: Remnants Please!!!
⛺︎ My Room
Itch.io: My Games

Guild Memberships:
Artifacts:
Joined 2025!
« Reply #3 on: an Autumn night » Embed

every time you load a save it basically simulates everything that would have happened up to that point in order to populate all the variables correctly.
If it works it works. If you can simulate everything that has happened the game must've been simple because I can't see how you can apply that to like a fps or especially a sandbox game.

Logged


Artifact Swap: The fingerSad DoggoNeutral Doggo
Pages: [1] Print Embed 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | Send Feedback | Supporters ♥ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi
@000 MelonLand Editor Recent Edits Tenement Arcade Want to Login or Join ? Forum Art Hub Chat Webring Web Guides Graphics Catalogue Wiki Newsletters Image Stream
Melon's Sites TamaNotchi Textures PixelSea GifyPet MoMG Ozwomp Online Loom Videos Leaky Webring Melonking
Tools Melon Software ArtHub Embed Maker ML Passports
Outlinks Frutiger Aero Forum Onio Club m15o's Web Services 32Bit Cafe iMood Webrings Internet Phone Book HTML Energy Declarations Hackers & Designers
Zap!
Minecraft: Online
Join: craft.melonking.net