mmorpg

This is a discussion on mmorpg within the Windows Programming forums, part of the Platform Specific Boards category; Would it be possible to make a very simple 2d mmorpg using just the Win32 api? I realize I problaby ...

  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    4

    mmorpg

    Would it be possible to make a very simple 2d mmorpg using just the Win32 api? I realize I problaby don't have the experience now but I was just wondering if it is possible.
    Thanks in advance.

  2. #2
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    Yes you could do that.

  3. #3
    Registered User
    Join Date
    Jul 2008
    Posts
    4
    Would it be efficient or slow because GDI was never really meant for games?

  4. #4
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    For 2D it would not be as fast as DirectX or OGL but I wouldn't call it slow on a modern system. It won't be hardware accelerated unless you use some GDI+ and even then HW support is minimal.

    However it can be done and Windows GDI is more than capable of dealing with tiles and sprites.

  5. #5
    Registered User
    Join Date
    Jul 2008
    Posts
    4
    So I guess you would recommend directx or openGL even for something as simple as this then?

  6. #6
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    I would not because of simplicity but because Windows GDI will not help you with widely accepted and used graphics concepts. GDI uses a very twisted scheme of DC's and selecting objects which is nowhere close to what the hardware is really doing. OGL and Direct3D will get you a bit closer to the hardware and will teach you a lot about how graphics are done.

    But if you don't know OGL or Direct3D and cannot afford a book or two to learn from then perhaps trying something in GDI would be a place to start.

    But maybe you could create a console app that had the core logic and flow of the game and design it in such a way that the 'rendering' could be plugged in later. For a temporary rendering system you could just use text graphics. Later you would replace this renderer with either a Windows GDI version, OGL version, or Direct3D version. All a renderer does is render the game data in memory to the screen so as to present it to the player in a meaningful fashion.

    So you have:

    - Game data
    - Game engine
    - Game renderer

    If you create an IGameRenderer interface you can then later plug a GDIRenderer, OGLRenderer or D3DRenderer in and as long as they implement the interface you could switch how the game is rendered with no changes to your system. This means you can design the game framework, networking, scripting, logic, etc. right now without ever worrying about how the data is to be presented.

  7. #7
    Registered User
    Join Date
    Jul 2008
    Posts
    4
    Thanks alot for the help. I'm still actually learning the Win32 api. I'm currently reading Programming Windows. Just one more question please. Do you know how mmo's work? I have know idea at all.

  8. #8
    Registered User guesst's Avatar
    Join Date
    Feb 2008
    Location
    Lehi, UT
    Posts
    179
    Quote Originally Posted by GameCreatoor View Post
    . Do you know how mmo's work? I have know idea at all.
    They rip out your soul, turn you into a zombie, and force you to abandon your former life.
    Type-ins are back! Visit Cymon's Games at http://www.cymonsgames.com for a new game every week!

  9. #9
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    Do you know how mmo's work? I have know idea at all.
    Never coded one. But I have some ideas.

    Perhaps this is a clear indication that you are biting off more than you can chew and should start simpler. Code up a basic framework with no graphics whatsoever and make each component separate. Then create your components and plug them in to your game framework. If you force yourself into this type of design you will save many headaches later. When you don't follow this you end up having a bunch of unrelated objects relying on each other which is a signature of poor design.

  10. #10
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    >>using just the Win32 api?
    Yes, I wrote a couple games in the past using only GDI (not GDI+). You can take a look at the graphics code I used (attached). It's kind of old code, and I'm pretty sure there's now better ways to do a lot of things (especially if you use GDI+, there are built-in functions that will deal with some of the uglier stuff). The functions you're probably most interested in are loadBmp(), drawBackTransBmp(), and swapBuffs().

    I would suggest taking a look at OpenGL, also. I recently looked up NeHe's OpenGL tutorial, and it seems that a lot of fun stuff like rotation, stretching, transparency etc. are made significantly easier (and faster) in OpenGL. It's a bit confusing to read at first (wtf is an 'orthographic projection'? heh), but once the initial setup is done, it's pretty straightforward.
    Attached Files Attached Files
    Just Google It. √

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

  11. #11
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Quote Originally Posted by GameCreatoor View Post
    Would it be efficient or slow because GDI was never really meant for games?
    GDI isnt meant for 3d games. You can get over a couple hundred frames per second easily with 2d games. We use GDI a lot in our applications, albeit they arent games, and have never been able to show any decrease in performance due to GDI. We also use Direct3D, it depends on what we are displaying (security footage, or an in flight rendering of a weapons system).
    Last edited by abachler; 07-20-2008 at 12:04 AM.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. New MMORPG
    By Tantalar in forum Projects and Job Recruitment
    Replies: 1
    Last Post: 11-25-2007, 12:42 PM
  2. Commerical MMORPG Developer Opp
    By Th3Guy in forum Projects and Job Recruitment
    Replies: 19
    Last Post: 01-22-2007, 11:28 AM
  3. MMORPG - What coding langauges?
    By XunTric in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 12-27-2005, 03:32 PM
  4. Tagen mmorpg
    By Shannon Moore in forum Projects and Job Recruitment
    Replies: 4
    Last Post: 07-23-2005, 05:54 AM

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