-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|741|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Showcase Home -> Graphic Demos


 
HoboBen
Created : 08 March 2010
Edited : 02 May 2020
System : Windows
Language : Cobra

SVG Tech Demo 1

Quick tech demo showing an SVG image of a star with a gradient being deformed. The star has 80 points for a detailed deformation.

SVG Tech Demo 1 - Update 5
Screenshots
Quick tech demo showing an SVG image of a star with a gradient being deformed. The large star has 80 points for a detailed deformation, and the smaller stars have 40 points.

The loader and SVG editor are still works in progress.

(and it needs a *lot* of optimisation!)

Latest Update

Release 5:
In-lining a function gave me another 10fps. Showing off rotations as well.

Release 4:
Managed to squeeze out another 5-10fps.

Release 3:
Much more optimised, can now do about 40fps with 1000 points per scene.

Release 2:
Optimised by reducing calls to the bottleneck function. - Frame rate doubled.

 

Comments


Tuesday, 09 March 2010, 05:35
HoboBen
Updated with doubled frame rate... still needs a lot more optimisation to be feasible for a proper real-time game though.
Tuesday, 09 March 2010, 07:34
Jayenkai
Neat!
So, if you did 100 stars, does it slow down per-star, or is there some sort of re-use caching thing you can do?
Tuesday, 09 March 2010, 09:30
Mog
My experiences with anything SVG was pretty horrible- isn't exactly the best medium to use speed-wise. More power to you if you can get it at a decent framerate.
Tuesday, 09 March 2010, 11:04
Afr0
Framerate doubled? So... you had 15 FPS, you get 30FPS?
That's a pretty good framerate, no?
Tuesday, 09 March 2010, 14:39
HoboBen
Not nearly good enough for a screenful of Svgs but after sleeping on the problem I think I can get another 4x speed increse without much effort.
Tuesday, 09 March 2010, 15:13
Jayenkai
Out of interest, how quick is it un-filled?
Tuesday, 09 March 2010, 15:28
HoboBen
Unfilled I can fit 10 stars in and get 100fps... (that's 800 points, these are ridiculous stars!) It's not the drawing commands that cause the slow down, it's calculating exactly where to draw.
Tuesday, 09 March 2010, 16:20
JL235
Then can't you calculate that once, store it in a bunch of arrays and when you draw you just offset the values in the array by the location on the screen?
Tuesday, 09 March 2010, 17:09
HoboBen
Woo! New update, much much faster. The smaller stars each have 40 points, so they're quite detailed for titchy stars.
Wednesday, 07 April 2010, 14:13
dna
Did you use BB2d, B3D or BMax for this?
Wednesday, 07 April 2010, 14:16
Jayenkai
The little black oval says Cobra