NcJump devlog #0
Last month I decided to work on ncJump, a project with a new engine: nCine, an open-source C++ framework for 2D games developed by @encelo.
Some time ago, a bunch of members of the GameLoop community followed CS50’s introduction to game development, and I though the sequence of games presented in this course could give me a good insight on what kind of game to create.
A couple of developers have already made or started to make the first few games listed by that course. There is a Pong clone made by @encelo, a Flappy Bird clone made by @Vasile-Peste, and a Breakout clone under development by @mat3. I opted for a Super Mario Bros clone.
The idea was to follow the steps of CS50’s lecture 4 by using nCine instead of Love2D.
Some steps are required in order to start developing a game, but luckily everything you need to know is documented on the nCine download web-page. I installed nCine, cloned ncTemplate, and started working on top of it.
Writing down some code
The main thing to consider from a software design perspective is that I renamed MyEventHandler
to JumpHandler
and introduced a Game
class. While JumpHandler
acts as a bridge between the game and the engine, Game
is the nucleus of the project and it is responsible for the lifetimes of its objects and the logic of the application.
Then I proceeded implementing an Entity
class following the idea of an Entity component system. The entity can have components like a graphics sprite, a finite state machine, or a body for physics and collisions.
A GUI is mandatory to quickly iterate on new elements as they are added to the game, both to have a visual feedback when debugging is needed and to tweak all sort of values and configurations at run-time. For this, I introduced an Editor
class, which makes an heavy use of @ocornut’s Dear ImGui, also provided directly by nCine.
Box2D is my choice for 2D physics and collisions. It is made by @erincatto and it is very easy to use.
I spent the last weeks implementing some key Entity states: idle, move, jump, and fall. In my opinion they are the foundations of the whole gameplay and I believe the result is good enough to move on to the next steps, but for those you will need to wait for the next devlog, so stay tuned!
ncJump
A jumping project
Status | Prototype |
Author | Fahien |
Genre | Platformer |
Tags | 2D, Experimental, jumping, ncine, Pixel Art, Singleplayer |
Languages | English |
More posts
- NcJump devlog #7May 26, 2021
- NcJump devlog #6Apr 21, 2021
- NcJump devlog #5Apr 12, 2021
- NcJump devlog #4Apr 11, 2021
- NcJump devlog #3Apr 09, 2021
- NcJump devlog #2Mar 29, 2021
- NcJump devlog #1Mar 28, 2021
Leave a comment
Log in with itch.io to leave a comment.