473,387 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Games

Without going into detail, how do you make games in C++?
Jul 19 '05 #1
31 9073

Brad wrote:

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.
Jul 19 '05 #2
"Brad" <wi***********@hotmail.com> wrote...
Without going into detail, how do you make games in C++?


You program them.
Jul 19 '05 #3
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
Jul 19 '05 #4
"Brad" <wi***********@hotmail.com> wrote in message
news:3b************************@posting.google.com ...
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!
Jul 19 '05 #5
"Brad" <wi***********@hotmail.com> wrote in message
news:3b************************@posting.google.com ...
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.
Jul 19 '05 #6

Stuart Golodetz wrote: ...

WOW. 110% exam grade.

regards,
alexander.
Jul 19 '05 #7
"Brad" <wi***********@hotmail.com> wrote in message
news:3b************************@posting.google.com ...
Without going into detail, how do you make games in C++?

First you learn the language as defined by the ANSI/ISO C++ standard. Then
depending on the platform you learn a graphics library (e.g. OpenGL,
DirectX, etc).

--
Ioannis

* Programming pages: http://www.noicys.freeurl.com
* Alternative URL 1: http://run.to/noicys
* Alternative URL 2: http://www.noicys.cjb.net

Jul 19 '05 #8

"Brad" <wi***********@hotmail.com> wrote in message
news:3b************************@posting.google.com ...
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.
Jul 19 '05 #9
In article <3b************************@posting.google.com>, wi***********@hotmail.com (Brad) wrote:
Without going into detail, how do you make games in C++?


You start with

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

Jørn Dahl-Stamnes, EDB Teamco AS
e-mail: Jo***************@nospam.novit.no (remove nospam first)
web: http://spiderman.novit.no/dahls/
Jul 19 '05 #10

Ju*****@BooHoo.gone wrote:

On Wed, 09 Jul 2003 22:46:43 +0200, Alexander Terekhov
<te******@web.de> wrote:
Victor Bazarov wrote: ...
and FAILED the examination. BOO.


Boo Who?
regards,
alexander.


Regards to who? Or is it whom?


I'm your fan, Boo. To Bazarov: BOO. ("a sound uttered to show
disapproval").

regards,
alexander.
Jul 19 '05 #11
"Ellarco" <no****@eircom.net> wrote in message
news:35*******************@news.indigo.ie...

"Brad" <wi***********@hotmail.com> wrote in message
news:3b************************@posting.google.com ...
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.
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.
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.

Jul 19 '05 #12
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
Jul 19 '05 #13

Thomas Matthews wrote:

Alexander Terekhov wrote:
Thomas Matthews wrote: ...

and PASSED the examination. Congrats.

regards,
alexander.
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 >
Jul 19 '05 #14
> 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.
Jul 19 '05 #15
jo***************@nospam.novit.no (Jørn Dahl-Stamnes) wrote in message news:<6X*******************@news4.e.nsc.no>...
In article <3b************************@posting.google.com>, wi***********@hotmail.com (Brad) wrote:
Without going into detail, how do you make games in C++?

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 :-)
Jul 19 '05 #16
Brad wrote:
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
Jul 19 '05 #17
Stewart Gordon <sm*******@yahoo.com> wrote in message news:<be**********@sun-cc204.lut.ac.uk>...
Carl Muller wrote:
Aha, now we know what platform you are writing for!
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.
I thought for standard gaming platforms it is :

<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.
Jul 19 '05 #18
On Thu, 10 Jul 2003 11:43:00 GMT, Thomas Matthews
<to********@sbcglobal.net> wrote:
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.)
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
Jul 19 '05 #19
On Thu, 10 Jul 2003 12:15:46 +0200, Alexander Terekhov
<te******@web.de> wrote:
I'm your fan, Boo. To Bazarov: BOO. ("a sound uttered to show
disapproval").


:-D

"Soca, his eyes open!" "Mirab, with sails unfurled." :-)
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
Jul 19 '05 #20
Carl Muller wrote:
Stewart Gordon <sm*******@yahoo.com> wrote in message news:<be**********@sun-cc204.lut.ac.uk>...
Carl Muller wrote:
Aha, now we know what platform you are writing for!
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.


Is the rule that main can't be overloaded an essential characteristic of
every C++ compiler for every platform?

