XCode OpenGL Game Engine

Apprentice
Posts: 10
Joined: 2008.08
Post: #1
I'm new to XCode, and I have an idea for a game engine that I would like to build, using OpenGL, and Objective C. Could anyone here give me some tips on getting started on it? Also if you want to help a little with it I can email you the project folder so you can take a look at it.
Quote this message in a reply
Member
Posts: 215
Joined: 2008.06
Post: #2
MoltenWhale Wrote:I'm new to XCode, and I have an idea for a game engine that I would like to build, using OpenGL. Could anyone here give me some tips on getting started on it? Also if you want to help a little with it I can email you the project folder so you can take a look at it.

First off, I would recommend researching what a 'game engine' entails. Once you have figured out what you need to build, you should sit down and plan out what you need before you create any code. This may seem like overkill, but it will really help you in the long run (trust me Rasp). You're going to need to be at least proficient, if not an expert, in OpenGL and C in general. I would also suggest adopting a Object Oriented base such as C++ or Objective-C (the latter, IMHO). Hope that helps.

Mac users swear by their computers, PC users swear at their computers. ~Unknown

iSayz
Quote this message in a reply
Apprentice
Posts: 10
Joined: 2008.08
Post: #3
Talyn Wrote:First off, I would recommend researching what a 'game engine' entails. Once you have figured out what you need to build, you should sit down and plan out what you need before you create any code. This may seem like overkill, but it will really help you in the long run (trust me Rasp). You're going to need to be at least proficient, if not an expert, in OpenGL and C in general. I would also suggest adopting a Object Oriented base such as C++ or Objective-C (the latter, IMHO). Hope that helps.

I've already done that I just don't know how to start coding it, where do I start coding it?
Quote this message in a reply
Member
Posts: 312
Joined: 2006.10
Post: #4
If you have all ready designed it, then this shouldn't be a hard question for you..

We can't really answer your question, it's too broad. It's like if someone asked you where your house was and you said America.
Quote this message in a reply
Moderator
Posts: 1,562
Joined: 2003.10
Post: #5
How proficient are you in C-based languages? Have you used other development environments than Xcode? Where specifically in the process are you getting stuck? Have you read http://developer.apple.com/gettingstarted/ ?
Quote this message in a reply
Member
Posts: 215
Joined: 2008.06
Post: #6
MoltenWhale Wrote:I've already done that I just don't know how to start coding it, where do I start coding it?

Perhaps we have mis-interpreted your question... Are you asking how to set up a project, create new files, and prepare frameworks OR are you seeking advice and algorithm's to perform your functions OR are you unsure of how to use C/C++/Obj-C or whatever you are using to create your engine?

Mac users swear by their computers, PC users swear at their computers. ~Unknown

iSayz
Quote this message in a reply
Apprentice
Posts: 10
Joined: 2008.08
Post: #7
Talyn Wrote:Perhaps we have mis-interpreted your question... Are you asking how to set up a project, create new files, and prepare frameworks OR are you seeking advice and algorithm's to perform your functions OR are you unsure of how to use C/C++/Obj-C or whatever you are using to create your engine?

A good game engine is hard to make, what Im not sure about is how to start programming it, do I start making the models, or the tools, or what? Also how high could I get the graphics using OpenGL?
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #8
How much do you know, MoltenWhale? What kind of programming experience do you have?

We can't really even begin to answer your questions without knowing your experience level, your knowledge of the requisite mathematics, languages, etc etc. If you can give us an idea of what kind of programming you've done in the past, we might be able to start pointing you in the right direction.
Quote this message in a reply
⌘-R in Chief
Posts: 1,265
Joined: 2002.05
Post: #9
MoltenWhale Wrote:I've already done that I just don't know how to start coding it, where do I start coding it?

main()


Rolleyes
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #10
MoltenWhale Wrote:A good game engine is hard to make, what Im not sure about is how to start programming it, do I start making the models, or the tools, or what?

I started by writing a materials framework, lots of GLSL, octrees for visibility determination, a pile of reusable maths ( vec2/vec3/vec4/mat4/quat/plane/frustum/etc/etc/etc/etc/etc), parametric mesh generators, .obj model loaders, and you get the idea.

Really, I started in 2003 by buying the red book and getting my feet wet in GL. My first real opengl app was the canonical teapot, sprouting a recursively generated tree-of-tubes from its spout. The tubes gently swayed. It was very cool to me at the time.

Then I wrote a robotics simulator, using what I'd learned, and it was primitive, but good.

Then I tried to write a game, and wrote thousands of lines of code and made a pretty fun driving game, but realized I didn't know what I was doing and had lots of memory corruption errors. So I threw it all away, and went to the drawing board and started actually architecting a framework that I could use for robotics and games.

And two years later, I'm still working on it, and having a great time.

MoltenWhale Wrote:Also how high could I get the graphics using OpenGL?

Pretty good. Doom3, Quake4, Rage, anything on the PS3.
Quote this message in a reply
Apprentice
Posts: 10
Joined: 2008.08
Post: #11
TomorrowPlusX Wrote:I started by writing a materials framework, lots of GLSL, octrees for visibility determination, a pile of reusable maths ( vec2/vec3/vec4/mat4/quat/plane/frustum/etc/etc/etc/etc/etc), parametric mesh generators, .obj model loaders, and you get the idea.

