Search found 58 matches

by cval
Mon Jun 27, 2016 10:13 am
Forum: Libraries and Tools
Topic: Spritebatch extension
Replies: 7
Views: 5944

Re: Spritebatch extension

I want to get additional api for spitebatches, like attached attributes for fragment shaders or setting different shaders for groups of sprites into one spritebatch, but it's hard, i think. You can access sprite vertex attributes in a vertex shader for future calculations and then use varying varia...
by cval
Sun Jun 26, 2016 9:59 am
Forum: Libraries and Tools
Topic: Spritebatch extension
Replies: 7
Views: 5944

Re: Spritebatch extension

[wiki]SpriteBatch:attachAttribute[/wiki] lets you attach a vertex attribute from any mesh to any SpriteBatch. You can even override existing attributes used by the SpriteBatch like colors (the "VertexColor" attribute), so you can implement custom per-vertex colors, texture coordinates, po...
by cval
Fri Jun 24, 2016 5:33 pm
Forum: Libraries and Tools
Topic: Spritebatch extension
Replies: 7
Views: 5944

Re: Spritebatch extension

Well, you will have a bottleneck if your sprites are going to be updated every frame, but in my application where i have, say, 20k of static sprites and around 500 dynamic, constantly updated sprites in a separate spritebatch, i don't really see much of a drop below 60 fps. But i imagine someone hav...
by cval
Tue Jun 21, 2016 9:32 am
Forum: Libraries and Tools
Topic: Pattern Generator v1.2b - Custom patterns!
Replies: 20
Views: 14331

Re: Pattern Generator v1.0b - Custom patterns!

Unless I got what you meant completely wrong :? The idea was to make a module that receives pattern parameters (by passing them as a table to it, by calling setter functions, by specifying preset file etc) and the canvas (or maybe raw imagedata object? canvas is way faster to draw on tho) where use...
by cval
Mon Jun 20, 2016 6:37 pm
Forum: Libraries and Tools
Topic: Pattern Generator v1.2b - Custom patterns!
Replies: 20
Views: 14331

Re: Pattern Generator v1.0b - Custom patterns!

Any chance you will release separate generator class for others to use in their projects? Like, for example, if i created nice pattern which i like, then save some sort of parameters into a file, and then by including this generator class into my project and feeding previously created file to this c...
by cval
Mon May 16, 2016 1:06 pm
Forum: Games and Creations
Topic: [Android] Asteroid Space Shooter
Replies: 18
Views: 11753

Re: [Android] Asteroid Space Shooter

Looks solid. Reminds me of an old game Spheres of Chaos (video is about 2012 remake, i think).
by cval
Wed May 11, 2016 10:20 am
Forum: Support and Development
Topic: Object recycling tips
Replies: 11
Views: 6368

Re: Object recycling tips

But one should also try and reuse the userdata types, more than the objects themselves. It is trivial for a particle emitter, since you can set any value to previously created one before with no problem, but i'm not sure about physics. Few examples - i found no way to change shape's dimensions or l...
by cval
Tue May 10, 2016 10:36 pm
Forum: Support and Development
Topic: Object recycling tips
Replies: 11
Views: 6368

Re: Object recycling tips

I wouldn't do this until you start having problems with GC pauses though, because it costs CPU to keep marking objects each frame. And that is another reason why i don't want to rely completely on GC, since in my application, there can be a situation with object creation spike, and while instantiat...
by cval
Tue May 10, 2016 10:30 pm
Forum: Support and Development
Topic: Object recycling tips
Replies: 11
Views: 6368

Re: Object recycling tips

Glad i've got pretty insightful opinion on the subject. I have the exact opposite opinion. :) The garbage-collector exists with the sole aim to relieve us, the programmers, of additional concerns about memory shenanigans. Why should I spend time and code in relieving it from what it does best? ;) I ...
by cval
Tue May 10, 2016 4:59 pm
Forum: Support and Development
Topic: Object recycling tips
Replies: 11
Views: 6368

Re: Object recycling tips

I'm generally really concerned on resource usage and in not wasting CPU/memory, but is it really worth in this case? Well, ofcourse, not always. Any wild and premature optimization usually ends up doing directly opposite to what it was initially designed for. So it depends on system architecture, a...