Ferit Özcan
Ferit Özcan

Reputation: 31

Libgdx painting game logic

i'm learning libgdx in purpose of building a realtime multiplayer painting game. Game will last in 120 second and 4 people with 4 different colors will race to paint more portion of the screen.

Now i'm trying to implement circular painting as player moves. As i made some researches, i saw that i can use pixmaps to implement such behaviour. As game updates, i will fill a circle at players x and y with radius r and draw a texture that scales the screen from pixmap( which is also game map). Is there a better way to achieve this?
And i must make it for all resolutions. 1024X1024 resolution versus 240x240 must be able to play. Can i do this by using lowest resolution pixmap and drawing a scaled texture from it? Thank you...

Thats the game im trying to do.. https://www.youtube.com/watch?v=EU8Eyh0tZOo&t=270s

Upvotes: 1

Views: 332

Answers (1)

Deniz Yılmaz
Deniz Yılmaz

Reputation: 1094

You need to use Framebuffer for this kind of game. Pixmap is extremely slow for using every frame.

https://github.com/mattdesl/lwjgl-basics/wiki/framebufferobjects

And yes you can make all resolutions play together like this.

Upvotes: 1

Related Questions