Serialization with Gson | Coding a 2D Game Engine in Java #19 @GamesWithGabe
Serialization with Gson | Coding a 2D Game Engine in Java #19  @GamesWithGabe
Uploaded June 2020 | Updated November 2026, 5 days ago
Join the Discord: discord.gg/4tHeAkxNg7

In this tutorial I go over a brief introduction to Gson, which is Google's serializer for Java objects. This library serializes objects into a Json format, which can then be deserialized with the same library. It uses reflection to do this, which means that the programmer does not have to write any serialization code at all. We will discuss some changes that need to be made to our current component framework to support this, implement those changes, and the begin to save our game data using Gson.

Gson Download: github.com/google/gson
Gson User Guide: github.com/google/gson/blob/master/UserGuide.md

Source Code: github.com/codingminecraft/MarioYoutube/tree/ce60cc7c3d7783c49f16507fe6ae60c0a847823b

---------------------------------------------------------------------
Website: ambrosiogabe.github.io
Github: github.com/ambrosiogabe

Here are some books I recommend if you want to learn about game engine development more thoroughly. I do not profit off any of these sales, these are just some books that have helped me out :)

My Recommended Game Engine Books:
Game Engine Architecture: gameenginebook.com
Game Physics Cookbook (Read this before the next physics book): amazon.com/Game-Physics-Cookbook-Gabor-Szauer/dp/1787123669
Game Physics (Ian Millington): amazon.com/Game-Physics-Engine-Development-Commercial-Grade/dp/0123819768
Game Programming Patterns (Free): gameprogrammingpatterns.com

My Recommended Beginning Game Programming Books:
JavaScript Game Design: apress.com/gp/book/9781430247166

My Recommended Java Books:
Data Structures/Algorithms: amazon.com/Data-Structures-Algorithms-Java-6th-ebook/dp/B00JDRQF8C
LWJGL (Free, but I haven't read this thoroughly): lwjglgamedev.gitbooks.io/3d-game-development-with-lwjgl/content

Outro Music: bensound.com/royalty-free-music
Serialization with Gson | Coding a 2D Game Engine in Java #19Starting Engine & Debug Lines | Cocoa Engine Devlog #6Physics and Stuff | Cocoa Engine Devlog #4Unit tests and Line vs Circle | Coding a 2D Physics Engine in Java #6Event Listeners | Coding Geometry Dash in Java #2Coding a Physics Engine | Cocoa Engine Devlog #7Font Rendering | Coding a 2D Game Engine in Java #41Setting up the Window with LWJGL | Coding a 2D Game Engine in Java #1References | C++ For Java Devs Ep. 10Drag N Drop Level Editor | Coding a 2D Game Engine in Java #23Even More Bug Fixing | Coding a 2D Game Engine in Java #44Broadphase Collision Detection | Coding Geometry Dash in Java #23
GamesWithGabe |

Serialization with Gson | Coding a 2D Game Engine in Java #19

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER