Anyone know how to make a pixel perfect collision function that supports rotation of the sprites?
This is for a 2d game.
I have a feeling this is a performance killer.
Not Telling
Posted by P0jahn
on 30 March 2013 - 09:09 AM
Anyone know how to make a pixel perfect collision function that supports rotation of the sprites?
This is for a 2d game.
I have a feeling this is a performance killer.
Posted by P0jahn
on 17 March 2013 - 05:48 PM
Thanks all!
Posted by P0jahn
on 14 March 2013 - 11:28 AM
If you are talking to someone that is far away from you, you wont hear anything. As you move closer to him/her, the sounds becomes clearer and stronger.
I want to implement a logic like this in my game.
Posted by P0jahn
on 14 March 2013 - 10:51 AM
I need help with an algorithm for my 2D Game.
Say entity AA is emitting a sound. The strength of the emitting sound is determined by the distance between AA and BB(this could be the main character).
The further away they are, the weaker the sound is. The max distance(pass this distance and the sound volume is 0) is of course customizable.
The volume setting can be from 0.0 to 1.0.
Where and when to do these checks is not a problem. I know my engine and I can resolve that. How to check it is the problem.
Posted by P0jahn
on 27 January 2013 - 05:21 AM
Maybe you should get better at programming(a lot better) before start developing a game, which is a hard task.
Posted by P0jahn
on 25 January 2013 - 04:53 PM
You want to provide more details and information. In short all we can do right now is say "When the two objects are touching have them move together". You might also want to take weight into account and slow down the movements to simulate the first object struggling to move the second.
So say A is pushing B. If A is coming from the left, upon collision it will push B to the right.
If A is coming from above, it will push B downwards.
This quickly becomes pretty complex if you have multiple objects, where you can push an object which pushes another object and so forth. You're verging into full physics library territory here, so I would recommend you look into using an existing 2D physics library such as Box2D or Squirrel. Hooking up to these libraries is very easy, and they provide decently robust physics under a free license.
My game is not going to support multiple objects pushing each other. Integrating my game with a 2D physics library is just to much work for such small game. It would be like putting a 500 horse power engine in a piece of junk from the seventies.
Posted by P0jahn
on 10 January 2013 - 05:20 PM
There is a excellent mini series on youtube explaining how to set it up with eclipse and how to use it.
Part 1 of the series:
http://www.youtube.com/watch?v=box9T1e856s