Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Ogre3D and C++. It's time.

Author
Message
Yodaman Jer
User Banned
Posted: 19th Jun 2012 05:36
As many of you know, I've been programming for roughly 5 years this coming September. I started with DBC and moved up to DBP when it was free. I made some interesting projects (never finished a one!) and discovered I really, really liked making my own games.

After a while, I wanted to move on to OOP languages and learn the "professional" ways for game development. I looked into XNA but hated that it was for Windows only, because around that time I discovered Linux and Ubuntu. I then looked into cross-platform development, and found Panda3D. While promising at first, it proved to be very outdated and very weirdly handled. Python is definitely not a language designed for game development.

I tried Java and used engines such as jMonkey and LWJGL most recently, although there's almost NO tutorials on either of them. They just expect you to be able to pick up on the API after studying OpenGL tutorials (for C++, might I add, which is just confusing when you're trying to learn Java!). I love Java but if every game framework/engine for it has no tutorials, then what's the point?

Then I found it... Ogre!

I know some of you use it for your projects. I ran the samples and they are amazing. I looked at the tutorials; C++ no longer scares me. I'm getting very used to OOP languages these days after experimenting with Java and XNA!

I think it's finally getting me ready and willing to learn C++. And if my venture with it proves successful, then I'll have finally achieved my dream of "making it professional" with C++.

Does anyone have any projects with Ogre right now that they'd like to share? It's one awesome looking engine! I can't wait to start experimenting with it some.

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 19th Jun 2012 06:56
Well, I'm moving back over to DarkGDK now that's it's been 'refurbished', but I've used Ogre for quite a while.

I'd recommend you really get to know the engine and how it works before jumping in with developing a game. Learn how you attach entities to scene nodes, how to texture entities, load objects in, work out a way to convert your models into .mesh files.

I made the mistake of jumping in and found myself a bit overwhelmed with it. The hardest thing to get to grips with is the actual setup in my opinion. Sure, you can use the tutorial framework, but that's cheating. Just don't give up, if you can't get the window set up, or the renderer to render, just hop along to the posting competition and I'm sure either myself, Dar12 or TheComet will be able to help you.

The last thing I wrote with Ogre was a mesh manipulation class using hardware buffers, useful if you're making a game similar to minecraft.


They see me coding, they hating. http://indi-indicium.blogspot.co.uk/
Dark Java Dude 64
Community Leader
14
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 19th Jun 2012 07:12
Courtesy of TheComet, I have heard that ogre 3D and C++ is a lovely combo.

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 19th Jun 2012 10:33
Dark basic dude79 speaks the truth!

I started out with DBC back in 2005, two years later I bought DBP and developed games with it up until this day. I started to notice that I've outgrown the language, and it's limitations were beginning to bug me (no OOP, no cross platform, only uses one graphics API etc.)

That's when I started to look at C++ and SDL. That's another really epic library to use in conjunction with C++ if you want to develop 2D games. I wrote a few very simple programs (pong, tic tac toe). The more I wrote, the more I fell in love with the whole idea of OOP. I wanted to program in 3D though, so I looked at working directly with DirectX, which proved to be pretty complicated.

THEN came Ogre3D. I think everyone that tried it knows how awesome it is, so I won't have to elaborate too much on it.

I'd like to add that setting up Ogre3D was such a bitch, I'd argue that it takes longer to set up a C++ compiler with libraries than it takes to actually program the game. They are complicated things, and the information about it is very scattered. I think I have a good grasp on them now though.

TheComet

Isocadia
15
Years of Service
User Offline
Joined: 24th Jul 2009
Location:
Posted: 19th Jun 2012 15:54
I'm more of a fan of irrlicht to be honest, I find it alot less hard to get into Though I've tried OGRE and never got past the setup...
Yodaman Jer
User Banned
Posted: 19th Jun 2012 15:58
@Indicium:

Oh yeah, I don't expect to start making a fully-featured game with it anytime soon. I have to learn C++ first. Well, there is a Python port of it, but I'd rather learn C++.

@TheComet:

