Jump to content
  • Advertisement
  • entries
  • comments
  • views

About this blog

For several years now I've happily used other game engine, and had a lot of fun doing so. But I want to learn about the underlying technologies, so I'll be building an extremely simple game engine This will hopefully be a 2-3 month project, and I'll be developing the rendering engine, physics engine, model pipeline, everything. To make my life simpler (?) I will be writing this engine using WebGL and javascript. The project code will be available at github: https://github.com/sdfgeoff/LearningWhatAGameEngineIs

Entries in this blog


The requirements around the project

When doing any largish project, you need various support infrastructure. You need to be able to track your changes, and because working with multi-thousand line files is a right pain - you need some way to combine multiple files into one, and finally, you need to be able to run tests to ensure your code is valid. This means we need:  A Version Control System A build system A Test system I'm a fan of git, and so the project is already up on github. Don't bother to have a look there yet - there's not really anything to see. But it takes care of the first requirement. For a completely different project, I wrote a small dependency resolver in python. Coupled with a small command line interface it makes a minimal (<300 line) build system. For a project that isn't "just" building code, this allows a lot more flexibility than things like Make, and because it's python it probably doesn't require people to install anything they don't already have. And because I haven't worked in javascript extensively before, I don't have a particular test system yet. I'll probably end up going for Jasmine. I'll be playing with that this evening (unless someone comments with other suggestions)   There is also also have other non-project code that needs to be written. We need some way to get models and assets into our new engine, and like a complete n00b, I went and modelled all the models already. I also wrote an export script for blender! The great thing about blender is that it is python scriptable, and it is trivial to iterate through the vertices and write an export plugin. So we already have a way of getting all the vertex data that we need.  So what do we have currently? We have a system where you can type "./build.py --all" and it will spit out the sprite texture sheet, export a json file representing the modles, and merge some javascript files together. Awesome. After checking out some test frameworks, we can get started on the actual engine (or rather, the math behind the engine). Below you can see the sprite-sheet with the face outlines in white (and the physics outline of the ship in red). You may notice the weird color-spectrum: those are baked in blur levels that are useful for making a bloom effect in the meshes fragment shader without needing screen-space post processing.




The Game Plan

How does one start any project? by having some sort of idea about what they are going to do. In the world of game development, this is often some sort of game design document. This is no different, and requires just as much planning and preparation. As mentioned in the blog description, this project is going to be using WebGL and Javascript as it's underlying systems. I'm sure this will diminish this project in some peoples eyes but to me the systems required for building a game on the web are exactly the same as for those on a desktop, or any other platform. So what features is this game engine going to support? Physics Engine Line -> Line collision Force = mass * acceleration (Newtonian Physics) Stretch Goal: Line -> Bezier curve collision Rendering Engine Ability to render textured meshes Stretch Goal: Particle system Stretch Goal: Trail system Input Handling Keyboard input Other Systems Asset exporter from blender Misc Any non-game systems will be written in python (eg build scripts) The entire project aims to be < 1Mb total size Obviously there has to be some sort of game to test this engine. So this whole 'engine' is going to be based around a single simple game: You're going to fly a 2D spaceship around a course.  You'll use arrow keys to steer, and you'll collide with the level geometry. Yup, it's a primitive game - but I think that means it should be achievable. The grahpics style will be simple, as it will not be the focus of the project. The focus of the project is on me learning the underlying technologies required for making a game. You can see some concept art below:  



  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!