Small simple open source example game

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
FedorIsHere
Kobold
Posts: 25
Joined: Wed Sep 20, 2023 6:05 am
x 8

Small simple open source example game

Post by FedorIsHere »

Does anyone have a link to a small open source game to be used to learn more about Ogre3D?

I did find the code for Stunt Rally, but that is quite big and it would take very long to go through that code. A small game with just a few scripts would be great. The game would show basic stuff like how to load resources, how to animate models, how to handle the game loop, how to use sound and how to handle user input.

Subham Burnwal
Kobold
Posts: 37
Joined: Wed Sep 20, 2023 8:24 am
x 1

Re: Small simple open source example game

Post by Subham Burnwal »

Please maybe upvote this post so it stays hot and people notice it. FYI I am working on one and will link it when its properly done.

professor_oats
Gnoblar
Posts: 11
Joined: Sat Jul 22, 2023 1:27 pm
x 2

Re: Small simple open source example game

Post by professor_oats »

Hi!

I will too make a game project in OGRE so finding the source for Stunt Rally is valuable.

I imagine you may still find what you look for inside the source since the methods you describe has to be done for both smaller and bigger sized projects.

Loading resources (like textures, materials, compositors) are gone through in the OGRE tutorial pages:
https://ogrecave.github.io/ogre/api/lat ... rials.html

What they do in Stunt Rally is that they make a listener for resources in their app:
https://github.com/stuntrally/stuntrall ... Create.cpp

Then they have the data folder where they have the materials and then, I suspect they define the use of materials in code and handle it with pointers, seen in the CGame.cpp - line 152.

When it comes to model animation I bet (or hope) that there is a little freedom and wiggle room in how to approach. OGRE comes with support to export skinned models that you can make in Blender and other programs:
https://ogrecave.github.io/ogre/api/14/_animation.html

Also I yesterday looked into this thread since it looked interesting:
viewtopic.php?t=73261

For finding out game loop I would start going through the main.cpp and also the ../vdrift/game.h to find out where the loop is defined.
That is my thought process.

I myself am currently learning on how to handle user inputs like KeyboardEvent and to link that with the updates of frame. The tutorials work fine to get started and now I better up my foundational C++ understanding through books to get better at developing what I want.

A recommendation is that if you want to develop game projects and you have trouble in writing game loops you can gain further understanding finding tutorials on YouTube where they code games in OOP. I followed a tutorial on a Pac-Man clone in Javascript recently that was educative and fun.

See if you can find more materials in the forum threads here and about handling inputs with OGRE I think
CharacterSample.h SinbadCharacterController.h SdkSample.h
can be beneficial to look into.

User avatar
sercero
Bronze Sponsor
Bronze Sponsor
Posts: 479
Joined: Sun Jan 18, 2015 4:20 pm
Location: Buenos Aires, Argentina
x 167

Re: Small simple open source example game

Post by sercero »

You might be interested in Advanced Ogre Framework: viewtopic.php?t=51994

I am using it for my engine and it is very useful as a starting point.

Also this site has very useful information on how to create your own engine: https://gameprogrammingpatterns.com/

In the Bullet Physics wiki there is a place where they have an example canonical game loop with integrated physics.

This engine is based on OGRE and was created by the Bullet Physics author, it has native Blender integration: https://github.com/gamekit-developers/gamekit

An editor for OGRE: https://github.com/edherbert/Rockpool

Other important topics:

STATE:

http://gamedevgeek.com/tutorials/managi ... ates-in-c/
http://www.ogre3d.org/tikiwiki/tiki-ind ... +with+OGRE
http://www.ogre3d.org/tikiwiki/tiki-ind ... te+Manager
http://www.ogre3d.org/tikiwiki/tiki-ind ... =Tutorials
http://www.ogre3d.org/tikiwiki/tiki-ind ... =Tutorials
http://gameprogrammingpatterns.com/state.html

GAME LOOP:

http://bulletphysics.org/mediawiki-1.5. ... _Game_Loop
https://gafferongames.com/post/fix_your_timestep/
http://gameprogrammingpatterns.com/game-loop.html
http://www.mindcontrol.org/~hplus/graph ... _loop.html

User avatar
EricB
Bronze Sponsor
Bronze Sponsor
Posts: 360
Joined: Fri Apr 09, 2010 5:28 am
Location: Florida
x 213

Re: Small simple open source example game

Post by EricB »

sercero wrote: Tue Oct 31, 2023 12:57 pm

You might be interested in Advanced Ogre Framework: viewtopic.php?t=51994

I can also highly recommend Advanced Ogre Framework. I used it in GearCity, GearCity: 2nd Gear, and a couple unreleased vaporware projects. It's a very good starting point for any project.

Image