Posts

Showing posts from April, 2022

Making a simple JRPG (Part 2)

 I spent a few hours trying various ways of quickly importing meshes as a MeshLibrary for the GridMap and eventually settled on a simple post import script which helps me iterate quickly while making my assets. #import_mesh_library.gd @tool extends EditorScenePostImport # Generate a MeshLibrary from all the mesh in the imported in the scene const mesh_path: String = "res://Models/Meshes/Tiles" var meshes: Array[Mesh] func _post_import(scene): var dir = Directory.new() if not dir.dir_exists(mesh_path): dir.make_dir_recursive(mesh_path) _iterate(scene) _save_mesh_library() return scene func _iterate(node): if node != null: match node.get_class(): "MeshInstance3D": var resource_path = "%s/%s.mesh" % [mesh_path, node.name] meshes.append((node as MeshInstance3D).mesh) _: pass for child in node.get_children(): _iterate(child) func _save_mesh_library(): var source_file = get_source_file() var file_name = (source_file.get...

Making a simple JRPG (Part 1)

Image
After a few years of yak shaving     ...and constantly restarting and shuffling projects around, I finally sat down and told myself to make a game, start to finish. Thanks to the wisdom of a coworker with far more experience in the video game industry, I finally stopped trying to start the perfect game project... or my dream game or anything that would keep me stuck in a never ending loop. It's funny how each time I restarted a project because I didn't like the state of a tool, engine, the art style or the 3D library, I would gradually go to lower and lower levels, eventually getting the idea of implementing my own engine from scratch. In itself it's not a bad project, however, as I wasn't making any game, in fact I was making less progress each time I restarted. At some point, after successfully rendering a single RGB triangle on screen I realized I wasn't near completing any game project at all.  I also came across this book (How to make a video game all by yourse...