Recommended Posts

i currently understand a pretty good ammount of c++ but say if i wanted to begin makeing simple games...i understand for graphics i need to pick up an API such as opengl or d3d....how does this work tho? say i wanted to make a map....how do people use the library to make a room a certain size and an object that looks like a car....? any beginner tips or answers to these questions + more would be greatfull :) thx

0

Share this post

Link to post

Share on other sites

It really depends on what API you're using; when I first started programming games, I used Allego, which allowed me to draw simple primitives and bitmaps. The rest of the programming is up to you. If you wanted to make a tile-based map, then you'd start with a two-dimensional data structure to represent which tile. When drawing the map, you'd draw bitmap A when tile[0][0] is 1, bitmap B when tile[0][0] is 2, etc... Objects, such as a car, then can be drawn on top of the map.

Share this post

Link to post

Share on other sites

Original post by nuclear123wouldnt it be hard to program a floor for a map then a building without actually haveing a visual representation to work with?

Yes, but thats what dev tools are designed for (you know, map editors and such like). For now you are going to have to hardcode your tiles in an array (or load the map through a simple text file) but as you progress you should learn a RAD (Rapid Application Development) tool to build your own map editor that saves and loads your own custom map file format (alternatively you could find someone else map editor and use that, but wheres the fun in that).