Really, I started in 2003 by buying the red book and getting my feet wet in GL. My first real opengl app was the canonical teapot, sprouting a recursively generated tree-of-tubes from its spout. The tubes gently swayed. It was very cool to me at the time.

Then I wrote a robotics simulator, using what I'd learned, and it was primitive, but good.

Then I tried to write a game, and wrote thousands of lines of code and made a pretty fun driving game, but realized I didn't know what I was doing and had lots of memory corruption errors. So I threw it all away, and went to the drawing board and started actually architecting a framework that I could use for robotics and games.

And two years later, I'm still working on it, and having a great time.



Pretty good. Doom3, Quake4, Rage, anything on the PS3.

Well ok, tell me if this is possible, my game engine I want to make it have a preset library. It has different categories, with un-textured models of walls spheres, etc that you could move around reshape, and texture to make a house or a building or anything else. Is that able to be done or not?
Quote this message in a reply
Member
Posts: 715
Joined: 2003.04
Post: #12
MoltenWhale Wrote:A good game engine is hard to make, what Im not sure about is how to start programming it, do I start making the models, or the tools, or what? Also how high could I get the graphics using OpenGL?

You are starting on a long hard road.
There are several already made game engines, do you really need to reinvent the wheel?

If you are serious about going this route, you need to buy a book and move through it step by step, you need to go through all the Xcode tutorials that you can. There simply is no way to get all the answers from a forum.

Models and tools are not your priority until you have an understanding of the programming.

I suggest investing time in a pre-made engine like iGame3D, Unity, dim3, Director, Flash, Torque or one of several others I can't think of the names right now. At least then you don't have to completely reinvent the wheel, you can just get on the bus so to speak.

If you continue down this road be aware there is a high probability of burn out, often and frequently, and each time you get fried there is the higher probability of not continuing what you started. Better to have something you can pick up the book you bought and continue from where you left the bookmark.
Quote this message in a reply
Moderator
Posts: 1,562
Joined: 2003.10
Post: #13
Nearly anything you can imagine coding is possible with enough time, dedication, resources, and cleverness. However, you won't be doing most of those things within a day of reading a book on C programming, or likely within a year of it.

Also, we'd be much better able to help you if you asked your questions differently. Please read this page: http://www.mikeash.com/getting_answers.html
Quote this message in a reply
Apprentice
Posts: 10
Joined: 2008.08
Post: #14
ThemsAllTook Wrote:Nearly anything you can imagine coding is possible with enough time, dedication, resources, and cleverness. However, you won't be doing most of those things within a day of reading a book on C programming, or likely within a year of it.

Also, we'd be much better able to help you if you asked your questions differently. Please read this page: http://www.mikeash.com/getting_answers.html

Ok, well I got my thought's together. I'm going to be coding my game engine in Objective C, using OpenGL, OpenAL. First thing I need to do is create my engine's renderer. But I dare say I have no clue how to start it or where to go with it. So here is a screenshot so you all can better understand what it will look like (keep in mind I will be adding to this design but this is the general look of it).

http://i349.photobucket.com/albums/q400/...engine.png

It's too big to put on here, sorry about not wording my questions good.
Quote this message in a reply
Member
Posts: 53
Joined: 2007.08
Post: #15
You would do well to read the Cocoa OpenGL Programming Guide and other Cocoa graphics related things (as well as basic Obj-C guides if you aren't already familiar with it) at http://developer.apple.com .

If you are intent on using OpenGL, you should look at the Red Book as well as the many OpenGL tutorials that are floating around on the interwebs.

Not to rain on your parade, but when you say "I have no clue how start it or where to go with it" I can't help but wonder if you might be biting off more than you can chew. Perhaps I am wrong and you already have significant programming experience, but as was suggested above, making a game engine is not a trivial task and if you get ahead of yourself too much you might just end up frustrated and producing nothing. Start with simple stuff like displaying polygons and textures on screen with OpenGL (your gonna have to do that anyway as you learn OpenGL) before jumping headfirst into trying to create a whole engine from scratch. Just my suggestion, as someone who has had to go through the same process of starting small (as has everyone else).

I hope you read igame3d's post and didn't just ignore it. There is a reason why lots of people use the things he listed (as well as the plethora of others out there) and even professional AAA game studios license/use pre-made engines....

...of course, the fact that its hard doesn't mean its not worth trying. At the very least you will learn a lot. You just have to be sure you know what you are getting into and that you actually want to get into it.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Some Game / Engine Source code in C++ and MSVC kiavash2k 1 5,397 Apr 12, 2012 11:35 PM
Last Post: DJyStyler
  artificial intelligence engine for game like sherlock holmes sefiroths 3 6,263 Feb 26, 2011 12:15 PM
Last Post: Macmenace
  OpenGL Velocity and Grouping of Lines (C++, Xcode) TheThirdL3g 2 3,559 Jul 29, 2010 01:28 PM
Last Post: SethWillits
  What engine to choose for bowling-like game? Sergnsk 2 3,542 Jan 30, 2010 11:53 AM
Last Post: mikey
  Easy game engine for Mac OS X YvanSoftware 7 11,595 Dec 17, 2009 03:04 PM
Last Post: SethWillits