Comments (6)
@TimelyToga Hey, glad you liked the post. And yea, that seems like a good idea that I hadn't considered. The optimization steps I worked on only dealt with not saving static objects over and over, and that about halved the replay size from 10mb to 5mb per 10s. But it seems like your idea would be something much better to try and maybe then I can get replays to a reasonable size even with this technique. Thanks for the advice!
from blog.
Very well-written post! I enjoyed it a lot and am thankful that you took the time to write it.
I do have a suggestion for maybe reducing the filesize of the files that you make when creating replays. Instead of storing all the state every frame in your ReplayObjects
, I would suggest dividing this load into two different sets. ReplayGameState
and ReplayGameStateUpdate
objects. The first to be essentially a mirror of the objects used in your post, while the second are just the deltas between frames. So when you initialize a new enemy / player / item for use to replay, you store all relevant character data, but in the requisite frames after that, you merely provide the fields that changed since the previous frame. Most likely the entity's x
and y
coordinates will change every frame, but their health and Layer won't necessarily change every frame (in the case of health) or potentially over the duration of the replay (in the case of Layer).
At any rate, thanks again!
from blog.
@adonaac, very good post and very learningful. I was about to suggest something the same enhancement @TimelyToga mentionned. But anyway, very good post, as usual. I am sharing this on #gamedev. Keep it up!
from blog.
Thanks for great articles.
Link is broken: https://github.com/adonaac/ld34
from blog.
I really appreciate you writing this article. There is a lot to think about here. Thank you.
from blog.
Interesting post! Thanks.
I'm working with Lua on Playdate, which is a low powered embedded device. Memory and CPU is a concern. In my game I have a fixed number of objects in each level that mostly stay still, and my system is completely deterministic. I'll look into recording and playing back inputs!
from blog.
Related Issues (20)
- Psychedelics and Finishing Games
- Posting gamedev progress online HOT 1
- Neuroticism in Indie Gamedev HOT 1
- Easy Modes HOT 14
- Hey,
- Making rxi's lite my main text editor HOT 4
- Cancellation-proof automated cyberchains HOT 2
- Personality-led irrational behavior during the coronavirus pandemic HOT 3
- Object Management
- Springs
- Personality Trait Instance Archive
- Arguments on why developers might want to prevent streamers from streaming their game
- New Programming Taxonomies HOT 6
- Substack
- New site
- Borders vs. No Borders
- Game Ideas
- Why 1-based indexing is right for Lua
- Thoughts on making small games
- Why indiedevs shouldn't fear being cancelled
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blog.