I may have to ask for directions on setting it up with Visual Studio 2010 Express. So far, I've only installed that and have just completed the download of Ogre. I have work in less than an hour so I'm not going to bother trying to set it up before then, I'll do that later.

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 19th Jun 2012 18:02
Sure, I think we're already on skype right? If not, here's my name : The__Comet

TheComet

heyufool1
16
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 19th Jun 2012 21:39 Edited at: 19th Jun 2012 22:32
I love it, currently working on a game like Animal Crossing. Though, I am terrible at shader coding so I'm running into some troubles with that.

- Demo!
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 19th Jun 2012 21:52
I would *love* to make a game like Animal Crossing. Too many game ideas, too little time


Senior Developer - CBS Interactive Music Group
heyufool1
16
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 19th Jun 2012 22:37 Edited at: 19th Jun 2012 22:38
Quote: "I would *love* to make a game like Animal Crossing."

It's great because there is no real story and the art is easy to produce, so it's mostly just programming. Can't get better than that

- Demo!
Yodaman Jer
User Banned
Posted: 20th Jun 2012 01:04
Quote: "I'd like to add that setting up Ogre3D was such a bitch, I'd argue that it takes longer to set up a C++ compiler with libraries than it takes to actually program the game."


Good God, I just completed the tutorial "Setting up your Application". It took me literally half an hour to JUST set up the program (granted that was because I was flipping through windows and reading instructions, but still!) for Visual Studio 2010. It all worked though, so I don't think I'll need the help after all.

You're right, it was a bitch.

I'd still like to talk on Skype sometime though. Ogre is very intriguing to me!

Dar13
17
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 20th Jun 2012 02:41
Ogre can be a real pain sometimes, but its power is unmatched compared to its price. I'd recommend that you take a look at the Beginner's Ogre Framework after you've monkeyed around with some basic stuff in Ogre(camera manipulation and all that jazz). Especially the rotation and positioning quirks that Ogre has(rotation is in quaternions[really funky math] and there are three different ways to position nodes/entities[world, parent, local]).

If you'd like to see how I've structured my game and handled Ogre(and a couple other libraries like OIS and Bullet Physics), check out my GitHub repository for WasTeLanD(link is in my sig).

Welcome to Ogre, hope you enjoy your stay! If you need any help, I'm available through e-mail and the posting competition.

Yodaman Jer
User Banned
Posted: 20th Jun 2012 07:59
The math doesn't scare me as much as it used too, but I'll definitely have to look into quaternions. I'm so used to just the X/Y/Z positioning from DBP that any other way really confuses me until I study it for a day or two.

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 20th Jun 2012 09:17
I think the whole idea of using inheriting nodes for positions and rotations in Ogre is genius.

Quote: "but its power is unmatched compared to its price"


Power = File Size / Price

TheComet

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 20th Jun 2012 16:53
If anyone is looking to learn C++ and create games at the same time I would recommend DarkGDK. You can program using basic commands and no oop at all, you can add the oop stuff into your projects as you learn it.

It worked for me anyway, C++ is a big leap and DarkGDK guides you into it gently. I have since tried OGRE and Irrlicht, once you are familiar with C++ it does make sense to use these libraries as a 'basic' library does not sit very well when using oop to its full capabilities imo.

ID numbers for example, they violate some oop concepts such as encapsulation. ID numbers being shared across a whole program can cause problems, you can set up a system to work around this but that is the point you should probably move to OGRE or Irrlicht imo.

ionstream
20
Years of Service
User Offline
Joined: 4th Jul 2004
Location: Overweb
Posted: 20th Jun 2012 23:24
I'm a big fan of Ogre, and I really appreciate how they changed the license recently to a BSD style permissive license. It's a great library with a ton of support and a great forum. I haven't touched it in a while though, so I'm curious to see what new features they have added.

Image All
19
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 20th Jun 2012 23:31
i haven't used Ogre and my C++ is noob-level, but it sounds like a good idea to me. i actually just started using Unity which is object-oriented and uses C# for scripting.

WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 21st Jun 2012 00:23
I deffo agree that Dark GDK is a good step up into the world of C/C++ for anyone who hasn't already had a background in the neat language. With Dark GDK you can learn C/C++ at your own pace because you already have the Dark Basic engine knowledge behind you.

I've been using IrrLicht a lot lately and it is real easy to use and I've already started building a full library for it from image handling to 3D mesh handling. The most important thing for me when it comes to IrrLicht is cross-platform.

Although some time ago I tried Ogre3D on recommendation but at the time my C++ OO knowledge was lacking somewhat. And I've been mainly a C coder since the Atari ST came out. Still for me, IrrLicht is completely free were with Ogre3D you need a license.

I'm also aware that both the IrrLicht and Ogre3D forums are very active which is always a bonus.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Dar13
17
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 23rd Jun 2012 00:24
Quote: "Still for me, IrrLicht is completely free were with Ogre3D you need a license."

Wherever you heard that, it's wrong. Ogre3D is completely open-sourced under the BSD license and doesn't require a license of any kind.

Quote: "Power = File Size / Price"

Then Ogre's power is undefined, as you can't divide by zero.

And I agree with that the arrangement of nodes for positions and rotations is great, it's just so different from DarkGDK or Irrlicht(not so much) that it takes some time to get used to.

Oh, and another thing, Ogre3D uses a right-handed coordinate system while DBC/DBPro/DGDK use a left-handed coordinate system. Just an FYI.

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 23rd Jun 2012 04:49
SceneNodes do make local rotations a lot easier though.


They see me coding, they hating. http://indi-indicium.blogspot.co.uk/
The Zoq2
15
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 23rd Jun 2012 10:59
So you are saying that if I want to learn C++, Dark GDK is a good place to start?
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 23rd Jun 2012 12:02
Quote: "So you are saying that if I want to learn C++, Dark GDK is a good place to start?"


I disagree with this statement. Dark GDK is a good place to start if you want to learn C. It doesn't teach you anything at all about OOP, and if it does, it teaches you bad habits. Dark GDK is meant to be used procedurally.

TheComet

Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 23rd Jun 2012 12:42
Quote: "It doesn't teach you anything at all about OOP"


This is correct, you need to learn OOP from another source but you can try things out using GDK and it guides you in gently.

