We are still actively working on the spam issue.

Difference between revisions of "Game programming"

From InstallGentoo Wiki
Jump to: navigation, search
m (APIs/Libraries: Fixed greentext. Also, pls, <br> needs to be <br />)
 
(29 intermediate revisions by 8 users not shown)
Line 1: Line 1:
I will fill in this page later if someone else doesn't.
 
There is merit to this. It's sometimes difficult to find the right libraries or resources required for video games. Though I doubt this will be very useful, it's still necessary. --[[User:Fontain|Fontain]] ([[User talk:Fontain|talk]]) 20:18, 27 January 2014 (EST)
 
 
== Basics ==
 
 
Game programming is complicated. It can also be a great way to practice your language. Before you even think about any serious game/multimedia programming, you should know the language that you're going to use to a decent extent.
 
Game programming is complicated. It can also be a great way to practice your language. Before you even think about any serious game/multimedia programming, you should know the language that you're going to use to a decent extent.
  
 
Aside from the programming itself, a good game needs decent graphics, sound/music, and story. Just having "ideas" for your game isn't good enough, but can be a good start.
 
Aside from the programming itself, a good game needs decent graphics, sound/music, and story. Just having "ideas" for your game isn't good enough, but can be a good start.
  
Another important point: Making your own "engine". Don't. Or at least, don't in the way that you think you're going to: Don't try to visualize the perfect game and then make an engine around it. An engine, especially for someone that programs unprofessionally, is something that is built on, and added to. The features of an engine should be able to apply to many different aspects - they should be reusable. [Will add some good links about engines in general later]
+
Another important point: Making your own "engine". Don't. Or at least, don't in the way that you think you're going to: Don't try to visualize the perfect game and then make an engine around it. An engine, especially for someone that programs unprofessionally, is something that is built on, and added to. The features of an engine should be able to apply to many different aspects - they should be reusable.
  
 +
== Engines ==
  
== APIs/Libraries ==
+
A game engine is a collection of framework and libraries that manage all the aspects of game development (physics, rendering, networking, etc.). They usually come with a scripting language to allow you to program the behavior of the different components, and some come with an editor that allow you to visualize these components in a graphical interface.
/g/'s general recommendations:
 
  
Pleb tier: "Game Engines" such as Unity/UDK/CryEngine. Seriously, don't use these. It is just a waste of your time when you could be learning programming and actual game development.
+
=== C# ===
 +
C++ is generally suggested over C#, but C# is by no means ''bad''. Especially if you're a beginner, C# lets you not have to deal with as much memory management as C++, and C# has helpful frameworks available. Note that in managed code, garbage collection is your enemy. You'll have to take special care in writing performance critical code to limit GC allocations. C# is extremely useful for tools development (e.g. level editors).<br />
 +
