New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

C++ and GUI


Post Reply New Thread Subscribe

 
Thread Tools
benparko

 
benparko's Avatar
 
Member Since: Feb 24, 2010
Location: Australia
Posts: 318
benparko will become famous soon enough
Mac Specs: 15" MBP i5 4GB DDR3, 500GB HDD 7200 + iPhone 4 32GB iOS4.1

benparko is offline
Hi,

I have been looking at some books and tutorials on C++. I'm going to be doing a Bachelor of Engineering (Software) next year but I wanted to do some of my own projects before. Especially I'm looking at making some basic games. Just things like Pong, Tetris, mini golf ect. I just want to get some info now and then I'll look more into actually writting the code later.

1. Obviously I want to be making a GUI as it's a game... How do I do this? And how in the code do you add buttons and images? Is it similar to adding objects in HTML? What will I need to develop GUI? I already have C++ 2008 express.

2. In C++ 2008 express when I import a sample code it comes up with two tabs, one with "SampleCode.cpp" and the other tab called "SampleCode.h". The code is different in both but somehow I think relates to each other. Could you please explain this?

3. When people make a new game in C++, do they write the code from scratch? Or do they download like a template then change things to suit their app? And how are you meant to know how to add things like search features and menus and other things?

The main thing is.. How do I see a GUI from code I've written??

Thanks for any help.

-Ben

Tigers love pepper... they hate cinnamon
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 7,501
Raz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant future
Mac Specs: 27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3

Raz0rEdge is offline
Start with the basics first, especially from your question #2, it looks like you're new to programming in general.

It is common practice to use the .h (header) file to define structures, classes and function prototypes that you implemented in .c/.cpp (source) files. The source files will include your local header file along with others to accomplish it's task..

Before you try to run towards a GUI program, first spend some time learning a programming language. In Mac, programs are usually written in Objective-C, but C++ is also good for games.

To answer your last question, most professional game development houses use a game engine that they bought or have developed on their own. Think Unreal engine from ID, the Crysis engine from CryTek, and so on..

Regards
QUOTE Thanks
benparko

 
benparko's Avatar
 
Member Since: Feb 24, 2010
Location: Australia
Posts: 318
benparko will become famous soon enough
Mac Specs: 15" MBP i5 4GB DDR3, 500GB HDD 7200 + iPhone 4 32GB iOS4.1

benparko is offline
Quote:
Originally Posted by Raz0rEdge View Post
Start with the basics first, especially from your question #2, it looks like you're new to programming in general.

It is common practice to use the .h (header) file to define structures, classes and function prototypes that you implemented in .c/.cpp (source) files. The source files will include your local header file along with others to accomplish it's task..

Before you try to run towards a GUI program, first spend some time learning a programming language. In Mac, programs are usually written in Objective-C, but C++ is also good for games.

To answer your last question, most professional game development houses use a game engine that they bought or have developed on their own. Think Unreal engine from ID, the Crysis engine from CryTek, and so on..

Regards
Ahhh ok. So it's probably best just to start from scratch and learn the basics of C++ first. I'm Reading C++ for Dummies which is good for beginners. Then I'll move into GUI. I've talked to some old work mares who are programmers (games) and they all write in C++. But I'd be very interested into developing some iPhone apps. Ofcourse this is in objective-c but my work mates have said "I don't have any experience with Objective-C but from what I understand
it's only a proprietary set of poorly thought out additions to C." so it's probably best for me to learn C++ first. I have found a SDK called DragonFireSDK Whig let's you use C++ but it translates to objective-c so it can run in iPhone os. It also comes with a tester to you can run the app from your pc.

Yeah I know about game engines. I used to work for a games development company - Rocksteady Studios in London. They recently released Batman Atkham Asylum and it was using Unreal3 from epic games.

Thanks for your advice! So the beat bet is to just start from scratch and learn all the basics then start GUI when I come to it.

Thanks again man,

-Ben

Tigers love pepper... they hate cinnamon
QUOTE Thanks
benparko

 
benparko's Avatar
 
Member Since: Feb 24, 2010
Location: Australia
Posts: 318
benparko will become famous soon enough
Mac Specs: 15" MBP i5 4GB DDR3, 500GB HDD 7200 + iPhone 4 32GB iOS4.1

benparko is offline
Oh... Yes I'm using my pc for this not on my MacBook pro. Haven't got around to installing vmware as of yet as I don't really need windows on the go as I rarely use a pc...

Tigers love pepper... they hate cinnamon
QUOTE Thanks

Post Reply New Thread Subscribe


« iPhone Dev Help. | i2c communications »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
AppleScript / GUI help Babkockdood OS X - Operating System 0 01-07-2010 10:28 AM
Logic Express and Applescript via GUI Scripting albertaurus Music, Audio, and Podcasting 0 04-09-2009 01:13 PM
Color Banding, ugly gradients, gui elements off giulio Apple Desktops 2 01-08-2008 08:00 AM
Cli & Gui knightjp OS X - Operating System 2 09-13-2007 12:32 PM
Oracle DB GUI tool for mac (like toad) iRock Web Design and Hosting 3 09-06-2007 11:57 AM

All times are GMT -4. The time now is 07:10 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?