<snip> 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).
And ASCII art adventures. Of course you'd need some kind of ASCII art
to draw chess pieces just the same, and as for colouring ... are we
allowing ANSI.SYS formatting codes to be used?

FTM, does the most recent standard C++ have access to Unicode? And does
Unicode have chess pieces anywhere in it?
For action games you would want at least timing functions (e.g.
sleep),
If you want the speed to be regulated properly, you'd need a timer that
runs in the background at the least.

<snip> http://www.snsys.com (for gc/ps2/gba)


Just had a look. £215 for one GBA cartridge? I wonder how much the
pre-recorded ones cost the developers, and where one gets that kind from.
<snip>

This is silly - in order to vote in their opinion poll, you need to be
registered with the site, and in order to register with the site, you
need to have bought and registered an SN product.

And why is there no mention in the poll of support for a standard kind
of removable storage media?

FTM, does anyone have any ideas on what Microsoft decided was
sufficiently wrong with floppy disks, Zip disks, CD-Rs, CD-RWs or USB
flash drives to justify inventing an alternative 1-3 orders of magnitude
more expensive?

Stewart.

--
My e-mail is valid but not my primary mailbox. Please keep replies on
on the 'group where everyone may benefit.

Jul 19 '05 #21

Default User wrote:

Alexander Terekhov wrote:
My replies are full of destructive content. I hope.


I'm just sad because you took the time to slam Victor's reply but didn't
do the same for mine. I don't think you like me anymore.


You were too late. I was working on that subject only between 22:00 and
23:00 (+02:00).

regards,
alexander.
Jul 19 '05 #22
Stewart Gordon <sm*******@yahoo.com> wrote in message news:<be**********@sun-cc204.lut.ac.uk>...
Carl Muller wrote: <snip>
I think if you link two versions of "main" into the same program you
might get problems.


Is the rule that main can't be overloaded an essential characteristic of
every C++ compiler for every platform?


It's a C rule. I'm not sure about "embedded" C++.
The platform libraries generally allow C programs to be run
(as well as C++) so main is typically not name-mangled.
You can't overload on a return value in C++ anyway.
The GBA doesn't exactly have a command line to get command-line
arguments
from (although that might be useful for development, if emulators
passed
a command-line to the user code but on final hardware it was empty).

<snip> Of course you'd need some kind of ASCII art
to draw chess pieces just the same, and as for colouring ... are we
allowing ANSI.SYS formatting codes to be used?
No need, just use K or k for king etc. and enter moves like newspapers
show them. I don't think the colour formatting or cursor movement
escape codes
are very standard.
FTM, does the most recent standard C++ have access to Unicode? And does
Unicode have chess pieces anywhere in it?


Unicode does have chess pieces in them, from U+2654 but it would be a
brave person who used them on a console-mode application (or on usenet
but here goes)
♖♘♗♔♕♗♘♖
♙♙♙♙♙♙♙♙

hehehe.
For action games you would want at least timing functions (e.g.
sleep),


If you want the speed to be regulated properly, you'd need a timer that
runs in the background at the least.


Or run games where the sleep(10) dominates the run-time.

Carl.
Jul 19 '05 #23
Ju*****@BooHoo.gone wrote:
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.)


Not a grandpa yet.

However, I am flattered that you consider me high up in the
ranks enough to lampoon me. You just don't pick on anybody,
so I must be special. I'm up in the ranks with Victor, and Ron.
Wow, a promotion!

--
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

Jul 19 '05 #24
Alexander,

I'm glad that you hold me in such high esteem
as to honor me with you contentless destructive
replies. I now feel that I am high up in the
ranks with Ron Natalie, Victor and Brian.

Thanks for the promotion.

Perhaps I may even be promoted to Philip's rank.

--
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

Jul 19 '05 #25

Thomas Matthews wrote:
[...]
Not a grandpa yet. [...] I'm up in the ranks with Victor, and Ron.


But Bazarov has 5 small kids and Ron IS grandpa.

Right, Ron? ;-)

regards,
alexander.

--
"We don't respect Victor Bazarov because he is a nice guy.
For all we know, he could be just as evil as Vallon says
he is. We respect Victor Bazarov because he is a C++ Guru
and because his contributions to the comp.lang.c++
newsgroup are usually pretty reliable."

-- E. Robert Tisdale
Jul 19 '05 #26

