Thread: Non-Frame based game

  1. #1
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459

    Non-Frame based game

    Hello,

    Im currently in the planning stages of a simple 2d non-frame based strategy. It's basically a birds view of a map with little units on it.
    Since its not frame intensive, i've chosen to use GDI (clean and simple). However for the map, in which the cursor interacts with units.
    Should I just be displaying a bitmap, and bitmaps ontop of it OR use a custom control? with a grid? - Which is best for performance (I know it depends on how it's done, but is there any performance advantage of a cust-control?)

    Thanks in advance, I hope i'm being clear on what I'm trying to do.

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Best for performance is not using GDI, of course. Neither do I think that GDI is particularly "clean" or "simple".

    That aside, the best method is to use BitBlt (or a similar function - you might need masking) to blit sprites to an offscreen buffer and then blit it all to the screen. (Yes, you should do that even in non-frame-based games.)
    As for the canvas, that should be a plain window.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. craps game & dice game..
    By cgurl05 in forum C Programming
    Replies: 3
    Last Post: 03-25-2006, 07:58 PM
  2. beach bar (sims type game)
    By DrKillPatient in forum Game Programming
    Replies: 1
    Last Post: 03-06-2006, 01:32 PM
  3. PC Game project requires c++ programmers
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 02-22-2006, 12:23 AM
  4. Game Designer vs Game Programmer
    By the dead tree in forum Game Programming
    Replies: 8
    Last Post: 04-28-2005, 09:17 PM
  5. Animation not working....
    By aquinn in forum C Programming
    Replies: 7
    Last Post: 02-19-2005, 05:37 AM