C++ and GUI

Joined
Feb 24, 2010
Messages
318
Reaction score
8
Points
18
Location
Australia
Your Mac's Specs
15" MBP i5 4GB DDR3, 500GB HDD 7200 + iPhone 4 32GB iOS4.1
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
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
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
 
OP
benparko
Joined
Feb 24, 2010
Messages
318
Reaction score
8
Points
18
Location
Australia
Your Mac's Specs
15" MBP i5 4GB DDR3, 500GB HDD 7200 + iPhone 4 32GB iOS4.1
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
 
OP
benparko
Joined
Feb 24, 2010
Messages
318
Reaction score
8
Points
18
Location
Australia
Your Mac's Specs
15" MBP i5 4GB DDR3, 500GB HDD 7200 + iPhone 4 32GB iOS4.1
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...
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top