* [https://unity3d.com Unity] is one of the most popular game engines out there. It features an editor and uses C# as its main scripting language. It is also responsible for most of the trash and shovelware that was released on Steam since the dawn of Steam Greenlight, mainly because it is very easy to learn (the official website provides some decent tutorials). The basic license is free but requests that you use the default Unity splash screen.
 +
* [http://www.monogame.net/ MonoGame]
  
Java: JmonkeyEngine. BSD license. There is a myth that Java is too slow for games. This is entirely false. It was true in the early 2000s, but with modern techniques java code is as fast as native code. Don't listen to people who tell you otherwise, or just do a quick google search and see for yourself that java is not slow.<br>
+
=== C ===
<span style="color:#789922">>but muh buttcraft is laggy on my netbook, java must be slow</span> <br />
+
* [https://www.libsdl.org/ SDL]
Notch is a decent programmer, but took some shortcuts in optimization.
+
* [http://liballeg.org/ Allegro] - targets a very old version of OpenGL, useful for making games compatible with Windows 95 - XP.
  
'''C++ graphics libraries:''' <br>
+
=== C++ ===
'''2D''': [http://www.sfml-dev.org/ SFML] <br>
+
* [https://www.unrealengine.com Unreal Engine] was paid until May 2015, but, following the success of Unity, it picked the same business model (free with a few restrictions that should not bother hobbyists). Like Unity, it features a powerful editor. Unlike Unity, it uses C++ as its main scripting language. It also features visual graph-node scripting called Blueprints if you're a brainlet. Unreal Engine's source code is available to anyone with an Epic Games account.
'''3D:''' [http://www.ogre3d.org/ Ogre3D], [http://irrlicht.sourceforge.net/ Irrlicht]
+
* [http://www.sfml-dev.org/ SFML], a 2D graphics library.
 +
* [http://www.ogre3d.org/ Ogre3D], a 3D graphics library.
 +
* [http://irrlicht.sourceforge.net/ Irrlicht], another 3D graphics library.
  
'''Physics Engines:'''<br>
+
=== Lua ===
[http://bulletphysics.org/wordpress/ Bullet Physics Library] <br>
+
* [https://love2d.org LÖVE] is an open source game engine geared toward 2D games development. It uses Lua as a scripting language and is simple to learn and use, making it well suited for beginners.
[http://box2d.org/ Box2D]
 
  
OpenGL-based libraries are suggested as it has the capability of being multi-platform, unlike DirectX (ex: Direct3D).
+
=== Python ===
 +
* [https://www.pygame.org Pygame] is the same as above but with Python as a scripting language.
  
C#: C++ is generally suggested over C#, but C# is by no means ''bad''. Especially if you're a beginner, C# lets you not have to deal with as much memory management as C++, and C# has helpful frameworks available.
+
=== Java ===
Although C# can be a convenient way to make applications that assist in your overall game, ex: a Mapper
+
Java is pajeet tier but usually fast enough for games. For Android don't work in Java; you'll want to use the native api (NDK).
 +
* [https://libgdx.badlogicgames.com/ libGDX]
 +
* [http://jmonkeyengine.org/ JMonkeyEngine]
  
Python: PyGame
+
=== Other ===
 +
* [https://godotengine.org/ Godot] is a FOSS game engine. Its features are comparable to Unity.
  
Note that many scripting languages can be used on top of the base engine, ex: AngelScript
+
=== Physics Engines ===
 +
* [http://bulletphysics.org/wordpress/ Bullet Physics Library]
 +
* [http://box2d.org/ Box2D]
  
All of the libraries listed above are licensed under free licenses.
+
OpenGL-based libraries are suggested as it has the capability of being multi-platform, unlike DirectX (ex: Direct3D).
  
+
== Game Jams ==
  
Graphics, Physics, Audio, Networking, etc.
+
A game jam is a challenge asking you to develop an entire video game in a very limited time spawn. They are a very good opportunity to hone your game programming skills, as well as to have fun.
 +
 
 +
* [https://ldjam.com/ Ludum Dare] is one, if not the most popular game jam, running since 2002 and occurring every 4 months. It lasts either 48 hours or 72 hours depending on if you are participating solo or as a team.
  
 
== More Resources ==
 
== More Resources ==
*http://en.wikipedia.org/wiki/Game_programming
+
*[[Wikipedia:Game_programming]]
 
*http://gpwiki.org/
 
*http://gpwiki.org/
 
*http://www.gamedev.net/
 
*http://www.gamedev.net/
 
*http://programmers.stackexchange.com/
 
*http://programmers.stackexchange.com/
 
*http://boards.4chan.org/vg/catalog#s=agdg
 
*http://boards.4chan.org/vg/catalog#s=agdg
 +
 +
[[Category:Programming]]
 +
[[Category:Gaming]]

Latest revision as of 15:54, 7 June 2018

Game programming is complicated. It can also be a great way to practice your language. Before you even think about any serious game/multimedia programming, you should know the language that you're going to use to a decent extent.

Aside from the programming itself, a good game needs decent graphics, sound/music, and story. Just having "ideas" for your game isn't good enough, but can be a good start.

Another important point: Making your own "engine". Don't. Or at least, don't in the way that you think you're going to: Don't try to visualize the perfect game and then make an engine around it. An engine, especially for someone that programs unprofessionally, is something that is built on, and added to. The features of an engine should be able to apply to many different aspects - they should be reusable.

Engines

A game engine is a collection of framework and libraries that manage all the aspects of game development (physics, rendering, networking, etc.). They usually come with a scripting language to allow you to program the behavior of the different components, and some come with an editor that allow you to visualize these components in a graphical interface.

C#

C++ is generally suggested over C#, but C# is by no means bad. Especially if you're a beginner, C# lets you not have to deal with as much memory management as C++, and C# has helpful frameworks available. Note that in managed code, garbage collection is your enemy. You'll have to take special care in writing performance critical code to limit GC allocations. C# is extremely useful for tools development (e.g. level editors).

  • Unity is one of the most popular game engines out there. It features an editor and uses C# as its main scripting language. It is also responsible for most of the trash and shovelware that was released on Steam since the dawn of Steam Greenlight, mainly because it is very easy to learn (the official website provides some decent tutorials). The basic license is free but requests that you use the default Unity splash screen.
  • MonoGame

C

  • SDL
  • Allegro - targets a very old version of OpenGL, useful for making games compatible with Windows 95 - XP.

C++

  • Unreal Engine was paid until May 2015, but, following the success of Unity, it picked the same business model (free with a few restrictions that should not bother hobbyists). Like Unity, it features a powerful editor. Unlike Unity, it uses C++ as its main scripting language. It also features visual graph-node scripting called Blueprints if you're a brainlet. Unreal Engine's source code is available to anyone with an Epic Games account.
  • SFML, a 2D graphics library.
  • Ogre3D, a 3D graphics library.
  • Irrlicht, another 3D graphics library.

Lua

  • LÖVE is an open source game engine geared toward 2D games development. It uses Lua as a scripting language and is simple to learn and use, making it well suited for beginners.

Python

  • Pygame is the same as above but with Python as a scripting language.

Java

Java is pajeet tier but usually fast enough for games. For Android don't work in Java; you'll want to use the native api (NDK).

Other

  • Godot is a FOSS game engine. Its features are comparable to Unity.

Physics Engines

OpenGL-based libraries are suggested as it has the capability of being multi-platform, unlike DirectX (ex: Direct3D).

Game Jams

A game jam is a challenge asking you to develop an entire video game in a very limited time spawn. They are a very good opportunity to hone your game programming skills, as well as to have fun.

  • Ludum Dare is one, if not the most popular game jam, running since 2002 and occurring every 4 months. It lasts either 48 hours or 72 hours depending on if you are participating solo or as a team.

More Resources