Advertisement

What does a 2d engine need to do?

Started by October 13, 2000 10:16 PM
3 comments, last by maketty 24 years, 3 months ago
I would like to begin work on my 2d shooter but I don''t really know where to start... I know C++ well ( I could use work) and I know some about Direct X, can anyone give me some basics of what to do in my 2d engine to get started? Maketty (Matthew FitzGerald) Knightvision Games
Matt F. when you need a
newbie and only the best will DO
Maketty (Matthew FitzGerald) The meaning of Life part 5:Live organ transplants...
well you need to be able to:

- Load in a bitmap from a file, or from a resource, to a DDraw surface and blit it to the screen
- Know how to control all your sprites - their position, velocity, attributes, etc.
- If its a tile-based game, know how to loop through and render the tiles, and if you want its a good idea to learn how to read info from a file.
- If you want it to be a scrolling engine, then you''ll want some way to have smooth scrolling
- You''ll want to keep track of every individual game object - a linked list might be a good idea.. e.g. have a linked list of enemies.

if you know most of that, (well you dont even need to know most of that, just some of it ) then you can start coding
i would have something like this:

Init() - init the game

Main() - main game loop
in this loop, you need to:
poll input
process input
draw map
draw game objects
process other stuff

Shutdown() - shutdown the game

ofcourse you should have a million other things in there, but i hope that gives you an idea of how to get started
Advertisement
Thank You quantum I really appreciate your responses because they are helpful and informative! I think I have a pretty good Idea of what to start with!


Maketty
(Matthew FitzGerald)
Knightvision Games
Matt F. when you need a
newbie and only the best will DO

Maketty (Matthew FitzGerald) The meaning of Life part 5:Live organ transplants...
oh, and i forgot to mention, there are plenty of articles here at gamedev.net (references -> programming), and if you cant find it here then try having a look at flipcode.com
Thank you Quantum!


Maketty
(Matthew FitzGerald)
Knightvision Games
Matt F. when you need a
newbie and only the best will DO

Maketty (Matthew FitzGerald) The meaning of Life part 5:Live organ transplants...

This topic is closed to new replies.

Advertisement