Monday, May 22, 2017

Thursday, May 18, 2017

Creating games on Linux

I will only write about game engines in this post. To be more specific I will only write about game engines that support Linux and are royalty free. This post will not cover any tools for game asset creation. With game assets I refer to Music, Sound effects, Textures, 2D sprites, 3D models etc.

Leadwerks

I started to do some game programming on Linux about 3 years ago (nothing published, just for fun). It all started when I backed the port of the game engine Leadwerks to Linux. I liked the idea of helping this particular engine getting ported to Linux because the port also included all the tools (map editor etc.). The engine is not open source but it is not expensive if you compare with other engines. You buy the engine from Steam and the standard version gives you Lua as script language and the Pro version gives you a C++ API and the Lua script language. The engine has good performance and the APIs are quite easy to wrap your head around.The tutorials and documentation on Leadwerks home page are good and you can find good tutorial videos on YouTube. There is also a nice and helpful community (forum) around Leadwerks. The engine and tools also run in Windows (and maybe Mac in the future). I have had a lot of fun with this engine and it is quite easy to use if have programming experience. Here is a list of the features that Leadwerks have for the time of this writing:

  • Instantaneous asset reload
  • Visual interface for every task
  • Drag and drop import of models and textures
  • CSG primitives and compound shapes
  • Smooth groups
  • Carve and hollow
  • Save any object as a prefab
  • Automatic texture mapping
  • Auto-generate materials and normal maps
  • Built-in script and shader editor and debugger
  • Hardware-accelarated terrain painting tools
  • Paint vegetation onto your landscapes
  • OpenGL 4.X Renderer
  • Entity System
  • Environment Probes
  • Hardware skinning with up to 256 bones
  • Hardware Occlusion Culling
  • Terrain and Vegetation System
  • Customizable Post-Effects System
  • Fast and Accurate Physics
  • Physics
  • Navigation AI
  • Visual Flowgraph
  • Integrated IDE and Lua Debugger
  • VR - HTC Vive, Oculus and OSVR
  • Game Launcher - Free Self-Publishing to Steam Workshop

The only shortcoming Leadwerks has, that I can think of, is that there is very rudimentary support in the engine it self for game UI things like buttons, text fields etc. You need to write it your self or find a third party solution.

Godot

Lately I have started to play around with Godot engine which is a free open source game engine. It is a quite feature packed engine that is well maintained and has a large and friendly community. It is worth taking a look at even if you are prepared to pay money for an engine. The engine works good both for 2D and 3D games, it has it own python(ish) scripting language and it has a very nice Animation system. Another rely nice feature is that it has a very mature game UI system that with buttons, text fields, list boxes etc. and if you miss a UI component you can easily write it you self. Godot organizes has something called scenes and sub scenes. For example a player character could be a scene and all enemy characters could be scenes and all these scenes can then be instantiated as sub scenes to a level scenes. Scenes are awesome when you get used to them and they provide a rely simple and effective work flow in the end. Even if I only have spent about 40 hours with the engine (at the time of this writing) I rely like it. Godot 2.1.X has the following nice features:

  • Visual editor, full of mature tools.
  • Uncluttered UI, with context-sensitive editors.
  • Scene system, supporting instancing and inheritance.
  • Friendly content creation interfaces for artists, level designers, animators
  • Visual shader editing for 2D and 3D.
  • Persistent live editing (changes are not lost after stopping the game).
  • Fully dedicated 2D engine, no hacks.
  • Work in pixels as your units, but scale to any screen size and ratio.
  • Custom 2D physics engine that works in pixel coordinates.
  • Flexible kinematic controller for collision without physics.
  • Blit 3D models as sprites into 2D.
  • Import 3D models from 3DS Max, Maya, Blender, and more with full animation.
  • Skeleton deforms and blend shapes.
  • Several light types, with shadow mapping.
  • Render with HDR, anti-aliasing and linear color modes.
  • Post-process fog, glow, bloom, color adjustment, …
  • Support for Physically-Based Rendering planned for the end of 2016.
  • Animate 2D or 3D. Visual animation editor with timeline.
  • Frame-based or cut-out animation for sprites and rigs.
  • Any property of any object can be animated, even function calls.
  • Use custom transition curves and tweens.
  • Helpers to animate 2D rigs, with skeletons and IK.
  • Efficient optimizer to pack imported 3D animations.
  • Animation Tree support for fluid character animation.
  • Python-like scripting language.
  • Built-in editor with syntax highlighting, real-time parser and code completion.
  • Powerful integrated debugger and profilers. Can debug a game running on mobile devices.
  • Integrated class documentation browser.
  • C++ API to optimize parts of the game or extend any part of the engine.
  • Godot works on Windows, OS X, Linux, FreeBSD, OpenBSD and Haiku. Editor runs in 32-bit and 64-bit, in all platforms.
  • Small download (around 20 MB), and you are ready to go.
  • Very easy to compile yourself in any platform (no dependency hell).
  • Filesystem usage is friendly to popular version control systems (Git, Subversion, Mercurial, PlasticSCM, Perforce, …).
  • Scene instancing makes teamwork a breeze, every team member can focus on their own scene. Be it a character, stage, … Edit without stepping on each other's toes.
  • Text-based descriptive and optimal scene format.
  • Script syntax supported by GitHub.

Compared to Leadwerks it has more features but Godots scripting language (GDScript) is has less performance than Leadwerks LUA script. However in the upcoming Godot 3.0 there will be performance improvements to GDScript and there will support for (kind of) importing C++ libs in to Godot in a very straight forward way called GDNative.

Summary

Both engines are good, so it is only a matter of taste, what are your need and what shortcomings can you live with. This is a very short post about two game engines but I hope this was enough for you to go and try them out.