Using XCode

Apprentice
Posts: 9
Joined: 2009.07
Post: #1
I want to make a 2D fullscreen game in XCode, but how do I even start? I want to code in C++, and hopefully the game cold be cross-platform. I just do not know where to get started.
Quote this message in a reply
Moderator
Posts: 373
Joined: 2006.08
Post: #2
Google would probably be a good place Wink

Or you could check out the How to get started in game development thread Smile

Worlds at War (Current Project) - http://www.awkward-games.com/forum/
Quote this message in a reply
Member
Posts: 281
Joined: 2009.04
Post: #3
Xcode is an Integrated Development Environment, not a programming language. It's best if you learn C++ then OpenGL (That's the library that does the drawing) and GLUT (The link between OpenGL and the Macintosh (That's where you do fullscreen).

I went through this recently.

You should learn C++ (If you don't already) then use OneSadCookie's GLUT/OpenGL Tutorial to set up OpenGL. That tutorial is C (Consider it, it's what I use) but it'll work with some mod'ding.

You can figure out keyboard input by looking at some threads in this forum (Mine in particular - I had the same problem also). That should get you started.

~ Bring a Pen ~
Quote this message in a reply
Member
Posts: 281
Joined: 2009.04
Post: #4
PS. OpenGL is cross-platform, and so it GLUT.

~ Bring a Pen ~
Quote this message in a reply
Apprentice
Posts: 9
Joined: 2009.07
Post: #5
Thanks! I am started to get used to using C++, and edited the code to use a box object. I think that now that I know how C++, OpenGL, GLUT, and OOP work together, I can start designing classes and modifying the code more.

I do have a question though. Does anyone else experience the problem where if you resize the window made in the tutorial, the square disappears?

Oh, and by the way, I have been making some useful classes in C++. If you want to test/use/debug them I'll figure out a way to show you. So far I have a linked list (similar to NSMutableArray of Cocoa) and a View that can have subviews (you have to draw in OpenGL though). I am going to work on it and maybe have a nice little toolkit for building games and other applications in C++.
Quote this message in a reply
Member
Posts: 281
Joined: 2009.04
Post: #6
No, it should resize proportionally to the window. Is your glutResize Function OK? Have you modified it as the tutorial says: to pixel coordinates?

~ Bring a Pen ~
Quote this message in a reply
Apprentice
Posts: 9
Joined: 2009.07
Post: #7
Followed the tutorial exactly, but it does not work.
I have been looking at GLUT example code, and the resize does work, so I will continue to try things.
Quote this message in a reply
Apprentice
Posts: 9
Joined: 2007.10
Post: #8
I'd like to point out http://www.sfml-dev.org as an easy to use 2D engine with some pretty decent tutorials. Learning C++ and OpenGL at the same time is a bit much for some people and this is a good base for getting up to speed on the C++ side of things.
Quote this message in a reply
Post Reply