# Help! making a game project

**URL:** <https://discourse.processing.org/t/help-making-a-game-project/17681>\
**Category:** Coding Questions\
**Created:** [February 10, 2020, 5:00am UTC](https://discourse.processing.org/t/help-making-a-game-project/17681 "2020-02-10T05:00:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thaunagamer](https://avatars.discourse-cdn.com/v4/letter/t/ac8455/32.png) [@Thaunagamer](https://discourse.processing.org/u/Thaunagamer)\
**Post date:** [February 10, 2020, 5:00am UTC](https://discourse.processing.org/t/help-making-a-game-project/17681/1 "2020-02-10T05:00:16Z")

</div>

Back again. This portion is part of one of my levels where i have 5 levels with platforms the “player” (shape) is suppose to navigate through with out touching. on my previous level i was able to make to 2 levels with platforms and the player wasn’t able to move through the platforms.

The problem is now i guess because i have so many platforms at different heights that action doesnt work for every platform drawn…  
Could anyone tell me what wrong?

## Some Variable info

## _int platformY = 450; // the green platform at the bottom._ _//set Width and height. The x and y-vaules here at the starting set points._ _int time; // for my text to appear and disappear._ \*int playerWidth = 30; \* _int playerHeight = 30;_ _int playerX = 250;_ _float playerSpeedY = 0;_ _float playerY = 50; // how fast the player moves_

 ![Screen Shot 2020-02-09 at 11.53.29 PM](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/7/7758b0ba291095f511847a69ac4ac8deccb33f16.png)

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [February 10, 2020, 12:57pm UTC](https://discourse.processing.org/t/help-making-a-game-project/17681/2 "2020-02-10T12:57:34Z")

</div>

Hello,

please don’t post screenshots but post your entire code as text.

Format it with sign `</>` in the small command bar.

thank you!

> because i have so many platforms at different heights that action doesnt work for every platform drawn

You don’t say precisely what your problem is and we can’t run your code.

**The usage of ==**

You often say if playerY == ; the usage of == might be a problem because when the playerY is 176 instead of 175 it wouldn’t match. Consider if(playerY \> 170&& playerY \<179 …

Also, you could use `if...else if....` because when the player hits one platform he is not hitting another one in the same frame.

If you can, you could make an array (see tutorials on the website) of platforms and for loop over them. Would really shorten your code.

Chrisir
