Where is the code which runs on sample browser?

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Brown
Gnoblar
Posts: 5
Joined: Sat Dec 21, 2024 11:37 am

Where is the code which runs on sample browser?

Post by Brown »

Hi, I'm new in the field of game development. I wanted to learn some basic game development techniques. To start I first started learning OpenGL because it is open then found out that it is better to start with a game engine which is Object Oriented rather procedural in nature and then I stumbled upon OGRE. I found it quite helpful and it enabled me to compile code in Linux(Ubuntu) which was a pain before CMake introduction in OGRE. Before I use to compile via command line which was not fun. So, I wanted to thank you people for making it open source and now the important question where is the code which I can compile and play myself which I can view in ogre browser. Thanks in advance!

rpgplayerrobin
Orc Shaman
Posts: 710
Joined: Wed Mar 18, 2009 3:03 am
x 391

Re: Where is the code which runs on sample browser?

Post by rpgplayerrobin »

I guess you are asking about which file you can alter to play around yourself by using the sample browser?

In that case, you can alter any of the samples, for example, the Cube Mapping sample is located at:
ogre-14.3.2\Samples\Simple\include\CubeMapping.h

It is a bit hard to find it in the compiler, but just drag it into it and then you can adjust what you want there.

Brown
Gnoblar
Posts: 5
Joined: Sat Dec 21, 2024 11:37 am

Re: Where is the code which runs on sample browser?

Post by Brown »

Thanks for the reply @rpgplayerrobin ,

You get it right. I want to explore the code which generated all those samples in the sample browser. I can see SinbadSampleCharacter.h but I want to see the code written for movement, jump etc. I want to explore all those codes available. I couldn't find the cpp file which is responsible for creating the samples. It must be a file but which one generated each of those sample codes? For example, one for Ogre animation and attack, one for quake arena model etc. Because it will give a hands-on experience on how everything is created in a game. Thanks in advance.

Brown
Gnoblar
Posts: 5
Joined: Sat Dec 21, 2024 11:37 am

Re: Where is the code which runs on sample browser?

Post by Brown »

Thanks for the reply @rpgplayerrobin ,
As I'm new to Ogre I didn't understood your answer at first glance. You're right. All the code I want to play with is in Samples Directory. Sindbad in action is also there. Now, I've to copy paste all the sample code in my directory and create main file for all the sample and create objects and call setup method of all the sample. For newbie like me who is new to Ogre wanted something like below.

//main.cpp
#include "sample_character.h"

int main(){
SampleCharacter* objSampleCharacter;
objSampleCharacter = new SampleCharacter();
objSampleCharacter->setup();
objSampleChracter->clearup();
return 0;
}

I should have posted this question in the newbie section. Appologies!