Steamをインストール
ログイン
|
言語
简体中文(簡体字中国語)
繁體中文(繁体字中国語)
한국어 (韓国語)
ไทย (タイ語)
български (ブルガリア語)
Čeština(チェコ語)
Dansk (デンマーク語)
Deutsch (ドイツ語)
English (英語)
Español - España (スペイン語 - スペイン)
Español - Latinoamérica (スペイン語 - ラテンアメリカ)
Ελληνικά (ギリシャ語)
Français (フランス語)
Italiano (イタリア語)
Bahasa Indonesia(インドネシア語)
Magyar(ハンガリー語)
Nederlands (オランダ語)
Norsk (ノルウェー語)
Polski (ポーランド語)
Português(ポルトガル語-ポルトガル)
Português - Brasil (ポルトガル語 - ブラジル)
Română(ルーマニア語)
Русский (ロシア語)
Suomi (フィンランド語)
Svenska (スウェーデン語)
Türkçe (トルコ語)
Tiếng Việt (ベトナム語)
Українська (ウクライナ語)
翻訳の問題を報告
http://www.youtube.com/watch?v=5hMujzHSso8&list=SP_pDUk-0qMnd47pdkELJEU0dJE545xX7G&index=6
Gravity and vertical collisons:
http://www.youtube.com/watch?v=v-uv_Xp8X_w&list=SP_pDUk-0qMnd47pdkELJEU0dJE545xX7G&index=3
Hope that helps :P
A box, a circle, a star. Whatever the shape it should not matter. If you are checking for a place meeting at a future location. It basically ensures that if any pixel of object 1 would be in object 2 it is true.
The second bit under checks 'vsp' pixels in either direction for a collision. If 'false', it then checks '1' pixel in either direction for a collision. If 'false', it then uses a repeat iterator (I prefer this rather than a while as it prevents infinite 'game-crashing' loops) to loop through every possible pixel between the object and 'vsp'. If there is a collision at the current 'vsp', the 'vsp' is reduced by 1. If there is no collision, then it breaks out of the loop. The vsp is then 'floored' (truncate the decimal) to fix any decimal offsets.
The last bit under simply checks 'vsp' pixels in either direction for a collision. If 'false', the object's 'y' position is then updated by the 'vsp'.
-------------------------------------
Also, a MAJOR ISSUE I noticed with your horizontal movement is that you manipulate the 'y' position of the object. Horizontal movement is performed on the x-axis, so you need to check for collision along the x-axis and alter only the 'x' position. The 'y' position isn't altered in horizontal (left / right) movement.
Also the OP has not responded in 15 days.
because I am running out of time to get the game done since its for an assessment i opted for a dumbed down version of what i inteded to do by using the drag and drop. I do intend to make a proper version of this game in the near future but i might wait until we pick up game programing in java next trimester.