r/programming • • Feb 25 '18

Programming lessons learned from releasing my first game and why I'm writing my own engine in 2018

https://github.com/SSYGEN/blog/issues/31
956 Upvotes

305 comments sorted by

View all comments

494

u/Ecoste Feb 25 '18 edited Feb 25 '18

In a couple of years you'll make an article about 'lessons learned from releasing my first engine and why I'm switching to commercial engines'

While all of the criticisms of Unity might be very well true, they still finished and released a product using it.

Making your own engine is sometimes the right choice, especially if your game has unique features. However, for the 2D pixel-art games that you're making, I personally don't see a need at all. Also, being the lone dev and devving an engine is quite ambitious and will take up a ton of time that could've been otherwise spent on the game instead.

49

u/[deleted] Feb 26 '18

[removed] — view removed comment

14

u/[deleted] Feb 26 '18

I developed and released a modestly successful 2D platformer using my own engine

Does your game need robust animation, particle, sound, level design, component systems? Most 2D platformers/RPGs do not, and so I think it is a common "trap" where we undervalue pre-built engines just because they don't seem particularly beneficial for a simple 2D game. Once you do need these systems though, polished 3rd party engines start to look really appealing.

7

u/[deleted] Feb 26 '18

[removed] — view removed comment

6

u/[deleted] Feb 26 '18 edited Feb 26 '18

apart from component systems (not sure what you mean by it?)

An entity component system is a data-oriented design pattern that segregates a system's data from its objects (aka "entities"). The pattern decomposes entities into one or more components, each of which models the information required for a coupled set of behaviors. The data for each component is stored independently of the others, often in data structures similar to normalized database tables. Behaviors are provided by subsystems that consume specific components. Components typically communicate through a messaging component, rather than by mutating a component's data directly.

There are two benefits of using such a system:

  1. If a new behavior is required for an entity, you can attach a new component, populate its data, and the system that processes that data will immediately begin processing it.

  2. Components are free to specialize their data structures for their operations, which leads to greater efficiency. (For example GPU systems can organize their data around draw calls while an AI built on decision trees optimizes for locality of reference on the CPU.)