Redoing my game engine

I have come to the conclusion of pretty much redoing my 2D game engine over the Christmas holidays… And I thought I might ask this amazing Java-loving community for any suggestions (PLZ don’t suggest stuff like “don’t make an engine, use this one instead” because for some reason I find myself happier when making an engine and also it makes me happy that when I make a complete one)

Here are some of my ideas for the redesign:

  • normal event system instead of reflection
  • hopefully a lot less memory usage
  • remove a lot of the “[INTERNAL USE ONLY]” messages from the docs
  • LWJGL 3 usage (multiple windows, multiple IO, etc.)
  • TCP and UDP server/client architecture
  • replace ‘Input’ class with ‘Keyboard’ and ‘Mouse’ classes
  • custom ‘Color’ class
  • any other sensible ideas you guys suggest (if I agree with it)

EDIT: I will also be giving the developer ArrayLists instead of normal Arrays

Instead of making an Engine blindly with little to no experience why not make a game first :), spend a lot of time refactoring the game and try to pry out all reuseable code. Take this re-useable code and make another game, you will find problems with the code, refactor it, clean it up, add more to it. Rinse and repeat. If you do this you will have a useful engine.

That’s what I did with my first attempt… Kinda… I made a simple engine then when I tried to make a game engine in it I saw a lot of things which I needed to add… So I added them into the engine… Then with another game, more items to add… And so on…

It was just that after showing my first attempt (here) a lot of people didn’t like a lot of the things… So when I redo it I want to be sure I do it better this time…

If you really want to make your own engine, then try that technique using someone else’s engine: make a game (and not just a 1-day toy game) with a reputable engine/framework/whathaveyou that people tend to like, and see what features you used, what features were good, what features were bad in your opinion, and then make your engine around those ideas. This way you get the benefits of building the engine around the game (instead of the other way around) as well as using proven techniques that people find useful.

I agree with The Lion King and BurntPizza. Make some games first and keep in mind that the maintenance, the development and the documentation of an engine are very time consuming. Lots of Java games programmers should focus on games as we already have tons of nice tools. When a tool is missing, you can create it so that it works with the existing software ecosystem instead of using that as a pretext to create yet another engine.

This. There was a time when I finished a new small game every three-four weeks. The code that I found myself copy-pasting between projects gradually got leaner and meaner, and eventually became a pretty respectable game framework in its own right. Don’t worry about making a reusable engine; just make games, and reuse previous work when you have to.

No need to waste your time to making engine for use of others. There are really big chances that no one will ever use it even if you would pay them. Just make engine that can barely support your needs. Non used code is biggest sin. Documentation should be non existant just make engine parts that robust and self explanatory that you don’t need anything but source code and API. Making engines are fun but only way to push engine to be great is to make it just enough to solve all problems that your use cases(real games) offer. Never try to solve problems that don’t exist because then you are creating problems(maintaince, bugs, bloat) not solving.

The more I think about this the more it seems it’s no worse to enjoy writing engines that nobody will ever use than writing games that nobody will ever play (which covers 99% of games let’s be honest ;D) I say whatever you enjoy writing, go for it, it’s all good practice.

Having said that if it’s an engine for making games it’s hard to see how you can test it other than make some games with it…or how will you ever be sure you’re not writing a bug-ridden monstrosity?!

Game engines , some of you have touched on the perfect idea and yet you didnt quite get it. You said dont make it for other people well actually make it so that other people can use it and its obvious , but not for them so that when you come along after so many thousand lines of codes you can know exactly what that function does. But yer design it so that you would be able to clearly understand what the function did the second you saw it.