Games

A

Alexander Terekhov

Brad said:
Without going into detail, how do you make games in C++?

Bazarov, and HOW do we make games in C++? Detaled answer, please.

regards,
alexander.
 
P

Psy

use OpenGl, it provides some fancy commands.
one is very usefull: glMakeMyGame(bool bestseller,GLint quality).

i think thats the best way to do.

regards psy

p.s. don't feed the trolls
 
J

Jeremy Cowles

Brad said:
Without going into detail, how do you make games in C++?


I think what these *kind* gentlemen mean to say is, creating a game is a
topic that could cover an entire book - without getting into detail. If you
are interested, read on-line articles, books and magazines. A quick way to
start learning would be to research the major technologies people are using,
such as OpenGL, DirectX and the like.

And just imagin, these C++ programmers are the ones with the _small_ egos
that are actually trying to be helpfull!
 
S

Stuart Golodetz

Brad said:
Without going into detail, how do you make games in C++?

Without going into detail, you don't... :) Seriously, though, if you want
to learn to write games in C++, you need to do a number of things:

1) Learn a reasonable amount of the C++ language. If you don't know C++, you
can't write games in it.
2) Learn an API, perhaps OpenGL or DirectX. OpenGL is just a graphics
library, whereas DirectX has lots of other stuff as well, but on the other
hand OpenGL is portable and DirectX is quite definitely not.
3) If you decided on OpenGL, take the time to investigate SDL
(www.libsdl.org), it's worth your while.
4) Start very, very simple. Don't try and clone Quake (something everyone
tries to do before they're ready) - you will fail.
5) Direct any non-C++ questions to another newsgroup. This newsgroup is for
questions about the C++ language.

HTH,

Stuart.
 
A

Alexander Terekhov

Stuart Golodetz wrote: ...

WOW. 110% exam grade.

regards,
alexander.
 
D

Default User

Brad said:
Without going into detail, how do you make games in C++?


This is a pretty broad topic, as the term "games" covers a lot of
ground. Some games, such as text adventure, can be written in completely
standard C++. Most games requires some sort of graphics though, which
requires additional platform-specific libraries to provide this
functionality.

As the core of a game system, C++ or any other object-oriented language
has some advantages. As a game is normally made up of objects with
actions and attributes associated with them, a language like C++ can
represent them in a natural form.

I'd suggest doing some on-line searching for game creation in C++,
you'll find lots of good info that way.




Brian Rodenborn
 
E

Ellarco

Brad said:
Without going into detail, how do you make games in C++?

Never done it but people dont seem to be taking this thread too seriously so
I feel safe posting : )

Program the game logic and worry about the cool graphics after! Theres no
reason why any C++ programmer (or for that matter anyone reasonably
proficient in any language) cant program a game of the quality of
Civilisation II (without ANY doubt, THE greatest game of ALL time) given
enough time.

The graphics, although being the stuff that makes it look good, can be done
after your game has been completed, although admittedly, a graphical user
interface makes the program much easier to test/develop.

Get to work! If your idea proves good enough within the first few weeks of
development youll know whether or not to continue and may even find people
to work on the graphics for you.

Good luck and keep me/us posted.
 
S

Stuart Golodetz

Ellarco said:
Never done it but people dont seem to be taking this thread too seriously so
I feel safe posting : )

Program the game logic and worry about the cool graphics after! Theres no
reason why any C++ programmer (or for that matter anyone reasonably
proficient in any language) cant program a game of the quality of
Civilisation II (without ANY doubt, THE greatest game of ALL time) given
enough time.

Erm, I'd beg to differ actually. For a start, the Civilization II AI would
not be easy to write. As the game basically revolves around how good the AI
is, that's quite a big problem. It's certainly *doable* to write a game like
Civ2, but I think you perhaps underestimate the challenge involved. Aside
from the coding issues, getting it to be as balanced and fun as Civ2 is a
non-trivial challenge (read: quite difficult). In fact, most games worth
writing are non-trivial projects in general.
The graphics, although being the stuff that makes it look good, can be done
after your game has been completed, although admittedly, a graphical user
interface makes the program much easier to test/develop.