Thomas Matthews wrote:
[...]
Thanks for the promotion.
Bitteschoen, bittesehr.

Perhaps I may even be promoted to Philip's rank.


Philip? Who's that? (I know that Phlip is a, eh, "blip" ;-) ).

regards,
alexander.
Jul 19 '05 #27
"Alexander Terekhov" <te******@web.de> wrote in message
news:3F***************@web.de...

Thomas Matthews wrote:
[...]
Not a grandpa yet.

[...]
I'm up in the ranks with Victor, and Ron.


But Bazarov has 5 small kids and Ron IS grandpa.

Right, Ron? ;-)


In an effort to help Thomas, Ioannis appears suddenly and with an anti-troll
spray sprays directly on Alexander and Justboo.

--
Ioannis

* Programming pages: http://www.noicys.freeurl.com
* Alternative URL 1: http://run.to/noicys
* Alternative URL 2: http://www.noicys.cjb.net

Jul 19 '05 #28

Ioannis Vranos wrote:
[...]
In an effort to help Thomas, Ioannis appears suddenly and with an anti-troll
spray sprays directly on Alexander and Justboo.


Q: I wanna get promoted, but I don't know how. How, Noddy?

A: Appear suddenly with an anti-troll spray and dispense it
directly on Alexander and JustBoo.

regards,
alexander.
Jul 19 '05 #29


Alexander Terekhov wrote:

Default User wrote:

Alexander Terekhov wrote:
My replies are full of destructive content. I hope.


I'm just sad because you took the time to slam Victor's reply but didn't
do the same for mine. I don't think you like me anymore.


You were too late. I was working on that subject only between 22:00 and
23:00 (+02:00).

Doh! Missed it by *that* much.

I think you could have cut me some slack after all we've meant to each
other.


Brian Rodenborn
Jul 19 '05 #30
On Fri, 11 Jul 2003 11:45:46 +0100, Stewart Gordon
<sm*******@yahoo.com> wrote:
FTM, does anyone have any ideas on what Microsoft decided was
sufficiently wrong with floppy disks, Zip disks, CD-Rs, CD-RWs or USB
flash drives to justify inventing an alternative 1-3 orders of magnitude
more expensive?


GREED.

Behind every great fortune there is a crime.
- Honore de Balzac (1799-1850)

Get your stinking advertisement off my post you striped bastards!
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
Jul 19 '05 #31
Victor Bazarov wrote:
"Brad" <wi***********@hotmail.com> wrote...
Without going into detail, how do you make games in C++?

You program them.


2 interacting objects, plus others for background.

Hasan

Jul 19 '05 #32

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Nick Mudge | last post by:
Hi, I am learning PHP, but it can be kind of boring. Are there any games where you use PHP programming to play the game? This way you learn how to use PHP and it is fun. Does anybody know? ...
1
by: tmb | last post by:
I want to have some games in an application I'm considering. I see game creation stuff on the web... anything best suited for Java... or written with Java? Of course, we could do 'em from...
2
by: Developwebsites | last post by:
I have found a few games made in js and in comparison to Java and Flash games, they load much faster. no plug in or java enabled crap needed. java games take much too long to load, I only play...
761
by: Neo-LISPer | last post by:
Hey Recently, I researched using C++ for game programming and here is what I found: C++ game developers spend a lot of their time debugging corrupted memory. Few, if any, compilers offer...
4
by: ώε↮øй | last post by:
I have the whole group of .NET 2003 platforms sitting here from a dream I have of building some simple web based games (much like on msn zone) Any guidance as to where I start and what I need to...
3
by: noob23434 | last post by:
Hi all I've been told that the best platform to make games on (strategy games) is a c++. I want to start making games using my mac and I was wondering if anyone could tell me what software is...
13
by: CoreyWhite | last post by:
When playing games, perhaps the most simple is tic-tac-toe. The game has two simple strategies, one is defensive and the other offensive. It is not hard at first to learn how to tie games when...
45
by: Gaijinco | last post by:
Hi my name is Carlos Obregón and I'm currently a profesor of C/C++ programming at the CUMD in Bogotá Colombia. This last term I ask my students to develop an implementation of the minesweeper...
4
by: viper888 | last post by:
Hi to all, I'm the newly appointed network administrator in our office, and upon scanning all the PCs that are connected to the network, (by the way we're using a windows 2000 server) almost all...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.