PLEASE HELP

Started by
1 comment, last by Jonboy433 23 years, 10 months ago
I am using Borland C++ Builder and I am trying to make a tile-based game. I have some code already written for the attributs but I am having a problem actually displaying the map in my window. Any ideas?
Advertisement
Are you using GDI or DirectX?

- DarkMage139
"Real game developers don't change the rules. Real game developers don't break the rules. Real game developers make the rules!"
"Originality (in games) is the spice of life!"
- DarkMage139
JonBoy433-

I have been working on a hex-based games using Borland C++ Builder. I am working with a 3 year old Pentium 2-233, so unless you are aiming for quite a bit older hardware, this works well for me and should for you, I think.

I created a form with scroll bars that is the size I need for my map at design-time. The size can be changed at run time to let the user change the map size, if needed. I then draw the complete map on the form - my current map is made up of just under 10,000 hexes and 60,000 hexsides, which I draw from bitmaps with transparent areas. This whole process takes the program on my 233 about 10-15 seconds to draw and it scrolls smoothly after that.

I also currently have about 150 pieces that inherit from the bitmap button class, but I will be using over 2000 when I am done. Using these allows the pieces to be moved without having to specifically redraw the map - they are on top of the map as separate objects and so do not change that layer. I have also added code to scroll the map if you get to the map edges, or it centers on any mouse clicks on the map - all of this goes smoothly.

I don't know if this will work with what you plan, but it does the trick with what I am trying to do - a hex-based wargame.

There is also a forum here that just started called Turbo which is for Borland compilers - a lot of it is about Delphi but they do talk about C++ Builder there also.

RickyB


Edited by - RickyB on June 14, 2000 10:57:44 AM

Edited by - RickyB on June 14, 2000 11:00:14 AM

This topic is closed to new replies.

Advertisement