Non-Tile Based 2d Side Scroller
Hey guys,
Me and my friends have been working on a game for a while now, and we've been running into alot of problems
the game we're making uses 1 big image as a the level background image, and we use a Black and White picture to do the collision detection all this is is working now.
However our character is 64*64 and only one point of the image collides with the Collision Data (Black and White Images) how do I get the bitmap to be recognized as 64*64 rather than just 1 pixel at the top left hand corner.
I am using wxWidgets as our FrameWork. I am willing to post the code however you need to have wxWidgets installed with Visual Studio
We are running into a corner and we're thinking of starting over, and do a simple tile based game.
Thx
Me and my friends have been working on a game for a while now, and we've been running into alot of problems
the game we're making uses 1 big image as a the level background image, and we use a Black and White picture to do the collision detection all this is is working now.
However our character is 64*64 and only one point of the image collides with the Collision Data (Black and White Images) how do I get the bitmap to be recognized as 64*64 rather than just 1 pixel at the top left hand corner.
I am using wxWidgets as our FrameWork. I am willing to post the code however you need to have wxWidgets installed with Visual Studio
We are running into a corner and we're thinking of starting over, and do a simple tile based game.
Thx
I dont know what your code looks like but it sounds like you are shooting for a single pixel rather then the width of the object. There are a number of ways to detect collision for an entire object. It depends on how to set things up, if you only need basic detection you can set four points on on the top, bottom, left and right and test for collision or you can create a bounding sphere and detect for hits on that.
All depends on how you set up you system in the first place.
All depends on how you set up you system in the first place.
we tried the bounding box method, we created 2 rectangles 1 for the player and 1 for the enemy.
and we check whether the rectangle intesect if they do we make them stop moving but that didn't seem to work.
so now we are using the code from this link
http://www.gamedev.net/reference/article...cle735.asp
and we also ran into another problem.
the thing is we are very new to object oriented and we were kinda forced to write a whole game based on object oriented from the ground up. so now we're kinda stuck.
and we check whether the rectangle intesect if they do we make them stop moving but that didn't seem to work.
so now we are using the code from this link
http://www.gamedev.net/reference/article...cle735.asp
and we also ran into another problem.
the thing is we are very new to object oriented and we were kinda forced to write a whole game based on object oriented from the ground up. so now we're kinda stuck.
wxWidgets... Ugh. You are better off going SDL.
If you are trying to do collision of two silhouettes, you're going to have a hell of a time with that. You are better off doing bounding boxes and circles. Code is readily available on the net.
If you are trying to do collision of two silhouettes, you're going to have a hell of a time with that. You are better off doing bounding boxes and circles. Code is readily available on the net.
---Kelvin--
15.4" MacBook Pro revA
1.83GHz/2GB/250GB
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Side-Scrolling | pchukwura | 7 | 8,094 |
Dec 27, 2010 10:14 AM Last Post: pchukwura |
|
| Tile Based Map Arrays for Collision Detection | paulkite | 4 | 4,399 |
Oct 27, 2004 12:02 PM Last Post: KiroNeem |
|
| Slopes in Side-Scrollers | Bachus | 8 | 6,307 |
Jun 5, 2002 08:06 PM Last Post: Unregistered |
|
| Beginner, 2D side scroller | Why37 | 2 | 5,241 |
Apr 26, 2002 10:40 PM Last Post: Why37 |
|

