Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GX Platformer Tutorial
#1
I've had a couple of requests to do a tutorial for building a 2D platformer in GX

What is GX? 
Well, it's a game engine that I started work on a few years ago, back in the qb64.org days. The first post was back in December of 2021.  In the process of working on several 2d game projects I was noticing that I was needing to write a lot of game "plumbing" for each project.  I wanted to see if it would be possible to create a generic game API and engine for QB64 that could support a number of different types of 2D games (platformers, top down, isometric strategy, etc.).  GX was the result of that effort.

The goal of the project is to create a flexible, event-based game engine. Based on your game requirements you can use as much or as little of it as you need, but the engine will take care of the main tasks of managing the game loop and screen buffering for the display.  The current version has support for:
  • Scene(viewport) management
  • Entity(sprite) management
  • Tiled map creation and management
  • Bitmap font support
  • Collision detection
  • Basic physics/gravity
  • Device input management
  • Keyboard, mouse, and game controller
  • Interactive debugging
  • Export to Web
That last bit, "Export to Web" got the most initial interest and was the starting point for what would eventually become QBJS.

The Tutorial
My idea for the tutorial is to build this little game below over the course of several posts, starting from scratch and building it step-by-step, highlighting the various features of the engine along the way.  If you want to try it out now press play and use the arrow keys to move and space bar to jump:


About the Source
This sample includes all of the code needed for building the game in QB64, so you can also download the attached simple-platformer.zip, export the contents and build it with QB64(PE).  Strictly speaking, the contents of the "lib" directory are only needed for building the game in QB64 as QBJS has the GX engine already included.  All of the included artwork is from opengameart.org.

I would love to have feedback along the way (positive or negative).  I know there are a lot of experienced game developers here and would value any experiences and suggestions that could make the engine better.


Attached Files
.zip   simple-platformer.zip (Size: 86.85 KB / Downloads: 348)
Reply


Messages In This Thread
GX Platformer Tutorial - by dbox - 03-05-2025, 02:01 AM
RE: GX Platformer Tutorial - by grymmjack - 03-05-2025, 01:28 PM
RE: GX Platformer Tutorial - by dbox - 03-05-2025, 07:19 PM
RE: GX Platformer Tutorial - by dbox - 03-06-2025, 01:45 AM
RE: GX Platformer Tutorial - by dbox - 03-07-2025, 08:58 PM
RE: GX Platformer Tutorial - by madscijr - 03-08-2025, 12:32 AM
RE: GX Platformer Tutorial - by dbox - 03-08-2025, 02:24 AM
RE: GX Platformer Tutorial - by dbox - 03-08-2025, 06:03 AM



Users browsing this thread: 10 Guest(s)