How does it work in DM?
What variables should i be looking at?
What should i be doing to ensure it works fine?
And themost important question, is that can i calculate the angel of an bounce using the same system using a formula. (Say a circle)
ID:156428
Oct 10 2010, 12:26 pm
|
|
Oct 10 2010, 1:11 pm
|
|
Try searching Pixel Movement under resources and going through the code as if you yourself were a compiler, and read any comments. There is a side-scroller example
|
These links might help:
http://www.byond.com/developer/Forum_account/PixelMovement http://www.byond.com/developer/Forum_account/ SidescrollerDemo http://www.byond.com/members/ Forumaccount?command=view_post&post=99026 The first link starts off with some very basic stuff, the code isn't too complex. The second link is a fairly complete sidescroller that's built off the first demo. The last link is a blog post that explains some things about pixel movement. |
Gamemakingdude wrote:
And themost important question, is that can i calculate the angel of an bounce using the same system using a formula. (Say a circle) Easy: θr = θi |
In response to Garthor
|
|
?
θ is Theta, the 8th letter of the Greek Alphabet. Unless it is intended as something else? Circumference possibly? |
In response to Forum_account
|
|
How would i check each time that the size of my player is different each time?
|
In response to Gamemakingdude
|
|
It's pixel collision, as in, pixel by pixel. Your question is sort of irrelevant. You really need to get working on putting in more effort instead of asking for us to hand each and every part to you.
|
In response to Gamemakingdude
|
|
I'm not sure what you're asking. The demo uses rectangles to approximate the size of your character when checking for collisions. Unless the player's shape changes drastically you shouldn't need to change the dimensions of the bounding box.
|
In response to Forum_account
|
|
So if it was 49x26 would it still find it out?
|
In response to OrangeWeapons
|
|
Theta signifies an angle in mathematics.
|
In response to Garthor
|
|
Garthor wrote:
Gamemakingdude wrote: I think r is refraction and i is infraction or whatever it is. Though in all honesty, that's not the programmatic way of doing it. From memory, you need to use a few if statements for the four quadrants of the triangle, then just reverse the angle in the right direction. Becomes more complicated when it bounces off an angled surface. |