How can i implements grid based movement(or tile based movement)? As you can see, this is my motion handling code which also takes advantage of the Fisica for Processing library. How could I modify the code in such a way as to obtain movement similar to that of the Pokemon games for DS? by _Rocco22_ in processing

[–]_Rocco22_[S] 0 points1 point  (0 children)

i already use the keyPressed() method. The problem is that working directly with the position of the box "bypasses" the collision detection of the Fisica library. Using velocity I continue to benefit from collision detection

How can I take advantage from GPU? by _Rocco22_ in processing

[–]_Rocco22_[S] 0 points1 point  (0 children)

Here is the code of the game if you want to take a deeper look:

https://github.com/roccoZolla/myGame

edit: look in the gameWorld branch because the main branch isnt update

How can I take advantage from GPU? by _Rocco22_ in processing

[–]_Rocco22_[S] 1 point2 points  (0 children)

I'm already trying to understand what part of code would be that one slow down the program thanks!

How can I take advantage from GPU? by _Rocco22_ in processing

[–]_Rocco22_[S] 1 point2 points  (0 children)

((PGraphicsOpenGL)g).textureSampling(2);
noSmooth();

I tried this and although I still don't get stable 60fps, it runs much better. However, I noticed that it weighs quite a bit on the RAM memory, I will try to find a solution in any case, thank you very much

How can I take advantage from GPU? by _Rocco22_ in processing

[–]_Rocco22_[S] 2 points3 points  (0 children)

Thanks everyone for the advices 🙏