Skip to content

Coding Introduction / Tutorial, mostly by writing small little fun games

Notifications You must be signed in to change notification settings

albertz/Coding-Game-Intro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 

Repository files navigation

Description

This is somewhat a coding tutorial / introduction. The best way to learn to code is of course just to actually code. The most fun way to start coding is by writing small little games.

This repository contains various resources for doing exactly that. (It's mostly a work-in-progress at the moment. Just look around what's already there. It might already be helpful.)

Coding games actually covers a lot of topics, like AI, cross-platform, low-level, graphics, audio, networking, and more. Read here why game development is a great learning playground.

With some little coding knowledge, it also makes sense to take existing Open Source games as a base. You can either join their team, or just take the code and extend it for yourself. In any case, the project team people will most likely be very happy to introduce you to their code and help you to extend it by some fun idea of you.

Programming language

The programming language doesn't really matter that much. Don't be scared about C++. It isn't really that complicated. Or maybe Rust, or Nim, or some of the other newer native languages. Python is of course also a very good starting language. But this tutorial here is not about a programming language comparison. You will find many such comparisons via Google. And many people also have different opinions about it.

Some simple game ideas

Useful libraries

C++ comes with its own standard template library (STL). And you can use all of the C library. However, that only covers some standard structures (string, list, map, set, ...), file IO, and some more. Then, your OS usually comes with its own libraries, for doing anything more complex, like writing GUIs, graphics, sounds, etc. The OS libraries are usually OS dependent and Windows, Linux and MacOSX differ a lot from each other. If you want your game to be runable on many different systems, there are many cross-platform libraries which you can use. Just avoid using anything from the OS libraries directly and use some cross-platform library instead to do graphics, sounds, networking, etc.

Here are some useful ones, for C++.

  • Raylib. Very simple, more recent.
  • SDL. Very simple, has a lot of functionality, and supports many many platforms. Somewhat low-level, 2D graphics, OpenGL, sound, input event, GamePad support, etc. This is the most famous and often used game library.
  • Allegro. Somewhat like SDL, but a bit less features and a bit less often used. It's slightly more high level than SDL.
  • GLFW, GLEW. Mostly for OpenGL.
  • PhoenixCore. 2D OpenGL based drawing library.
  • NanoVG. OpenGL based 2D vector drawing library.
  • skia - 2D Graphics Library. Read also here.
  • Troll2D (2008). Simple 2D game engine.
  • SFML. Multimedia library, system, window, 2D graphics, audio, network. SFGUI or TGUI for GUI.
  • Fast Light Toolkit (FLTK). Comes with many GUI widgets.
  • librocket
  • Picasso graphic (2013)
  • Polycode. OpenGL, with Lua scripting.
  • Angel2D. Big and powerful. Maybe overkill.
  • Torque2D. Big and powerful. Maybe overkill.
  • Godot Engine. Maybe overkill.
  • Unity or Unreal are the big commercial ones. Maybe overkill. Also not fully open source licences.
  • Ogre. 3D graphics rendering engine. Probably overkill for the beginning.
  • Proton SDK. Might be overkill.
  • Rainbow. Might be overkill.
  • ClanLib SDK. OpenGL, GUI framework, network engine, physics, etc. Might be overkill.
  • openFrameworks
  • Lua. Most famous embedded scripting language, very often used in games. Also very fast.
  • Box2D. 2D physics engine.
  • OpenAL. For 3D sound.
  • Gameplay3D, full framework.
  • Qt. This is more for standard GUI application development, not so much for games. You probably don't need/want that for a game. However, in the application development world, this is probably the most important library.
  • EntityX. Fast, type-safe C++ Entity Component System. Article 'Evolve Your Hierarchy' covering the theory of Entity Component Systems (ECS).
  • Protogame asset management. Protogame itself is Mongo-based. But it has some nice concepts.
  • Some GUI frameworks: CEGUI (OpenGL, MIT license), MyGUI (MIT license), OtterUI, Agar, OUI, Turbo Badger, blog post summary, IMGUI, GLIMGUI, GWEN, Guichan

Other relevant non-C++ frameworks:

Existing Open Source games as a good project base

See also these lists:

Assets / artwork / graphics / sounds for your game

You can create your own graphics and sounds. Some useful tools:

There are some useful existing resources you can use:

Other tutorials

Forums / Other references

Game coding competitions

There are a few game coding competitions, where you have to code a full small game in a very short time, like 24 hours, or 72 hours, or maybe a week.

Some developers, such as Notch, sometimes make their coding screencast publicly available. This is often very entertaining and rewarding to watch. You will most probably learn a lot. And you will see how other developers are developing a small game in a short time.

Many developers write some post mortem about their development during such competition. This is interesting because it shows you what tools to use to develop a fun game in a short time period.

About

Coding Introduction / Tutorial, mostly by writing small little fun games

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages