Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 21 Feb 2002
Offline Last Active Yesterday, 11:35 PM

Posts I've Made

In Topic: C++ errors for the past days...

19 July 2014 - 09:04 AM

Maybe a simple "Rebuild all" fixes an intermediate problem (sometimes happens). If that doesn't work: Somehow the linker thinks you have two methods named WinMain in your code files. Look/Search through all files listed in "Solution Explorer".

In Topic: Air Control: Parody Game or Just Bad?

16 July 2014 - 11:42 PM

As someone on Steams forum said: Quality Control. Do you know what does it mean?

In Topic: Win32 BOOL and bool ?

16 July 2014 - 08:04 AM

The consensus for the Windows defined types is, usually you DO NOT mix them. Pass a BOOL to a BOOL etc. Don't assume, just because they sound samey, that they are the same. There's usually a reason why they added a new type instead of reusing an existing one.

In Topic: SlimDX background color

08 July 2014 - 10:44 PM

AFAIR clear fails if you add flags which your backbuffer doesn't have (like clearing the z buffer if you have no z buffer enabled)

In Topic: Organizing a map structure for a top-down tile game

07 July 2014 - 11:56 AM

You're throwing away a lot of advantages of a tile map.


IMHO: I always cringe when I see someone defining a tile class for a simple tile map.


For one, the indices of your tile array are all you need for positions. The tiles themselves don't need any, since you can deduce the position from the indices already.

Determining the tiles to draw is a simple calculation. With camera offset and screen size you can calculate the starting end ending indices of tiles on the screen.


Adding entities to tiles sounds good on a glance, but you already saw some disadvantages yourself. Also, when entities move you'll be constantly updating tile pointers. When an entity is on the move between tiles, which tile do you add it onto? Which tiles entities do you check for collision when an entity moves?

I'd put entities in a separate list, optionally a spatial container. This lets you reduce overdraw easily.


What's left for the tiles? Indices to the image. These could be stored directly, so you end up with a much simpler two dimensional array.