2

I am trying to make a 2D game that is just a bunch of default figures like circles, arcs and quadrilaterals with no textures (similar to Super Hexagon), and for that I was using C# and XNA long time ago, but recently I move my code to Java and LibGDX mostly using the ShapeRenderer library.

The problem appears when, reading in internet, I found that render this figures is a more computational cost task than just draw a texture or sprite. But by the nature of this project I just can't use sprites or similar, mostly because I will drastically scale this entities in the game, and when I scale an image the result is just not nice, blurry and/or pixelated.

What I asking for is if is a bad idea to render pure shapes for a game (no images, except maybe the background and text)? is ShapeRenderer a good approach? Do I should try with another way to manage this "not-affected-by-scale"-entities?

I have read some answer from here (like this or this) but they are focused on sprites, not just pure shapes.

For now, I got acceptable results and the game run smootly even when I create a lot of shapes, but in the future I plan to use effects and so, and I don't know if render shapes is the best answer or if this will affect the performance of my game (the game is focus for PC platform). I'm not limited only to Java, and if exist another language/framework that manage this with better result, I'm opened to learn it.

Thanks!.

Alex Sifuentes
  • 220
  • 2
  • 11
  • I think you've almost answered your own question with this line;"For now, I got acceptable results and the game run smootly even when I create a lot of shapes". To try it and profile it is a very good way for figuring out what works for you. – bornander Jun 26 '15 at 07:08
  • So if it works, should I keep going? – Alex Sifuentes Jun 30 '15 at 04:03
  • Yes. If it works it works. Be vigilant for performance issues and profile often, but don't give up a working way of doing something just on a hunch. – bornander Jun 30 '15 at 07:06

0 Answers0