I want to program a game, what do i need?

This is a discussion on I want to program a game, what do i need? within the Game Programming forums, part of the General Programming Boards category; Probably. But I'm a slow learner; it'll probably take somebody else less than 10minutes to make a ball appear with ...

  1. #16
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Probably. But I'm a slow learner; it'll probably take somebody else less than 10minutes to make a ball appear with GDI
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  2. #17
    Emotionally Unstable DarkViper's Avatar
    Join Date
    Oct 2002
    Posts
    343
    now see, this is why i like stuff like Java and Flash. with java its basicaly
    public void paint (Graphics g) {
    g.setColor(Color.red);
    g.fillOval(0,0,200,200);
    }
    and that makes a red 200x200 circle with the xy coords 0,0.

    in flash its take the circle tool and draw it!

    http://www.vipervision.org/arena.html

    thats a game i made in flash. its birds eye view. you need flash 6 player to run it. spacebar is attack
    ~DJ DarkViper signing out
    ----------------------------------------
    My Site:
    Black Jaguar Studios

    Languages:
    Fluent English, Starter German, HTML, Javascript, Actionscript, Intermediate PHP

    Verteran Despiser of: ASP, Java, BASIC, Pascal, Cobalt

  3. #18
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Yes, I agree Java is fun and easy to learn. But the thing is, with C++ it's not as easy as public void paint(Graphics g). However, as long as you have your shell set up (i.e. your message loop, etc. etc. etc.) you can call anywhere in the program (that has access to a handle to the window):
    Code:
    HDC hdc = GetDC(hWnd);
    
    HBRUSH redBrush = CreateSolidBrush(RGB(255,0,0));
    HBRUSH oldBrush = (HBRUSH)SelectObject(hdc, redBrush);
    
    HPEN pen = CreatePen(PS_DOT, 1, RGB(0,0,255));
    HPEN oldPen = (HPEN)SelectObject(hdc, pen);
    
    Ellipse(hdc, 0, 0, 200, 200);
    
    SelectObject(hdc, oldBrush);
    SelectObject(hdc, oldPen);
    DeleteObject(redBrush);
    DeleteObject(pen);
    This will draw a circle from (0,0) to (200,200), filled with red and outlined with dotted blue. As you can see, it takes 5X the code, but it's the startup and cleanup that takes forever. But if you live through that, it's blue skies from there on Of course, that doesn't mean that I'm not envious of Java/Flash people, but that's not the point... ok, what was I talking about? lol I think I'll just shut up now
    Last edited by Hunter2; 11-04-2002 at 04:01 PM.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  4. #19
    Emotionally Unstable DarkViper's Avatar
    Join Date
    Oct 2002
    Posts
    343
    flash rules over anything cuz its so easy to animate using it. yet, C++ made the program
    ~DJ DarkViper signing out
    ----------------------------------------
    My Site:
    Black Jaguar Studios

    Languages:
    Fluent English, Starter German, HTML, Javascript, Actionscript, Intermediate PHP

    Verteran Despiser of: ASP, Java, BASIC, Pascal, Cobalt

  5. #20
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    Yes, flash is good for the beginner.

  6. #21
    Emotionally Unstable DarkViper's Avatar
    Join Date
    Oct 2002
    Posts
    343
    still, actionscript can get really advanced. like doing math functions and animating using pure actionscript, (which is tough, beleive me) heres a basic movement of an object script with anbimation.
    Code:
    onClipEvent(load) {
    move = 5;
    }
    onClipEvent(enterFrame) {
    if(Key.isDown(Key.UP)) {
    this._y -= move;
    telltarget(_root.object) {
    play();
    }
    } else if (Key.isDown(Key.DOWN)) {
    this._y += move;
    telltarget(_root.object) {
    play();
    }
    } else if (Key.isDown(Key.LEFT)) {
    this._x -= move;
    telltarget(_root.object) {
    play();
    }
    } else if (Key.isDown(Key.RIGHT)) {
    this._x += move;
    telltarget(_root.object) {
    play();
    }
    } else {
    tellTarget(_root.object) {
    gotoAndStop(1);
    }
    }
    and thats the basics.
    ~DJ DarkViper signing out
    ----------------------------------------
    My Site:
    Black Jaguar Studios

    Languages:
    Fluent English, Starter German, HTML, Javascript, Actionscript, Intermediate PHP

    Verteran Despiser of: ASP, Java, BASIC, Pascal, Cobalt

  7. #22
    Registered User
    Join Date
    Nov 2002
    Posts
    8
    Where can i get dev C++?

  8. #23
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    bloodshed.net

  9. #24
    Registered User
    Join Date
    Jun 2002
    Posts
    132
    Willgell, I would like to give you some instructions too. First of all, about the GDI matter, do not use it for making games. I dont recommend it, as it is slow, and there are easier and more powerful solutions!

    When you refer to DirectX, you refer to the 'DirectX' as a whole. I believe this guy needs a rendering API, so you'd better mention DirectXGraphics (D3D8 + DD). Personally, I do not like D3D much, all this COM thing makes it ugly. Anyone with decent knowledge on both OpenGL and D3D, would choose OpenGL. I suggest you try these two and leave alone Allegro and SDL, but that is my opinion.

    Making a game like Half-life should not be mentioned, except if you put it as an example. Willgell needs to start low, not high! Anyway, I do not have much time, I got to go now, but try to find a reply to a thread several posts before. It will help you a lot.

    I do 3d programming for many years so take my word.
    Cya
    Y3K Network http://www.y3knetwork.com
    Bringing the software of the future on the net.

  10. #25
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    First of all, about the GDI matter, do not use it for making games.
    Why ever not?
    I dont recommend it, as it is slow,
    Not with the average cpu speed today being around 1.3 ghz!
    and there are easier and more powerful solutions!
    Like DirectX and OpenGL, which could take months to learn, especially for people new to concepts such as double-buffering.

    Besides, GDI can be used very easily to make simple applications that don't take too much graphics-processing power (i.e. an application that keeps drawing a black rectangle). DirectX/OpenGL will take a lot more code to do simple tasks, even though they are by far more powerful. Thus, GDI is a very useful API to learn to use, regardless of its slowness, since it is so simple and quick to use.
    Last edited by Hunter2; 11-12-2002 at 04:10 PM.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  11. #26
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    Not with the average cpu speed today being around 1.3 ghz!
    No way is that right. The avg cpu speed is probably around 500 mhz. Think of all the people who still have computers from 1999 and earlier. The cpu speed didn't start getting up to the ghz until the past two years. Cheap ghz cpus didn't come around just until this past year. I would really like to a see the real number on this.

  12. #27
    Emotionally Unstable DarkViper's Avatar
    Join Date
    Oct 2002
    Posts
    343
    hehehe. well i guess it'd be slow on my comp. as ive only got 200MGz!! and 2gigs of space. hehehe.
    ~DJ DarkViper signing out
    ----------------------------------------
    My Site:
    Black Jaguar Studios

    Languages:
    Fluent English, Starter German, HTML, Javascript, Actionscript, Intermediate PHP

    Verteran Despiser of: ASP, Java, BASIC, Pascal, Cobalt

  13. #28
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    The avg cpu speed is probably around 500 mhz
    Hmm, let's see: 60% 550 mhz, 30% 1.3ghz, 5% 1.6ghz, 3% 2 ghz, 2% 2.4 ghz.
    Code:
    (.6 X 550) + (.3 X 1300) + (.05 X 1600) + (.03 X 2000) + (0.2 X 2400) = 908
    Thus, the average by my reckoning is about 908 mhz, which is still plenty fast to run GDI games that aren't too strenuous on the cpu (i.e. ones that don't involve StretchBlt()).

    True, my numbers failed to take DarkViper in ( Sorry, no offence intended), but I'm sure that most hardcore wanna-play-games people will at least have 550 mhz cpu's, which will run GDI games slow but hopefully not unbearably so. And the number is only 60% because there's been 700-800 mhz cpu's out for a long time now. Besides, people often upgrade/buy new computers every 3 or 4 years; so those with 1998/99 comps will likely be upgrading very soon now, jumping up the 1.3/1.6 ghz's some (from my thinking).

    But in any case, my numbers are decent enough. If you want, you can knock off 50 mhz off the average, or 100 or something, but the 808 mhz is still pretty decent for running GDI. So there



    **EDIT**
    Go search on google for '"average cpu speed" today', and go to the second page; from the first item on the list:
    The average CPU speed has increased from about 16 MHz in the year 1990 to over one GHz (1000 MHz) in 2000
    Last edited by Hunter2; 11-12-2002 at 09:10 PM.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  14. #29
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    Besides, GDI can be used very easily to make simple applications that don't take too much graphics-processing power (i.e. an application that keeps drawing a black rectangle).
    ... That means you dont use gdi in the actual game code but
    maybe for the map editor or bitmap loading.

    Considering that people use SDL and opengl together to
    do different stuft, it will be kind of hard to compare them.

  15. #30
    Registered User
    Join Date
    Jun 2002
    Posts
    132
    I will support my reply, only to help the guy, and not to argue with you. If you want to do something cool, trust me and learn D3D or GL.

    About your comment on GL is difficult, I can proove you wrong. From my experience in both APIs, D3D and GL, I will give you an example: I have started an engine in both APIs. The first one, was in D3D7, which then moved to D3D8. I spent 1 year programming the engine itself, finding bugs, etc, but it was never really "high quality". The problem was that I had to care a lot about COM, memory leaks, and all such. Then, I switched to GL. After 4 months of development (it still is under development), I have created a powerful engine, nothing compaired to the old one. So, what my point is? If you use SDL for window and input management and opegl for graphics, you could do miracles in short time, even in a week.

    Plus, GDI, which you seem to support well, doesn't get in depth with the 3D, or even the 2D programming basics. As you said, no double buffering, slow "rendering" of shapes, etc. However, I really suggest that you use GDI for making tools for your engine/game. If you have any argues about this matter (GDI vs D3D/GL/SDL/Allegro), please go to GameDev.Net, and ask in those forums, it is their job to ask these kind of questions.
    Y3K Network http://www.y3knetwork.com
    Bringing the software of the future on the net.

Page 2 of 4 FirstFirst 1234 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program Plan
    By Programmer_P in forum C++ Programming
    Replies: 0
    Last Post: 05-11-2009, 01:42 AM
  2. 2D RPG Online Game Project. 30% Complete. To be released and marketed.
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 10-28-2006, 12:48 AM
  3. Lottery game
    By geetard in forum C++ Programming
    Replies: 2
    Last Post: 12-19-2005, 11:50 PM
  4. need help with a guessing game program
    By davidnj732 in forum C++ Programming
    Replies: 3
    Last Post: 04-01-2003, 10:59 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21