Games

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Carl Muller

    #16
    Re: Games

    jorn.dahl-stamnes@nospam. novit.no (Jørn Dahl-Stamnes) wrote in message news:<6X6Pa.120 74$Hb.209645@ne ws4.e.nsc.no>.. .[color=blue]
    > In article <3bd1e3d.030709 1151.75fff20@po sting.google.co m>, willybilly111@h otmail.com (Brad) wrote:[color=green]
    > >Without going into detail, how do you make games in C++?[/color]
    > You start with
    > int main (int argc, char** argv)
    > {
    > // Your game code goes here
    > }[/color]

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

    [Microsoft Windows]
    INT WINAPI WinMain(HINSTAN CE 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 :-)

    Comment

    • Peter Gregory

      #17
      Re: Games

      Brad wrote:
      [color=blue]
      > Without going into detail, how do you make games in C++?[/color]

      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

      Comment

      • Carl Muller

        #18
        Re: Games

        Stewart Gordon <smjg_1998@yaho o.com> wrote in message news:<bejsol$lk s$1@sun-cc204.lut.ac.uk >...[color=blue]
        > Carl Muller wrote:[color=green]
        > > Aha, now we know what platform you are writing for![/color]
        >
        > 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?[/color]

        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.
        [color=blue][color=green]
        > > I thought for standard gaming platforms it is :[/color]
        > <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.[/color]

        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".
        [color=blue]
        > And, if you think you're so knowledgeable, where does one find a
        > compiler for any of the[/color]

        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.

        Comment

        • JustBoo@BooHoo.gone

          #19
          Re: Games

          On Thu, 10 Jul 2003 11:43:00 GMT, Thomas Matthews
          <tomatthews@sbc global.net> wrote:[color=blue]
          >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[/color]
          [color=blue]
          >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[/color]

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

          Comment

          • JustBoo@BooHoo.gone

            #20
            Re: Games

            On Thu, 10 Jul 2003 12:15:46 +0200, Alexander Terekhov
            <terekhov@web.d e> wrote:[color=blue]
            >I'm your fan, Boo. To Bazarov: BOO. ("a sound uttered to show
            >disapproval" ).[/color]

            :-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! =-----

            Comment

            • Stewart Gordon

              #21
              Re: Games

              Carl Muller wrote:[color=blue]
              > Stewart Gordon <smjg_1998@yaho o.com> wrote in message news:<bejsol$lk s$1@sun-cc204.lut.ac.uk >...
              >[color=green]
              >>Carl Muller wrote:
              >>[color=darkred]
              >>>Aha, now we know what platform you are writing for![/color]
              >>
              >>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?[/color]
              >
              >
              > I think if you link two versions of "main" into the same program you
              > might get problems.[/color]

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

              <snip>[color=blue]
              > 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).[/color]

              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?
              [color=blue]
              > For action games you would want at least timing functions (e.g.
              > sleep),[/color]

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

              <snip>[color=blue]
              > http://www.snsys.com (for gc/ps2/gba)[/color]

              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.

              Comment

              • Alexander Terekhov

                #22
                Re: Games


                Default User wrote:[color=blue]
                >
                > Alexander Terekhov wrote:
                >[color=green]
                > > My replies are full of destructive content. I hope.[/color]
                >
                > 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.[/color]

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

                regards,
                alexander.

                Comment

                • Carl Muller

                  #23
                  Re: Games

                  Stewart Gordon <smjg_1998@yaho o.com> wrote in message news:<bem4gr$7t t$1@sun-cc204.lut.ac.uk >...[color=blue]
                  > Carl Muller wrote:[/color]
                  <snip>[color=blue][color=green]
                  > > I think if you link two versions of "main" into the same program you
                  > > might get problems.[/color]
                  >
                  > Is the rule that main can't be overloaded an essential characteristic of
                  > every C++ compiler for every platform?[/color]

                  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>[color=blue]
                  > 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?[/color]

                  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.
                  [color=blue]
                  > FTM, does the most recent standard C++ have access to Unicode? And does
                  > Unicode have chess pieces anywhere in it?[/color]

                  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.
                  [color=blue][color=green]
                  > > For action games you would want at least timing functions (e.g.
                  > > sleep),[/color]
                  >
                  > If you want the speed to be regulated properly, you'd need a timer that
                  > runs in the background at the least.[/color]

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

                  Carl.

                  Comment

                  • Thomas Matthews

                    #24
                    Re: Games

                    JustBoo@BooHoo. gone wrote:[color=blue]
                    > 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.)[/color]

                    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:

                    C++ Faq: http://www.parashift.com/c++-faq-lite
                    C Faq: http://www.eskimo.com/~scs/c-faq/top.html
                    alt.comp.lang.l earn.c-c++ faq:

                    Other sites:
                    http://www.josuttis.com -- C++ STL Library book

                    Comment

                    • Thomas Matthews

                      #25
                      Re: Games

                      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:

                      C++ Faq: http://www.parashift.com/c++-faq-lite
                      C Faq: http://www.eskimo.com/~scs/c-faq/top.html
                      alt.comp.lang.l earn.c-c++ faq:

                      Other sites:
                      http://www.josuttis.com -- C++ STL Library book

                      Comment

                      • Alexander Terekhov

                        #26
                        Re: Games


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

                        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

                        Comment

                        • Alexander Terekhov

                          #27
                          Re: Games


                          Thomas Matthews wrote:
                          [...][color=blue]
                          > Thanks for the promotion.[/color]

                          Bitteschoen, bittesehr.
                          [color=blue]
                          >
                          > Perhaps I may even be promoted to Philip's rank.[/color]

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

                          regards,
                          alexander.

                          Comment

                          • Ioannis Vranos

                            #28
                            Re: Games

                            "Alexander Terekhov" <terekhov@web.d e> wrote in message
                            news:3F0ED653.5 93A9BAE@web.de. ..[color=blue]
                            >
                            > Thomas Matthews wrote:
                            > [...][color=green]
                            > > Not a grandpa yet.[/color]
                            > [...][color=green]
                            > > I'm up in the ranks with Victor, and Ron.[/color]
                            >
                            > But Bazarov has 5 small kids and Ron IS grandpa.
                            >
                            > Right, Ron? ;-)[/color]



                            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

                            Comment

                            • Alexander Terekhov

                              #29
                              Re: Games


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

                              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.

                              Comment

                              • Default User

                                #30
                                Re: Games



                                Alexander Terekhov wrote:[color=blue]
                                >
                                > Default User wrote:[color=green]
                                > >
                                > > Alexander Terekhov wrote:
                                > >[color=darkred]
                                > > > My replies are full of destructive content. I hope.[/color]
                                > >
                                > > 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.[/color]
                                >
                                > You were too late. I was working on that subject only between 22:00 and
                                > 23:00 (+02:00).[/color]


                                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

                                Comment

                                Working...