Jump to content
  • Advertisement
  • entries
  • comments
  • views


Sign in to follow this  


I spent most of my time battling with pixel perfect collision last night. At present I build up simple on/off bitmask for my loaded sprites. It's like a cut-down alpha channel which is used purely for collision. It was pretty neat as I had it write out the flag to the console as it was building it up - I saw my graphics in glorious ASCII art so I know that bit works. I should get it finished up tonight...

I've been thinking about the triggers that people will need and it raised some interesting points about collision detection. Mainly, we don't have to collision check every entity in the game. Instead, I'm thinking about providing collision type lists - so that the user creates an entity and registers that it can collide only with a certain type of entity (or entities). This would allow you to create your player and say "I only want to collide with entity types for the bad guys ('boss', 'grunt', 'etc')" and the game will only check tese collisions. The different bad dudes won't try and collide with each other unless you specify it. Collisions could come in the form of a trigger or just a built-in test which raises an event. I'll probably go for the later version of this as it makes more sense.

I'll be adding in TileMaps soon. Being a 2D game engine tilemapping and the scrolling functions are paramount (IMHO). Tilemapping will be an interesting beast - I need to allow it to be intelligent enough for a user to pass an array-like structre to use for the tile offsets. The closest thing GM has is the table, so I might create my own array.

Sign in to follow this  


Recommended Comments

I saw my graphics in glorious ASCII art

I forget how you do it, but you can tell ATI 3D cards to convert games to "ascii art". That's always good for a laugh.

I have to admit I'm a little confused about your collision detection choices. Won't you end up with cases (e.g. the "bad dudes") where some entities overlap because they haven't been configured not to? Or will the AI/controls/whatever stop that happening?

I can understand the idea in terms to reducing the number of collision tests so as to improve performance; but I can think of a number of other ways to do that and maintain everyone-collides-with-everyone...?

With reference to your reply to my comment last time... looking forward to some GUI-type stuff!


Share this comment

Link to comment
Oh, I was just reading some stuff on GameMonkey and thought how useful delegates would be in it... Wouldn't that be cool. I really should do up that wrapper someday.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!