I made a new file format

  Рет қаралды 137,772

TEMPER

TEMPER

Күн бұрын

Пікірлер: 473
@lunkums
@lunkums 2 жыл бұрын
"You often only think about this late into development" not unless you've been through this problem before!
@ZgavY
@ZgavY 2 жыл бұрын
Nope. I'm making my first game ever (it's been months since I started it), and I thought of it since the beginning. Luckily, since I'm writing it in python, this is much much easier for me. But performance is... I mean it runs at about 160 FPS but I'm quite limited to what I can do
@JetJockey87
@JetJockey87 2 жыл бұрын
@@ZgavY ahahahaha Oh man that was a good one
@TuxraGamer
@TuxraGamer 2 жыл бұрын
@@JetJockey87 imagine seriously writing something on Python
@JustS_js
@JustS_js 2 жыл бұрын
@@TuxraGamer imagine being toxic towards beginners in programming community
@nixellion
@nixellion 2 жыл бұрын
@@TuxraGamer Imagine that the platform you're writing this comment on is extensively using Python. It may not be the best option for game development, or more specifically for games that require performance, but it is one of the most popular languages that is extensively used in professional work in different fields.
@XceptionalBro
@XceptionalBro 2 жыл бұрын
Title: I made a new file format Thumbnail: AMOGUS
@zwatotem
@zwatotem 2 жыл бұрын
I was like 40% likely to click based on the title, but the thumbnail tipped the decision over.
@v0id_d3m0n
@v0id_d3m0n 2 жыл бұрын
Didnt even realise lmao
@nixellion
@nixellion 2 жыл бұрын
Filename: savegame.sus
@ChrisD23
@ChrisD23 2 жыл бұрын
I thought the file format would have something to do with amogus lol
@LoLingVo
@LoLingVo 2 жыл бұрын
.sus file format
@shadamethyst1258
@shadamethyst1258 2 жыл бұрын
About rewriting the parser on every format change: this is where metaprogramming can come into play. I'm incredibly grateful for libraries like serde in rust that abstract away the need to do this by hand, and you're using C++ so doing that there shouldn't be too hard either
@rogo7330
@rogo7330 2 жыл бұрын
Text parsing is easy, especially if you doing your own format and it is simple to parse. I think it's better to write something by your own, and if it's hard to you -- change how you are doing it. I wanted to say this because "grateful libraries" are often to general for your task and you don't control their code, thus you can't tweak it and you are stuck with API that those libraries providing (which is often some state-machine crap that often goes as far as reading files by itself, almost like you don't know how to do it). On the other hand, if library provides functions that can parse array of data (not "file" on your disk) and somehow saving context to another block of memory to be called again when you're need it -- that's great.
@luukvanoijen7082
@luukvanoijen7082 2 жыл бұрын
@@rogo7330 if you are saying this about serde, you clearly havent used it nor understand how it does what it does
@rogo7330
@rogo7330 2 жыл бұрын
@@luukvanoijen7082 yep, didn't used it. Also im not using Rust for anything. Im more like C + shell squad. But if serde works for you - great. It's only tool at the end
@luukvanoijen7082
@luukvanoijen7082 2 жыл бұрын
@@rogo7330 fair enough and agreed
@jearlblah5169
@jearlblah5169 2 жыл бұрын
Serde is flippin awesome. Being able to do #[derrive(Serilization, Deserilization)] is so easy
@therealpeter2267
@therealpeter2267 2 жыл бұрын
"Json's crap" - *invents json with a different syntax*
@temper8281
@temper8281 2 жыл бұрын
It's way better than json. It's much simpler and much easier to parse.
@dealloc
@dealloc 2 жыл бұрын
@@temper8281 well the tradeoffs you have is that every change to the format requires you to maintain and update the parser. JSON already has a spec and there are a plethora of fast implementations already. On top of that, you can pass the JSON into virtually anything that accepts it, to either visualize, transform or search it (i.e. with jq). JSON shouldn't be used for everything, of course, just saying that the format you came up with is simple on the surface, but not in practicality. If your goal was flexibility, even if temporary, then JSON would've been your best bet. But I admire you for just building your own thing. That's the best way to learn :)
@temper8281
@temper8281 2 жыл бұрын
@@dealloc Why would changing the format require me to change the parser? The parser does not change when the arrangement of the file changes. If you mean that the format changes when...the format changes. Well yeah. But that will happen anyway regardless of the format.
@dealloc
@dealloc 2 жыл бұрын
@@temper8281 Format as in adding, removing or altering syntax, types, specification etc. Except for formats like JSON which have been standardized. Unless your format also needs to do marshalling, which doesn't sound like a use-case you have atm.
@temper8281
@temper8281 2 жыл бұрын
@@dealloc Well the format for the file is locked in. The only code I write is to take data structures and load and save them into the file. You'd have to do that for JSON aswell, unless you have some kind of language reflection that can do all of that for you. Something like that is a non-trivial cost
@btarg1
@btarg1 2 жыл бұрын
A full game like Gmod's LIDAR mode is something that I have wanted to see for a while, keep up the good work
@MrMacio484
@MrMacio484 2 жыл бұрын
Gmod's LIDAR mode is based off a game called "Scanner Sombre", so you might want to check that out too.
@theinconceivablerat
@theinconceivablerat 2 жыл бұрын
bruh. Scanner Sombre is a full game, and it came before Gmod's LIDAR mode
@aidentheonion2
@aidentheonion2 2 жыл бұрын
there is a game that inspired LIDAR called Scanner Sombre
@NaviYT
@NaviYT 2 жыл бұрын
I was considering making one but I figured either someone was already heavy into developing a game with this mechanic or Gmod community would hate it.
@MetroTO.
@MetroTO. 2 жыл бұрын
Isn't that the scan game in roblox?
@zebbaukhagen9738
@zebbaukhagen9738 2 жыл бұрын
Some very interesting ambient noise behind you! I thought maybe there would be a psychological horror twist somewhere, but instead I just learned something. It kept me engaged.
@thecwd8919
@thecwd8919 7 ай бұрын
Huh, a bird chirping. I really need to get to bed earlier.
@Templarfreak
@Templarfreak 2 жыл бұрын
"always keep your data as simple as you possibly can" cannot understate this, with doing anything programming-related, not even considering saving and loading for a game, this is an extremely important idea
@temper8281
@temper8281 2 жыл бұрын
Definitely true!
@tam_69420
@tam_69420 7 ай бұрын
ive once heard that bugs ussually arise because they were "smarter" than you at the time of writing them, and the more complicated and the "smarter" you try to code, the smarter these bugs become and the harder they are to debug, keeping eveything simple and dumb yet effective enough to do the job is your best bet with preventing bugs.
@Templarfreak
@Templarfreak 7 ай бұрын
@@tam_69420 this is pretty true from my own experience. it also really helps to code things in 2 very key ways: 1. break things up into as small bit-sized modules as possible where you can easily test each one when you are done writing said modules and so bugs are occurring in decoupled places that dont require you to detangle or disseminate a lot of code at once to narrow your search down. 2. templating, inheritance, and/or composition when used carefully and considerately will help expose bugs more easily and make them easier to test because the deeper into the code a bug is the more places it will be visible and the more ways you can test it.
@dakrazyk_
@dakrazyk_ 2 жыл бұрын
Never trust someone who uses a light theme code editor.
@temper8281
@temper8281 2 жыл бұрын
You shouldn't trust me.
@conabe
@conabe 2 жыл бұрын
I don’t know how to change VS to dark mode, my eyes 😢
@MaxCE
@MaxCE 7 ай бұрын
three lines of tabs too
@Derpalerpa
@Derpalerpa 7 ай бұрын
Nah, me and my homies use whatever 🗿
@stefanoctaviansterea1266
@stefanoctaviansterea1266 7 ай бұрын
and has a #define for main() as MAIN
@Moonlytee
@Moonlytee 2 жыл бұрын
1:35 AMONGUS But in all seriousness, this is was very informative and I'm thankful I stumbled upon this video!
@minineji7050
@minineji7050 2 жыл бұрын
Sus
@camilleon352
@camilleon352 2 жыл бұрын
i loved the combination of eerie sound effects and just so many blinding transitions (i am watching from a dark room)
@temper8281
@temper8281 2 жыл бұрын
It sounds like you hate it! 😁
@dankmemequeen9581
@dankmemequeen9581 2 жыл бұрын
I like the style. The dots make it look satisfying.
@ske2004
@ske2004 2 жыл бұрын
so true about thinking late. a similar thing is when you gotta implement an undo system which needs you to change all the mutations into commands x3
@sr_meia_noite
@sr_meia_noite 2 жыл бұрын
I thought "Well, he's going to create a parser for his structs to know how to read/write in binary format, making it efficient in size, reading and writting" *Proceeds to save information as raw text*
@temper8281
@temper8281 2 жыл бұрын
I'll end up doing both when it ships. If it is worth it.
@valueconomy
@valueconomy 2 жыл бұрын
Cool idea. I think you could have achieved this with a mixture of binary JSON and distributing those graph files, but great job. I normally am not a fan of when people try and invent new formats, but I understand the value in readability. I just think eventually you realize you can use an existing solution and eliminating you needing to maintain some bespoke format spec, parser, etc. Keep it up.
@LOC-Ness
@LOC-Ness 2 жыл бұрын
Uhum, but JSON is crap!
@valueconomy
@valueconomy 2 жыл бұрын
​@@LOC-Ness In a world of infinite potential and endless possibilities you could be right. "JSON is crap!" does not mean anything, so I cannot agree. Do you have a specific reason or experience you can point to? That would be meaningful.
@temper8281
@temper8281 2 жыл бұрын
@@valueconomy JSON is crap though
@sa1t938
@sa1t938 2 жыл бұрын
@@temper8281 depends on what you are using it for. There's a reason its extremely popular
@valueconomy
@valueconomy 2 жыл бұрын
@@temper8281 Thanks
@IzzyMann
@IzzyMann 2 жыл бұрын
19 seconds in i said to myself " this is interesting!" and you now have a new sub! :) keep it up bro!
@temper8281
@temper8281 2 жыл бұрын
Thanks!
@w花b
@w花b 2 жыл бұрын
I was thinking the same and even understood everything until he started deviating from C to C++ stuff.
@mom0367
@mom0367 2 жыл бұрын
This is the most threatening aura I've seen from a video about file formats.
@temper8281
@temper8281 2 жыл бұрын
Be afraid.
@_GhostMiner
@_GhostMiner 2 жыл бұрын
Him: creates a new file format. Me: creates a folder with hundreds of json files to save properties of each level object. We are not the same.
@temper8281
@temper8281 2 жыл бұрын
If it works, it works! Don't let anyone tell you different.
@nope.nope.3704
@nope.nope.3704 2 жыл бұрын
Man invented serialization
@temper8281
@temper8281 2 жыл бұрын
There's more behind the curtain just waiting to be revealed!
@o-manthehuman7867
@o-manthehuman7867 2 жыл бұрын
Just got this randomly recommended. Game looks awesome, can't wait for it to get released!
@temper8281
@temper8281 2 жыл бұрын
Thanks!
@vadiks20032
@vadiks20032 2 жыл бұрын
bro this soundtrack is perfect for programming video. it pretty much shows all the sufferring you've experienced as you were making the code and working on the game
@temper8281
@temper8281 2 жыл бұрын
More suffering is to come. I can assure you of that
@vadiks20032
@vadiks20032 2 жыл бұрын
@@temper8281 the osundtrack must have randomly agonizing screams aswell then
@temper8281
@temper8281 2 жыл бұрын
@@vadiks20032 Yeah it's mostly my screams
@ztgasdf
@ztgasdf 2 жыл бұрын
Wishlisted. Definitely excited for this.
@stgigamovement
@stgigamovement 7 ай бұрын
Speaking from experience, making a decent file format can be long, but BWTC32Key is quite ingenious for what it is.
@ske2004
@ske2004 2 жыл бұрын
this is really cool looking! will you draw the particles that are occluded or drawing particles through walls is intended?
@temper8281
@temper8281 2 жыл бұрын
Good question. At the moment they aren't occluded which is what LIDAR would look like if you did it in real life. But not sure it looks good or not in the game
@bob_kazamakis
@bob_kazamakis 2 жыл бұрын
This guy should meet the other guy on KZbin that created reflection in C++ for this purpose
@temper8281
@temper8281 2 жыл бұрын
I watched that and that guy is crazy! :D
@birdbeakbeardneck3617
@birdbeakbeardneck3617 2 жыл бұрын
lmso jhd
@jvcrules
@jvcrules 7 ай бұрын
"Also, we do everything from scratch here so lets roll out own". Subscribed when i heard this
@mario64thane
@mario64thane 2 жыл бұрын
Man's turning LIDAR into a full game!
@ares106
@ares106 2 жыл бұрын
I wouldn’t underestimate content and level design. I feel like that’s where a lot of indies fall short. They have a cool and interesting core gameplay loop but it’s hard for one or a few developers to scale it up into a full game experience by creating enough compelling content.
@Adam-pk7go
@Adam-pk7go 2 жыл бұрын
This is sort of what I’ve seen too. Lot’s of people have great concepts for games, and they just start making stuff, not really planning much in the way of minute to minute gameplay, then once they get there, they just throw some basic mechanics/systems they’ve seen in other games in and it feels stale or lacks cohesion. Not to say that it’s bad to reuse mechanics though. So many games feel like they had a great idea, just fell flat in terms of execution of that idea
@temper8281
@temper8281 2 жыл бұрын
True.
@ya_papug
@ya_papug 2 жыл бұрын
That music tho. Gave me actual goosebumps
@michaelsander2878
@michaelsander2878 2 жыл бұрын
The music was distracting but the content was worth the weird music.
@Axodus
@Axodus 2 жыл бұрын
Every object has its own save and load function? Wow, I coded a system like that myself! My save code basically asks every node politely to send their data and saves all the responses, this is very plug and play, and no node being removed from a scene would cause a save load error.
@micalobia1515
@micalobia1515 2 жыл бұрын
Msgpack is a pretty good binary json alternative, parses a lot faster and is a lot smaller, and keys aren't required to be strings which is nice.
@temper8281
@temper8281 2 жыл бұрын
Sounds boring.
@micalobia1515
@micalobia1515 2 жыл бұрын
@@temper8281 And JSON ain't?
@temper8281
@temper8281 2 жыл бұрын
@@micalobia1515 JSON is
@GamerX-2000
@GamerX-2000 2 жыл бұрын
I’m an aspiring game developer, and this is a really helpful message! I’ve only worked on platforms that don’t have save data or don’t need it- like simple Roblox stuff or khan academy’s coding platform. Problem is, idk how to deal with save data. Anyone have a good video that addresses the concept (not a coding tutorial, but an explanation of the overarching idea). On khan academy, due to a lack of save data (unless you use cookies on the html part, which I haven’t started) users usually have a print function that outputs an array that the player can save elsewhere, and paste into an array in the code later(and the program takes that array and breaks all its data into the individual variables)
@doktoracula7017
@doktoracula7017 2 жыл бұрын
You already get that idea, instead of outputting the array to player you just write it to file and add some code to check for that file on game start so it can be loaded. Instead of file you can use cookies or any other storage type to keep it. That's the whole idea really.
@snugray_p1659
@snugray_p1659 2 жыл бұрын
I feel like I'm listening to a creepypasta
@temper8281
@temper8281 2 жыл бұрын
I'm watching you all
@leetaeryeo5269
@leetaeryeo5269 2 жыл бұрын
Just curious (I have no experience in game dev, as I’m more a systems and enterprise developer), but would a SQLite database provide a lot of the same sort of benefits? You can implement indirection through foreign keys linking tables, so pointer data types aren’t a major hurdle. And if one of the basic types are insufficient, you can fall back to using JSON for an individual column to describe weird data types. Plus you’d gain the benefit of a prewritten and pretty well optimized library for reading and writing the file. Plus random access for data in the file would be a bit faster due to the database engine, which would let you prioritize loading relevant data first without having to really parse the full file, if I understand stuff right. Am I off base on my thinking?
@Yagami2027
@Yagami2027 2 жыл бұрын
Wow, You really made a Very Awesome Save Format, I really hope you continue developing this File Format in your Free time so that More Game Developers use it. Also, I am Guessing that the BG Music is from the game you are making, but it really was kinds scary and making it little hard to Focus to the Video. After looking back at a few Videos of yours and Checking the Steam page of the Game, I think it is a really awesome concept of a Game, Really Hope it comes out neat.
@mariocamspam72
@mariocamspam72 2 жыл бұрын
this capitalization is aneurysm-inducing
@Yagami2027
@Yagami2027 2 жыл бұрын
@@mariocamspam72 I know, Been a thing from a long time to capitalize almost every word I type, though now I am trying my best to not capitalize unnecessarily anymore.
@mariocamspam72
@mariocamspam72 2 жыл бұрын
@@Yagami2027 you're doing good, some habits are hard to break. 👍
@pleasecontactme4274
@pleasecontactme4274 2 жыл бұрын
@@Yagami2027 that's a really funny habit
@lucaciucci7719
@lucaciucci7719 2 жыл бұрын
Have you considered using the cereal library? It generalises what you are doing and it is very simple to use. You can also easily implement your own file format if you don't like the predefined ones (binary, JSON, XML, ...)
@temper8281
@temper8281 2 жыл бұрын
Don't use external libraries.
@v01d_r34l1ty
@v01d_r34l1ty 2 жыл бұрын
​@@temper8281 Protocol Buffers ("Protobuf") by Google is also a popular implementation for serialization, though I haven't heard of games using it.
@xeon39688
@xeon39688 2 жыл бұрын
@@v01d_r34l1ty he said it's awful
@hamu_sando
@hamu_sando 2 жыл бұрын
The internet is full of bad role models and bad advice. Ignore everything this guy does and just smile 😂
@temper8281
@temper8281 2 жыл бұрын
@@hamu_sando I'm a great role model. Just gotta give me a chance.
@quickgaming2466
@quickgaming2466 7 ай бұрын
First of all, if you r truly a dev behind this game - I applaud to you.
@temper8281
@temper8281 7 ай бұрын
I am
@hw2007
@hw2007 2 жыл бұрын
I did too! I renamed my .txt file to a .hw2007 file!
@Eternal_border
@Eternal_border 2 жыл бұрын
That game looks fun ngl
@doodidood
@doodidood 7 ай бұрын
Another cool file format that I've started to use recently for configuration stuff is toml - it's super human readable and easy to parse/write.
@zedlz
@zedlz 2 жыл бұрын
I have no idea whats going on but you are very cool
@Golem642
@Golem642 2 жыл бұрын
Let's be honest : we all clicked because of the thumbnail
@JetJockey87
@JetJockey87 2 жыл бұрын
In the standard SDLC, Data Modeling comes before Solution Design. I understand Game Dev is a lot more... Agile, but it's a good idea to lock down your data model. You think you're saving yourself time by reinventing the wheel, but there are sooooo many useful libraries and functions to parse and handle JSON and XML. Heck you don't even need to use NoSQL dbs, you can use SQLite and handle state with a standard RDBMS with PKs and FK constraints, clustering, indexes and more. Very performant.
@temper8281
@temper8281 2 жыл бұрын
Data modeling and solution design are one and the same. You can't do one before the other. I'm not reinventing the wheel. I'm building a wheel that is perfect for my usecase.
@norb3695
@norb3695 2 жыл бұрын
Dude I thought the game in the background was Gmod with the "Lidar" addon what the fuck I'm looking forward to playing your game!
@Talel_kraiem
@Talel_kraiem 2 жыл бұрын
I've got the same problem and it almost made me cry
@mumbojumbo02
@mumbojumbo02 2 жыл бұрын
simplicity is bliss
@jacobmoore2036
@jacobmoore2036 2 жыл бұрын
This game already exists. Its called Scanner Sombre.
@KazmirRunik
@KazmirRunik 7 ай бұрын
I thought people did this regularly when they were making save data types. If you look into the folders for your games, you see all sorts of file extensions, and some of them will just be made up. Like, if you go into a Touhou game install & save a replay, you'll find ".rpy" files that the creator just sort of made up. It's very different from the ".rpy" files that are used by the RenPy visual novel engine or the ".rpy" files used to define a resource for a Twisted Web server. However, all of their uses of the same extension while having completely different contents, it illustrates that they independently made their file types up on the spot. It's not a terribly uncommon practice, and it means you have a deep understanding of why other developers also do the same thing!
@temper8281
@temper8281 7 ай бұрын
They do yeah. Primarily because you can make a very simple file format that loads fast and makes things easier to manage.
@FireDragon91245
@FireDragon91245 7 ай бұрын
Very nice, for languages that run ontop of a Runtime and thus support reflection are easy to save in json, JAML you just need to write a generic recursive funtion to traverse any struct down to any primitive and your set
@goitegi
@goitegi 2 жыл бұрын
I thought this is was going to be a funny meme where he made the file format to be represented as amongus. Now I'm disturbed by the ominous music
@x1nto
@x1nto 2 жыл бұрын
Hey! You talked about JSON and XML (which are indeed trash), but have you heard of Protobuf? It's a way to save data to a binary format and it supports structured, typed data alongside optionals and stuff.
@temper8281
@temper8281 2 жыл бұрын
Yes I have a protobufs are awful xD
@x1nto
@x1nto 2 жыл бұрын
@@temper8281 honestly, I mostly like them because of the compression they provide, but I understand that it might not fit in some use cases
@darrennew8211
@darrennew8211 2 жыл бұрын
@@temper8281 ASN.1 to the rescue! ;-)
@aeghohloechu5022
@aeghohloechu5022 2 жыл бұрын
I guess the issue is that they want a human readable output but protocol buffers kind of makes it quite hard
@x1nto
@x1nto 2 жыл бұрын
@@aeghohloechu5022 that's true but if you have source protobuf files, that shouldn't be a problem at all
@hoodie_cat
@hoodie_cat 2 жыл бұрын
To be honest, I only clicked on this video because of the amogus thumbnail and I had thought you'd made some sort of amogus save file
@adamhenriksson6007
@adamhenriksson6007 2 жыл бұрын
I would love to hear why a format like JSON or XML is insufficient for this use case, cause writing a serializer and de-serializer for your custom plaintext format, while not that hard, seems a bit overkill for ergonomics IMO.
@GlitchyPSI
@GlitchyPSI 2 жыл бұрын
I'd like to know this too. I am using JSON myself because it integrates with web technologies and allows me for a quick implementation of anything with libraries readily available for several languages and in some cases even built-in in the same runtime (e.g. NodeJS) * Saying this as somebody who's making a few binary file formats too
@SahilP2648
@SahilP2648 2 жыл бұрын
So I haven't watched the video but it would make total sense to prevent people from looking into your game code or even determining how the game was coded. Arguably one can save anything in JSON or XML but that would mean that people can reverse engineer stuff. Many programs use custom extensions specifically so that other people don't know what's in it. It will be a security risk. For games it will be modders or hackers trying to modify save files which can give undesirable effects.
@GlitchyPSI
@GlitchyPSI 2 жыл бұрын
@@SahilP2648 Sure, I can understand this, and it's very valid IMO, but it REALLY depends on how you actually serialize stuff methinks
@hypario
@hypario 2 жыл бұрын
​@@SahilP2648 creating a custom format never blocked any modder / hacker to still reverse engineer the game. when you save data in the client side, they will always be able to read it. And even in this case, he still used a human readable format, which will still make people able to read it...
@SahilP2648
@SahilP2648 2 жыл бұрын
@@hypario no that's the whole point of an extension. You can reverse engineer some of it but think of all the Android apps using .APK, or programs using .DLL and tons of custom formats. You don't just change the extension and keep the data in byte format without performing some steps. I would suggest at least for gaming you can have the entire world state in RAM which would not take more than 100MB even for demanding titles (and makes sense since RAM is much faster than SSD), then when you go over a checkpoint you make a copy of the RAM contents, serialize, encrypt (or semi-encrypt based on your custom logic) and put it in your custom extension.
@Haltroy
@Haltroy 4 ай бұрын
I realized that JSON and XML formats are bad when it comes to size and parsing so I made my own nodal data structure that uses direct binaries so al I have to do is casting the data. I mostly use C# (which is easy to do casting) but there's a C++ library version for it too. It saved a ~100 byte example to just ~60 bytes and it can save more on repeated stuff. Also it has ability to have attributes for nodes. My library can auto-parse it to null, booleans, chars, signed/unsigned bytes, 16/32/64-bit un/signed integers 32-bit/64-bit floats (64-bit float is sometimes called double on C#), byte arrays and strings. The thing is that I know that nobody is going to use it anyways but i already published it as a cross-platform open-source project and a viewer to view those files. It uses recursion (because the node-child depth is theoretically infinite) so thats another negative of it (also the C++ code is pretty bad, i basically learned C++ writing it).
@lunkums
@lunkums 2 жыл бұрын
Btw, great informative video! It was clear and to the point. One thing I think that could use improvement is the background music. It was a little distracting and didn't fit the vibe
@temper8281
@temper8281 2 жыл бұрын
Yeah I think it was too loud. And also too scary
@uipo1122
@uipo1122 2 жыл бұрын
@@temper8281 I actually liked the music
@stuartdowning5628
@stuartdowning5628 2 жыл бұрын
@@temper8281 definitely good music choice.
@johnseed2148
@johnseed2148 2 жыл бұрын
Great video :D! How would you go about solving this problem if you planned everything from the beginning?
@temper8281
@temper8281 2 жыл бұрын
It's not possible to know exactly what your data will look like at the beginning. So best thing to do would be have tools that keep you flexible. Having a file format is useful because I can tailor it exactly to my data. The other thing I would do is try to keep data is simple as possible without much levels of indirection. Complicated data structures and pointers are difficult to serialise.
@sebase3283
@sebase3283 2 жыл бұрын
the thumbnail be like: DONT SAY IT DONT SAY IT
@land3021
@land3021 7 ай бұрын
0:57 Yeah it's pretty spooky trying to get code to save code that the code is creating inside a program that mind you, that code is part of the same file in the same code that is running the thing that this code is saving...
@JasonMitchellofcompsci
@JasonMitchellofcompsci 2 жыл бұрын
That time over a decade ago I ran into a similar problem brought me down a path of trying to write my own malloc that could be fed a specific chunk of memory to operate on. Why? So to save I could either copy the whole blob to a file or just mmap the file from the outset and have the state auto saving. Of course that wouldn't be human readable but it does solve the problem of saving any data structure.
@VSink7631
@VSink7631 2 жыл бұрын
Why does the background music sound like something you'd hear in hell?
@temper8281
@temper8281 2 жыл бұрын
Cuz that's where I'm making the video
@raptorjesus3396
@raptorjesus3396 2 жыл бұрын
Protobuf dto definition for each go, generate dto files from definition. Each go can load a it's specific dto, and export it's dto. (Impl wise the dto is stored as a field in the go). On save game the game instance manager exports the dto for each go. Write the flat tree to a file. The state manager of the game instance resolves references. It's as easy as that
@raptorjesus3396
@raptorjesus3396 2 жыл бұрын
The game instance state manager is a Singleton backed by a concurrency safe dictionary mapping the a ID to a reference . The go as a onattach and detach method that registers with the gism. For multiple reasons you don't ever want to store a pointer to a go in another go. Most of them are isolation, state safety and thread safety related.
@raptorjesus3396
@raptorjesus3396 2 жыл бұрын
Take a look at the state mgmt of the REDengine, or Gamebryo for examples,that do exactly that, but unnecessarily complicated (own file format, live queries etc.)
@temper8281
@temper8281 2 жыл бұрын
Too complicated.
@tomcheng3903
@tomcheng3903 2 жыл бұрын
I am *very* curious to know why you think JSON & XML are trash, but your format is better From what I can tell, you've *just* reinvented array-only JSON with a dreadful library API that involves faffing around with linked lists The reason most people consider JSON/XML to be 'trash' is because they're generic hierarchical text formats But if you *want* a generic hierarchical text format, i have no idea why you wouldn't use json
@temper8281
@temper8281 2 жыл бұрын
Because it's made for a specific purpose. JSON/XML are general interchange formats. My format is designed to be integrated with my game engine. That makes it much easier to work with.
@tomcheng3903
@tomcheng3903 2 жыл бұрын
@@temper8281 In what way is it easier to work with? It looks like a generic format for me, in the readme you just say it's 'a text file format used to save and load hierarchical data'. In what way is that different to JSON, such that it's better for your game?
@temper8281
@temper8281 2 жыл бұрын
​@@tomcheng3903 Why don't you write one and you'll find out. Easy peasy. Besides you won't be faffing around with linked lists!
@tomcheng3903
@tomcheng3903 2 жыл бұрын
@@temper8281 I already have - I write my own formats all the time, because I think JSON&XML *are* trash for many things. I normally write a very specific binary format that will perform better than json - that's the whole point. If I don't have much data & don't care about performance, then I use json. I don't just reinvent json with a different syntax if you don't want someone criticising your format, just don't make a youtube video calling json&xml trash without any understanding why & then proceed to make all the same mistakes When you put videos online, people watch them & learn from them, & it's infuriating seeing dogma like this get spread around! I don't want to live in a world full of JSON. But I also don't want to spend the next 10 years debugging crappy json alternatives because it was trendy to shit on json but nobody actually knew why
@temper8281
@temper8281 2 жыл бұрын
​@@tomcheng3903 Oh no cry me a river!
@WellSwolen69
@WellSwolen69 7 ай бұрын
I use Godot on Debian bookworm I use their own resource stuff, but I recommend using something like Deltarune does it's code Split up major areas of the game into chapters that have different data. Save files can start on any chapter and non necessary data can be ignored and left into previous chapters unless needed again.
@bluebukkitdev8069
@bluebukkitdev8069 11 ай бұрын
Really cool looking game in the background. What is it?
@temper8281
@temper8281 11 ай бұрын
Blinded by Fear. It's the game I made. It's on steam.
@etopowertwon
@etopowertwon 2 жыл бұрын
I drank kool aid of sqlite for my pet projects. I get atomicity and reliability and extebsability out of the box without headache of renaming files. Everything has some sort of id. So unit* can be saved as unit->id. It has drawback of boilerplate, but I can live with it and I can make complex query into saved state of project using sqlite client.
@RugbugRedfern
@RugbugRedfern 2 жыл бұрын
pretty neat but what the heck is going on with the background audio
@temper8281
@temper8281 2 жыл бұрын
Yeah will fix it for next video. I'm just bad at editing
@oxey_
@oxey_ 2 жыл бұрын
This is just #[derive(Serialize, Deserialize)] with extra steps :p
@pazer40
@pazer40 2 жыл бұрын
My nigga really be reinventing XML lel. You can't beat XML for human readability and validation. You could have easily wrote an XML schema and enforced the grammar of your own save format. You can still define the same generic node based tree structure in XML and it will just work. Then you can easily parse that file into a node tree in memory to reproduce saved scenes. And the layout based friendly syntax of XML will give you freedom to extend the game's level creation and modability more easily for the future. Focus on writing the schema on a generic enough level for your scene nodes to only need extendability and you got yourself a solid backwards compatible format as well, which you can version with your schema files. Bonus points: XML has tools in place to automatically cross-validate a file against a schema, so you can easily guarantee a save file is not wrong/corrupt without any additional work. You can easily make the schema public and have people automatically write valid XML for your scenes, because the format will be supported automatically by any modern text editor. Autocomplete for nodes, attributes, and enumerated values is a neat end-user feature of XML as well :)
@temper8281
@temper8281 2 жыл бұрын
You might be the only person on Earth who says you can't beat XML for human readability. Fair play.
@pazer40
@pazer40 2 жыл бұрын
@@temper8281 There is a reason people use XML specifically for layouts of structured data. I urge you to open the dev tools on any modern web browser and tell me what you see. It sure as hell isn't JSON or a proprietary pseudo-defined format. Properly written XML, especially with a limited scope of functionality will be infinitely more human readable than pretty much any other proprietary format you can think of, save for a few (like YAML for example). I urge you to open any semi-serious modern enterprise framework and look at the majority of config files and their schemas and see what the prevailing format of choice is. That is not on accident. Your take on the matter is extremely close minded just because you are not familiar with the multitude of benefits of XML and the problems it tends to solve.
@temper8281
@temper8281 2 жыл бұрын
@@pazer40 Like I said. The only person on Earth who thinks XML is readable 😂
@pazer40
@pazer40 2 жыл бұрын
@@temper8281 Like I said. Close minded and wrong. Feel free to take that hard headedness of yours to the grave. Good programmers research and use the right tools for the job. For the record, there's nothing wrong with what you did, especially to gain some experience. But it is just unnecessary and in many ways inferior as a solution to a problem that has been solved already. I bet you haven't even tried writing a half-decent XML schema but you are quick to judge it. Just because 90% of the usage cases for XML is badly written and bloated, doesn't mean it can't look simple and nice in a proper layout. I would wager any non-technical person would prefer to work with an automatically validated and autocomplete ready XML file instead of some proprietary format which might or might not be properly defined even in documentation. In fact no need to wager... I know that's the case from the multitude of clients we've handled throughout the years with the exact same isolated problem..... Working for an enterprise..... For the record, yes. A company with thousands of employees has tried a multitude of formats for such use cases. And for absolutely every use case not strictly tied to criticalness of performance - XML is the go-to for non-technical users to build/configure layouts of structured data. By a long shot. But hey, what do I know. Seems like I am the only person in the world that has used XML in my life 😂😂😂 You sound ridiculous, mate.
@temper8281
@temper8281 2 жыл бұрын
@@pazer40 "You are close minded". Proceeds to tell me what I should and should not be doing. Mate you wanna use XML don't let me stop you. But I don't give a fuck about whether you think what I'm doing is right or wrong.
@leucistic
@leucistic 2 жыл бұрын
I swear to god, I thought the video was a file format for amongus just because of the thumbnail. I need help.
@ftwgaming0
@ftwgaming0 2 жыл бұрын
I don't think this many of us would be here if our ape brain pattern recognition didn't see an amogus in the thumbnail.
@MiggySmallzXD
@MiggySmallzXD 2 жыл бұрын
The loud sounds in the background is very distracting. Cool vid though!
@aarohgokhale8832
@aarohgokhale8832 2 жыл бұрын
Why is the music so anxiety inducing
@ulicaKonja123
@ulicaKonja123 10 ай бұрын
Before the game is left just rewrite a .txt or any text file with the data, and read it at the beginning
@jaysistar2711
@jaysistar2711 2 жыл бұрын
The ability to use serde in Rust for compile time reflection is worth switching from C++ by itself. That's not even saying anything about the dynamic to static dispatch where needed without having to write both a class with virtual functions and a concept as well; in Rust we just use a trait, and a v-table is made if we ever create a &dyn to our struct for dynamic dispatch, but if we use either the struct or a generic, then it's monomorphised to use static dispatch.
@temper8281
@temper8281 2 жыл бұрын
I gotta write a game! Not spend time writing code! 😱
@jaysistar2711
@jaysistar2711 2 жыл бұрын
@@temper8281 That's the idea.
@Rose-ec6he
@Rose-ec6he 7 ай бұрын
This is an interesting perspective. It feels more unique to C++. Given that, json parser are normally built-in to most languages, raw pointers and non-trivially-serilizeable types are less common in other languages and C++ offers no reflection or similar features to dynamically account for types' structure. The list goes on, like the first class package management, etc. This feels highly influenced by C++. I don't mean this negatively, it's just an observation, I've got little experience with C++ so this type of solution is novel to me. Thanks for sharing
@temper8281
@temper8281 7 ай бұрын
Nowadays I just write binary files for game data that are just simple functions that write/read data directly into/from a file. C++/C inability to inspect data at run time forces you to take the more explicity approach, but can be simpler in many ways.
@Pericles_89
@Pericles_89 2 жыл бұрын
I'll be honest the amongus in the thumbnails is why I clicked
@shuba5173
@shuba5173 2 жыл бұрын
horror themed tutorial
@kkuriboh
@kkuriboh 7 ай бұрын
why don't you just use something like cbor to byte encode and decode data structures, then just write it to a file?
@emberdrops3892
@emberdrops3892 2 жыл бұрын
Really interesting gamedev log! Just one point of feedback. I don't know if I'm alone with this but the constant ominous sound effects in the background were, for an explanatory video, very distracting
@patrlim
@patrlim 2 жыл бұрын
Game reminds me of the gmod lidar gamemode
@shahbazalam4268
@shahbazalam4268 2 жыл бұрын
Is it just me or pink looking kind of sus?
@timecubed
@timecubed 2 жыл бұрын
Can't wait to make a .amogus format
@Dylank001
@Dylank001 2 жыл бұрын
Your game looks pretty cool! Did you make it in your own engine?
@temper8281
@temper8281 2 жыл бұрын
Yeah
@flxy04
@flxy04 2 жыл бұрын
Clicked on this because I thought there was an amogus in the thumbnail, got a really consise breakdown of data saving. Also: the game looks really good, it's a great idea to limit vision in this way!
@technologyondemand4538
@technologyondemand4538 2 жыл бұрын
what game is this? looks sick! i wanna play this. can i join some sort of thing to keep track of the game dev progress? (edit): steam link in the description :p (edit2): will you be releasing a native linux version as well? ig i can play with proton with steam, but native apps are always nice!
@temper8281
@temper8281 2 жыл бұрын
No native linux version I'm afraid!
@technologyondemand4538
@technologyondemand4538 2 жыл бұрын
@@temper8281 that's fine, it should work through proton with steam
@nomadshiba
@nomadshiba 2 жыл бұрын
if your data structure was something similar to unity ecs, you wouldnt have nesting and everything would be data driven, so saving and loading etc, anything would be possible without any problem
@nomadshiba
@nomadshiba 2 жыл бұрын
you just load the data and systems can pick up from there without you needing to do anything else
@ryanking1
@ryanking1 2 жыл бұрын
What the hell is with the creepy music?
@ProtoMan137
@ProtoMan137 2 жыл бұрын
I mean yeah, that's how I guess one could do it, but why do I feel like there will be a jumpscare throughout the whole video?
@temper8281
@temper8281 2 жыл бұрын
Just wait until you play the game!
@salad5701
@salad5701 2 жыл бұрын
1:37 is that.. is.. is that what i think it is???
@leajenkins7957
@leajenkins7957 2 жыл бұрын
I really hope people are adding native support for this into every open source game engine as we speak. This could be big.
@jrflightattendant34
@jrflightattendant34 2 жыл бұрын
I can finally have a .file format after my name on instagram that is not already taken
@JoeMama-ng1xc
@JoeMama-ng1xc 2 жыл бұрын
i first thought this was a joke video because the thumbnail looked like it was an among us character
@maxperignon8794
@maxperignon8794 2 жыл бұрын
So interesting!
@Kugelschrei
@Kugelschrei 2 жыл бұрын
Interesting, but you do have to rewrite your parser everytime you change anything within your data structure? That sounds like lots of overhead to me, but granted, its nice to have human-readable files. Easy Save does this for Unity too, and its backwards compatible. It is not as pretty when looking at the textfile, but also readable. When you for instance add some variable to a class that hasnt been there before and then load/save data, it doesnt break but just fills in the missing data. If there is too much data because you removed a variable, it gets omitted. Pretty good system that doesnt require any kind of manual parsing on my end and saves any of my custom classes and structs
@ETXAlienRobot201
@ETXAlienRobot201 2 жыл бұрын
can't say i like the unity format at all. rather, should say, "formats" , because they failed hard in being future-proof.
@X7cF4
@X7cF4 2 жыл бұрын
In my programs I store my data via a data manager class I made as a library
@zsiger6921
@zsiger6921 2 жыл бұрын
Im just here for the amongus from the index picture
@marcandruu
@marcandruu 2 жыл бұрын
Why did you choose such ominous music LOL
@Spriters400
@Spriters400 2 жыл бұрын
1:41 Why are there crap from our problem actually ? Why would this solution be better (except that it's from scratch) ?
@temper8281
@temper8281 2 жыл бұрын
Cuz Json sucks.
@Spriters400
@Spriters400 2 жыл бұрын
@@temper8281 yeah but id just like to know the points
@temper8281
@temper8281 2 жыл бұрын
@@Spriters400 Same
@fiona9891
@fiona9891 7 ай бұрын
it looks a lot like sdlang or the KDL document language
@horseradish843
@horseradish843 2 жыл бұрын
I hope you implement versioning, since this is unmaintable after release. Its always a better idea to use an existing thing like json, xml or even use protobuf which will make versioning much easier. I cant see how this extends json or xml
@temper8281
@temper8281 2 жыл бұрын
No it's not always a better idea. And yes, it can be versioned.
I Created a Game Engine Just to Optimise This
4:50
Vercidium
Рет қаралды 1,2 МЛН
Abstraction Can Make Your Code Worse
5:13
CodeAesthetic
Рет қаралды 687 М.
computers suck at division (a painful discovery)
5:09
Low Level
Рет қаралды 1,8 МЛН
I made my own Image File Format
5:16
FaceDev
Рет қаралды 471 М.
Never install locally
5:45
Coderized
Рет қаралды 1,9 МЛН
I Made My Own Programming Language
10:20
CodeNoodles
Рет қаралды 103 М.
How is this Website so fast!?
13:39
Wes Bos
Рет қаралды 1,3 МЛН
Why You Shouldn't Nest Your Code
8:30
CodeAesthetic
Рет қаралды 2,9 МЛН
Motion Canvas is now Open Source!
4:17
aarthificial
Рет қаралды 791 М.
I'm a Mess, so I'm Making My Own File Organizer [TagStudio]
23:32
I Designed My Own 16-bit CPU
15:46
AstroSam
Рет қаралды 2,2 МЛН
This is Why Programming Is Hard For you
10:48
The Coding Sloth
Рет қаралды 1 МЛН