Sign in to follow this  

How can i make a menu using c++?

This topic is 3594 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to make a simple racing car game!, But how azactelly could i make the menu. I think the menu would be the first thing to start with, iv got an idea of whats going to happen etc. Would I need to make the menu in a like photoshop and then programme it? or somethink??? Any ideas? Btw im Using Microsoft Visual c++

Share this post


Link to post
Share on other sites
C++ is a language, it doesn't have any concept of graphics or input. If you want to write a front end for a game, you'll need a graphics API and an input API, like Direct3D or OpenGL and Win32.

Usually you'd make the menu options from a font rather than generating one image for each option. Direct3D's helper library, D3DX has the ID3DXFont class.

How much programming experience do you have, and have you decided on a graphics API?

Share this post


Link to post
Share on other sites
Hector2323, as previously described before, C++ is just a programming language a large group of instruction to give orders to your computer.
I suggest to buy a good book covering C++ for example Teach Yourself C++ in 21 days from Sam's publishing.
Designing a menu and push buttos with Photoshop would be a good idea all you need to do is to connect buttons with a particular action with logical conditions
For example if button1=Pressed then DoSomeAction()
:-)

@EvilSteve : designing a 3d game would be a bit complicated for Hector I suggest to start first with a 2d game with SDL ;-)

Share this post


Link to post
Share on other sites
Quote:
Original post by Hector2323
:S oh And not much tbh just started C++

But now im also confused again, Where does c++ fit in. What Is the language for?
You use C++ (Or any other language) to "talk to" the graphics API to eventually render things. For instance, you'd tell Direct3D to create a texture, then you'd tell D3D to give you access to the data in the texture so you can fill it with meaningful data. Then you'd tell D3D to render some triangles with that texture applied to them.
It's a bit more complicated than that, but that's the general idea.

I'd recommend having a look on Google for sample code and tutorials on D3D, OpenGL and SDL to decide which you want to use. D3D is limited to Microsoft platforms only, and is a rather large download (~450MB for the DirectX SDK), but IMO has a much cleaner interface. OpenGL is cross-platform, and is more straightforward to get something basic up and running, but doesn't come with any image loading or math libraries (D3D has the D3DX library for a lot of stuff), and (again, IMO) has a more confusing interface for more advanced stuff.
SDL is cross-platform and 2D only, but can be used with OpenGL.

EDIT:
Quote:
Original post by HolyGrail
@EvilSteve : designing a 3d game would be a bit complicated for Hector I suggest to start first with a 2d game with SDL ;-)
Yeah, I agree. 3D stuff is pretty complicated; starting simple with something like SDL, or one of the manu other 2D libraries out there would be a better idea.

Share this post


Link to post
Share on other sites
Quote:
Original post by Hector2323
:S oh And not much tbh just started C++

But now im also confused again, Where does c++ fit in. What Is the language for?
Have you written any C++ code yet? 'Hello, World!', or something of that sort?

Even a simple racing game will require a good familiarity with the language, as well as with one or more external APIs. To make things easier, you might consider going with a more user-friendly programming language than C++, or perhaps even a 'game making' program of some sort.

[Edit: Oops, too slow...]

Share this post


Link to post
Share on other sites
Quote:
Original post by HolyGrail
I suggest to buy a good book covering C++ for example Teach Yourself C++ in 21 days from Sam's publishing.

What'd he ever do to you to be recommended a SAMS book?

Try googling "Thinking in C++" instead:
-- free download
-- less brain aids
-- doesn't lie right on the cover

Share this post


Link to post
Share on other sites
Quote:
Original post by jyk
Quote:
Original post by Hector2323
:S oh And not much tbh just started C++

But now im also confused again, Where does c++ fit in. What Is the language for?
Have you written any C++ code yet? 'Hello, World!', or something of that sort?

Even a simple racing game will require a good familiarity with the language, as well as with one or more external APIs. To make things easier, you might consider going with a more user-friendly programming language than C++, or perhaps even a 'game making' program of some sort.

[Edit: Oops, too slow...]



Meh, I have been playing on game makers for a bit i really wana get to the next step, iv decided before i make the actuall racing game ill try some stuf out and make like a version of tetris etc then ill move up to the racing game.

Share this post


Link to post
Share on other sites

This topic is 3594 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this