Home » Community » Newbie corner » Simple way to develope 2D Game (Do Upp include something to develope 2D Game ?)
Re: Simple way to develope 2D Game [message #51894 is a reply to message #51892] |
Wed, 12 June 2019 09:19   |
 |
mirek
Messages: 14258 Registered: November 2005
|
Ultimate Member |
|
|
Novo wrote on Wed, 12 June 2019 02:20mirek wrote on Tue, 11 June 2019 17:02It is however pretty hard, GPUs are not well suited for this, so the work was postoponed.
A couple of examples of what can be done.
Check this app. It is a Flash Player with hardware acceleration.
Well, sorry for original poster for being off-topic... Anyway:
It all seems to depend on "this" in above quote. If "this" is defined as "reproduce the Painter polygon semantics with 90% accuracy", then it really is a problem and tesselation is at the heart of it, the other issue being batching / OpenGL state changes.
It simply might be less problematic to render polygon with 100000 vertices in software than to tessalate it, send all vertices to GPU and then render.
Even more trouble: As what I draw is often map polygons, I have even tried the tactics of: tesselate map polygon once, store it in the GPU and then draw from data in GPU. Guess what: This is still slower than software rendering, because by the time OpenGL is finished with state changes to draw the polygon, software renderer is already done with that. So it appears that as long as you are doing glDrawElements in equivalent of Painter::Fill / Painter::Stroke, you have already lost. Means ideally you need to do single glDrawElements for the whole rendering, less ideally but still useably single glDrawElements per many Fill/Strokes.
That said, I have it in "postponed" state now. For now, I got stuck at "I need faster tesselator than tess2, but at the same time I need tesselator that is as accurate as tess2". While there are faster tesselators (e.g. https://github.com/mapbox/earcut.hpp), they are not as accurate, trivial polygon examples tend to fail with them. I have tried to implement my own, but the work is still in progress...
Mirek
|
|
|
 |
|
Simple way to develope 2D Game
By: Xemuth on Tue, 11 June 2019 12:28
|
 |
|
Re: Simple way to develope 2D Game
By: Novo on Tue, 11 June 2019 16:02
|
 |
|
Re: Simple way to develope 2D Game
By: Xemuth on Tue, 11 June 2019 16:26
|
 |
|
Re: Simple way to develope 2D Game
By: mirek on Tue, 11 June 2019 17:33
|
 |
|
Re: Simple way to develope 2D Game
By: Novo on Tue, 11 June 2019 20:05
|
 |
|
Re: Simple way to develope 2D Game
By: mirek on Tue, 11 June 2019 23:02
|
 |
|
Re: Simple way to develope 2D Game
By: Novo on Wed, 12 June 2019 02:20
|
 |
|
Re: Simple way to develope 2D Game
By: mirek on Wed, 12 June 2019 09:19
|
 |
|
Re: Simple way to develope 2D Game
By: Novo on Wed, 12 June 2019 19:13
|
 |
|
Re: Simple way to develope 2D Game
By: mirek on Wed, 12 June 2019 20:58
|
 |
|
Re: Simple way to develope 2D Game
By: Sgifan on Fri, 14 June 2019 17:59
|
 |
|
Re: Simple way to develope 2D Game
By: Novo on Sat, 15 June 2019 18:58
|
 |
|
Re: Simple way to develope 2D Game
By: huadong on Wed, 18 September 2019 10:20
|
 |
|
Re: Simple way to develope 2D Game
By: huadong on Thu, 19 September 2019 08:03
|
 |
|
Re: Simple way to develope 2D Game
By: mirek on Sat, 21 September 2019 14:11
|
 |
|
Re: Simple way to develope 2D Game
By: Xemuth on Sat, 21 September 2019 16:05
|
 |
|
Re: Simple way to develope 2D Game
By: Didier on Sun, 22 September 2019 14:48
|
 |
|
Re: Simple way to develope 2D Game
By: Novo on Sun, 22 September 2019 15:54
|
 |
|
Re: Simple way to develope 2D Game
By: mirek on Mon, 23 September 2019 09:23
|
 |
|
Re: Simple way to develope 2D Game
By: huadong on Sun, 22 September 2019 12:25
|
 |
|
Re: Simple way to develope 2D Game
By: Xemuth on Tue, 11 June 2019 19:02
|
 |
|
Re: Simple way to develope 2D Game
By: Xemuth on Sun, 16 June 2019 14:42
|
 |
|
Re: Simple way to develope 2D Game
By: Novo on Mon, 01 July 2019 05:22
|
 |
|
Re: Simple way to develope 2D Game
By: sunitapr on Wed, 11 September 2019 07:53
|
Goto Forum:
Current Time: Tue May 13 21:26:14 CEST 2025
Total time taken to generate the page: 0.01942 seconds
|