You don't have to write all the graphics code at once, but it's a good idea
to have at least a basic game screen up so you can see what's going on. In
the case of a Civ2 clone, you'd at least want a basic game map up with
coloured (if non-textured) tiles and blocks to represent the units.

HTH,

Stuart.
 
A

Agent Mulder

Brad> Without going into detail, how do you make games in C++?

Following another link in this conversation, when you
go here:

http://www.libsdl.org/tutorials.php

you find specifics about programming games with
OpenGL and C++. It is in German, I'm afraid
(Spieleprogrammierung mit der SDL in C++ (thee ploes ploes))

-X
 
A

Alexander Terekhov

Thomas said:
Alexander, out of curiosity, do any of your replies
have any constructive content?

My replies are full of destructive content. I hope.
Your ratio of constructive content in your replies
is getting low.

It's summer time, my friend.

regards,
alexander. < dreaming of vacation >
 
E

Ellarco

It's certainly *doable* to write a game like
Civ2, but I think you perhaps underestimate the challenge involved. Aside
from the coding issues, getting it to be as balanced and fun as Civ2 is a
non-trivial challenge (read: quite difficult).

Agreed.
 
C

Carl Muller

You start with
int main (int argc, char** argv)
{
// Your game code goes here
}

Aha, now we know what platform you are writing for!
I thought for standard gaming platforms it is :

[Microsoft Windows]
INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR
lpCmdLine, INT nCmdShow)

[Microsoft Xbox]
VOID __cdecl main()

[Nintendo GameCube]
int main(void)

[Nintendo GameBoy Advance]
void AGBMain(void)

[Sony PlayStation 2]
int main(int argc, char *argv[])

The last one looks closest...

BTW first you might want to hire four artists for every programmer and
get a game design written but that depends on the type of game :)
 
P

Peter Gregory

Brad said:
Without going into detail, how do you make games in C++?

There are also many good forums, I'm told. I seem to remember
gamedev.net being quite good and having a bit of content into
AI (that's my field) that might be useful.

There's something very satisfying about dots wandering about
your screen in intelligent ways, much more than having great
graphics and a bad game (a'la most modern games). Try to
code AI for a style of game you like. I've been thinking of
doing a C&C style game AI engine, mainly cos it would be easy
to do in 2D!

If you like 1st person shooters then I think the code for Doom
is open source for Linux, try messing about with that.

As a last point, considering the fact that your original msg
was one line and was a bit of fun, just look at the *huge*
number of replies!

Kind regards,
Pete
 
C

Carl Muller

Stewart Gordon said:
How do you know that this person doesn't have an application framework
that predefines his platform's version of main to call this one?

I think if you link two versions of "main" into the same program you
might get problems. However you are right that calling main (from e.g.
WinMain) is standard for Windows console applications and other
platforms.
<snip>

Well, considering that this 'group is about standard C++, the OP was
presumably asking for the standard C++ method, rather than that in some
unspecified platform-exclusive dialect.

The OP might find that writing using only standard C++ is worthwhile,
but it does rather limit the type of games possible (e.g. Hammurabi,
Nim, Chess, text adventures).

For action games you would want at least timing functions (e.g.
sleep), echoless keyboard input and the ability to plot text at
specified positions within the console window. This lets you get
Tetris or Nethack style games.

A cross-platform graphics library might be more interesting. And a
good set of books. I was merely illustrating the fact that the
real-world platforms don't all exactly match the standard even for a
program *more simple* than "hello world".
And, if you think you're so knowledgeable, where does one find a
compiler for any of the

http://www.snsys.com (for gc/ps2/gba)
http://www.microsoft.com (for pc/xbox)

Finding the libaries and header files is another matter :)

Carl.
 
J

JustBoo

Alexander, out of curiosity, do any of your replies
have any constructive content?
Your ratio of constructive content in your replies
is getting low.
Thomas Matthews
C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library

Grandpa Matthews has spoken. Sonny!

Let's see, the formula goes: The larger the size of the .sig file the
smaller the size of one's "data member." It's obvious Grandma
Matthews is quite unsatisfied, therefore Grandpa is grumpy and
utterly humorless.

..sig file! .sig file! .sig file! (As Grandpa tries to goose-step.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top