With Irrlicht and OGRE you are thrown in the deep end(if you don't know oop), but I take TheComets point, perhaps being in the deep end will teach you faster.

GDK worked for me but I was learning C++ from a book and Java from a university course.

WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 23rd Jun 2012 20:11
If you've never worked with C or C++ before then GDK is probably the best step up you can make while you're getting used to it. It's easier to transfer your knowledge from DBP straight over to GDK and pick up the basics of the new language while you're at it.

Even being thrown into the deep end with IrrLicht or Ogre3D you'll have no hair left on your head at the end of a day or two, especially if you have only a basic knowledge of C or less and have never worked with OO either.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Yodaman Jer
User Banned
Posted: 24th Jun 2012 05:35
Yeah, I think I might check out DGDK... I've been at Ogre for the past three days and can't quite wrap my head around it. And the C++ tutorials I'm finding aren't the best.

Ogre is just so FAST though, it's amazing. I never knew the speed difference of C++ vs other languages until I found this. Just for the speed, I wanna learn it.

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 24th Jun 2012 11:51
Just a tip for everyone starting out with C++, I don't recommend diving directly into Ogre because it's pretty overwhelming. I recommend getting started with SDL, as it really teaches you the fundamentals of C++ programming, and it's a really great library to use.

SDL
Tutorials
more tutorials

Other cool, but optional libraries to extend SDL.

SDL_Image
SDL_ttf

Once you have a good hang of that, that's when you can move on to Ogre3D.

TheComet

ionstream
20
Years of Service
User Offline
Joined: 4th Jul 2004
Location: Overweb
Posted: 24th Jun 2012 12:33
SDL is a C library, so it does nothing to aid in learning C++ by itself. I think if you don't know the fundamentals of C++, you should not be touching a game programming or graphics library. Stick to the console for a while.

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 24th Jun 2012 12:45
Quote: "SDL is a C library, so it does nothing to aid in learning C++ by itself."


This doesn't mean you can't use it in an OOP style. The tutorial I linked does just that.

TheComet

ionstream
20
Years of Service
User Offline
Joined: 4th Jul 2004
Location: Overweb
Posted: 24th Jun 2012 12:55
Yes, but like I said, SDL does nothing to aid learning it by itself - you are just as well off using any C library or no library at all. DarkGDK would be just as suited as SDL.

budokaiman
FPSC Tool Maker
15
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 24th Jun 2012 15:15 Edited at: 24th Jun 2012 15:16
Quote: "Just a tip for everyone starting out with C++, I don't recommend diving directly into Ogre because it's pretty overwhelming. I recommend getting started with SDL, as it really teaches you the fundamentals of C++ programming, and it's a really great library to use."

NOOOOOOOOOOOOOOOOOoooooo *jumps between TheComet and CoffeeCoder*

Use SFML instead of SDL. SFML is the C++ version of SDL so it's better suited for OOP, and it's still being worked on.

http://sfml-dev.org/


3DS friend code: 0044-2895-5474
Dar13
17
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 24th Jun 2012 15:45
Quote: "And the C++ tutorials I'm finding aren't the best."

Are you using the Ogre Wiki tutorials?
Ogre3D Wiki

And about the whole learning OOP thing, I learned through cplusplus.com and cprogramming.com all the basics about classes, polymorphism, and some programming constructs(singletons,factories,managers,etc) but I only really learned how to handle OO libraries by using the libraries themselves. But it's taken me a couple of years to really grasp OOP and how I can use it effectively.

WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 24th Jun 2012 16:26 Edited at: 24th Jun 2012 16:28
I use many C and C++ libraries nowadays and know what I am doing with them, but I certainly would not recommend any new-comer to the language to dive in at the deep end...

I'm taking it that we're divided here on how some one should move on, whether they should dive straight into the deep end with Ogre or ease themselves in with their previous knowledge anyway and start with DGDK?

Personally my view is that anyone with a good background for DBP then DGDK is the better option to ease into the new language... It really does take some understanding to get your head around OO programming.

EDIT: Even while using DGDK you can build your experience by using other libraries as they become useful and needed.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Yodaman Jer
User Banned
Posted: 24th Jun 2012 16:42
@Dar13:

Yup, the Ogre3D Wiki/tutorials are fine, it's the actual C++ ones that are confusing me. I found two great sites though; cplusplus.com and learncpp.com. Currently using those.


@budokaiman:

I'm gonna have to learn SFML, it looks great! Thanks for the link!

Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 26th Jun 2012 23:10 Edited at: 26th Jun 2012 23:12
You have to learn how to tie your shoes before you can run a marathon! Learn the fundamentals of C++ from a console window so you can understand the concepts. The concepts of C++ can be very confusing, *without* all the complications of using a 3D game engine.

If you don't learn C++ properly, and you go back to coding procedurally in one giant file, then there's no point---

That's my advice, anyway.


Senior Developer - CBS Interactive Music Group
Yodaman Jer
User Banned
Posted: 27th Jun 2012 00:13
Oh yeah; I completely agree with you Jeku! I'm learning in nothing but the console window right now; I want to understand all of the fundamentals (OOP design, use, pointers, everything really) before I even start learning any type of engine. Otherwise, as you said, I fear I'd slip back into procedural programming. And that's EXACTLY what I'm trying to break away from as I find the OOP design to be more welcoming these days.

I actually just bought "Sams Teach Yourself C++ an Hour a Day" and it covers the new features of C++11. So far, it's been a great read.

Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 27th Jun 2012 00:18
If you want to really learn OOP one thing I'd recommend is doing some modding for UE, since the language is entirely OOP-based and while it's not as fully-featured as some language it gets you into the mindset.



Support a charitable indie game project!
Yodaman Jer
User Banned
Posted: 27th Jun 2012 00:41
Well, I've already gotten a little familiar with OOP as I've been experimenting with C# and Java for a couple of years now; C++ I touched once but ended up making everything procedural (I was trying to learn DGDK but it wasn't my cup of tea). I still will program in C#/Java after I learn C++ because they're great languages. I just wanna get C++ under my belt for use with Ogre.

Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 27th Jun 2012 21:23
Ogre looks great. I started playing around with it last year, ran all the demos and started playing with the tutorials. It was really impressive.

HOWEVER, learning C++ with DarkGDK was soooo much easier. If you know the DBP command set, then you know all the concepts and the only thing you have to learn as you're making your first game is C++. Learning C++ and a complex graphics engine at the same time is overkill for most people.

So what if you just code in one source file though? That's fine! You can learn syntax of function calls, if statements etc. and some basic library calls. Once you've got that down, you can then move onto learning about classes, inheritance, pointers etc.

As Jeku said, you shouldn't try to run before you walk imo.

Yodaman Jer
User Banned
Posted: 2nd Jul 2012 05:36
Oh yeah; I'm not just walking, but crawling/toddling in C++ at the moment.

Although I have to say, as much as I love Ogre, just for giggles I tried out Irrlicht. While the examples were not the best quality (seriously looked like DBC's demos... but ran so much better), it's SUPER easy to set up an Irrlicht project as opposed to Ogre's way of doing it. With Irrlicht, it's a 3-step process (add the include folder and lib folders to project in "VC++ Directories", run program to generate "Release" folder in the project folder, copy Irrlicht.dll to that folder. That easy!), whereas with Ogre it took me at least three times that amount to set up a simple project.

The code for Irrlicht is a little more my style as well, though Ogre is still quite nicely designed. I dunno, but with either engine I use I have to say I'm finally glad I'm learning C++!

Addendum! (without a post edit )

While I have been looking at both Irrlicht and Ogre tutorials, I am not currently attempting to make a game with them! I'm still reading through tutorials, using the Win32 Console to learn about the fundamentals of C++. Once I have a firm, FIRM grasp on those, THEN and only then will I start reading tutorials for either of those engines. Then expect some triple-A titles from yours truly*.


*Not really but it'd be nice.

Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 2nd Jul 2012 13:06 Edited at: 2nd Jul 2012 13:06
So long as you're using OOP (so that almost all of your code is in classes), you can't go wrong!

As far as learning C++ goes, you could make a C++ Minecraft map editor!

It's definitely tricky. The format is something like

region files contain a header of information, then 32x32 blocks (varying in size, but all being multiples of 4096 bytes with zeros on the end) of compressed chunk "files". You'll need to read the region header to locate the chunk data, take the data out for a single chunk (using iostream), decompress (tgz?) the data, and THEN you have a binary .nbt file.

The .nbt file is where the real object oriented programming comes in. The way it works is that NBT_Tags (as they're called) store all the data. There are different types of tags: Integers, floats, lists, and most importantly: compound tags. Compound tags and list tags can store other tags, so you get this great recursive structure!

You can have an abstract NBT_Tag object, which defines some basic functionality and some necessary functions (like "load_data", which would accept an istream object to read data from)

Since you can't have a pointer to an abstract class, I also had an "NBT_Object" class, which handles taking some NBT_Tag* foo, and calling foo->abc() on it, as well as handling destruction. (so you don't have to say "delete foo" everywhere)

So the NBT_Compound tag would have a vector of NBT_Objects, which you could access through things like "int NBT_Compound::length()", "NBT_Object NBT_Compound::at(n)", etc.

The loading functions can all be defined recursively, eg your code will be something like:



It's definitely more advanced but you'll learn a helluvalot!

WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 5th Jul 2012 06:27
Just yesterday I finally installed IrrLicht and CodeBlocks on my fresh install of Linux Mint. After a bit of faffing about, all but one of my pieces of code compiled and ran at the same speed on Linux as they did on Windows. So for my next serious project I'm definitely considering using IrrLicht for cross platform...

Now I have dual boot Windows and Linux.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!

Login to post a reply

Server time is: 2025-05-18 15:25:27
Your offset time is: 2025-05-18 15:25:27