Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Beziers and Moving Vector Graphics

Post any examples or modules that you want to share here

Re: Beziers and Moving Vector Graphics

Postby trogluddite » Wed Feb 13, 2013 10:03 am

Never fear - I will base some more usable small modules around the classes when they are done - and some short tutorials for the methods.
I just want to make them as complete and bug-free as I can first, so that I don't have to issue lots of updates later.
The game is really a stress-test for the new methods, to make sure they behave themselves and are not using too much CPU - and a bit of a 'sneak preview'.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Beziers and Moving Vector Graphics

Postby Perfect Human Interface » Sat Apr 06, 2013 2:26 pm

Whoa this is fun! :D
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Beziers and Moving Vector Graphics

Postby billv » Sat Apr 06, 2013 11:53 pm

Great stuff trog.
That code is getting printed out and sent to the smoking section :D
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

Re: Beziers and Moving Vector Graphics

Postby billv » Mon Apr 15, 2013 12:21 pm

Hey Trog, I thought I'd try to automate the game, via a modulator,
... easy enough, really interesting to see what wave file gets the best score.
This idea is a great experiment for a "AI" system, you know, see if you can create
a program, which beats your game!!!!!!!
This mod is a good way to start.
Vector Graphics Demo_BV.fsm
(297.13 KiB) Downloaded 1261 times

If I could work out simple things like:"how close is the asteriod" ...I could program a tweak
in the modulator, activating the required counter measure.

PS: How do you stop it when it has started?
PS: My player spins in one direction only-
In order to beat Trog, the player will have to at least alternate... :)
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

Moving Vector Graphics (and Asteroids!)

Postby trogluddite » Sun Apr 21, 2013 2:44 am

Hi Billy,
That's a really whacky idea - very entertaining. I copied the LFO and put one on the 'thrust' control too, but the spaceship seems to end up off the screen most of the time!!
Like the AI idea - I could quite easily bring the array of asteroid positions to an output somewhere- though you have to be careful; it's not the closest one that's most dangerous, it's the one that coming straight at you!
To make the ship spin the other way, you just have to give the input a negative number (zero = no spin)

Anyhow, I just noticed that post because I was here t post the latest update - to the graphics classes and the game!
GRAPHICS CLASSES 3_07 PEW.fsm
(179.75 KiB) Downloaded 1277 times

Asteroids has had a bit of a graphical makeover; a much prettier looking spaceship and rockets - and in the true 'retro-gaming' spirit, I also added some truly annoying as hell sounds as well!
And the graphics classes have come along a bit. The animated 'sprites' can now handle all of the standard FS vector shapes, curves, arcs etc., and I've added a bit of documentation and a quick example of how to build a new shape.
Loading shapes from .svg files, and getting my path editor finished, is the next thing i want to get working - lists of co-ordinates really aren't a nice way to build cute rocket ships out of bezier curves!

So, that's all kinda cool, but all is not completely rosy...

With the new, more complex shapes, the game really pushing the GDI+ graphics to the limit (which was what I made it for really) - more than about 10-15 asteroids on screen, and the audio starts to get really glitchy. I'd be interested to hear how bad that effect is for anyone else who fancies giving it a go. (Q6700 CPU here, and ASIO buffer at 160samples)
Not much that we can do about that really - GDI just isn't designed for animation, and we're stuck with it unless the dev's finally add some graphics hardware acceleration.
The good news is that the massive amount of Ruby processing to transform the shapes doesn't seem too bad CPU wise - it's just those damned GDI screen re-draws that are really killing everything. So the vectors should still be practical for plugin controls etc. as an alternative to bitmaps, but funky animated displays will fare not much better than they did in SM, CPU wise.

Also a possible FS bug...
If I load the schematic with the audio driver disabled, and then turn it on after the game has started, the MIDI generated sounds don't happen. There is sound, because I can hear the engine noise (which doesn't use MIDI).
Breaking/making a link in the audio section brings the sounds back to life. Once that's done, I can turn it on and off just fine, but it simply won't initialise unless the driver is running at load time. Checking with a few readouts etc., it seems that the entire poly section in the soundFX synth is utterly dead until I manually reset the audio - not even any pitch data coming out of the VtoP.
Same problem with exported .exe's - 'stream' sound works fine, but no Ruby/MIDI sounds get generated after choosing a driver from the audio menu.
I'd be interested to know if anyone can replicate this before I report it - it happens exactly like that every single time here, and I can't see how it would be a driver issue, as the 'non-MIDI' engine noise gets generated just fine.

PS) My high score is now 34460 (level 6) - seems to be a little easier to play with sound, you don't have to watch so closely to check that you hit something!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Beziers and Moving Vector Graphics

Postby billv » Sun Apr 21, 2013 6:52 am

trogluddite wrote: I copied the LFO and put one on the 'thrust' control too

Cool. I'm thinking the thrust needs a "proximity trigger" to activate it.
So if these conditions are both true, then perform action:thrust:
a: if asteriod within a certain range
b: if ship cant turn in time to defend
trogluddite wrote:I could quite easily bring the array of asteroid positions to an output somewhere

Thanks trog. It would be enough, at the moment, with just one parameter, and keep breaking it down....
So lets try this "thrust" thing first.
Can you work out the "is asteriod within a certain range" part from your code and output it.
A "proximity trigger" would keep me busy for a long while.........
trogluddite wrote:To make the ship spin the other way, you just have to give the input a negative number (zero = no spin)

I know , it was the first thing i tried, putting a min/max module on the mod output, setting to min-0.5
max0.5, but i don't get a result. Still can't work out why :?
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

Re: Beziers and Moving Vector Graphics

Postby TomBrown » Fri May 06, 2016 12:24 pm

I know one website where you can download free banner vector and other vector images. All of them are royalty free, so you can use them for your own blog or website. Try to and I'm sure you'll like it. Good luck.
TomBrown
 
Posts: 1
Joined: Fri May 06, 2016 12:21 pm

Re: Beziers and Moving Vector Graphics

Postby aronb » Sat May 07, 2016 5:41 pm

Hi,

Trying to run Trog's "Vector Graphics Demo.fsm" (http://www.dsprobotics.com/support/download/file.php?id=1084.

However I am getting an error "TypeError: ('in method draw'):Thread can't be coerced into Float" - I remember playing this a couple of years ago too ??? But now on 3.0.8.1... and it does not work... :(

Does anybody know what is going on here ? I don't even recognize this error type "Thread coerced into Float"??? And a few other go by too fast to see, but looks like thread numbers...?

Thanks,

Aron
User avatar
aronb
 
Posts: 154
Joined: Sun Apr 17, 2011 3:08 am
Location: Florida, USA

Re: Beziers and Moving Vector Graphics

Postby tulamide » Sat May 07, 2016 6:46 pm

Don't have the time to look at the schematic in detail, but the error message you get is from a try to use a thread class as if it were a float class. Maybe there was a glitch back then that allowed it?
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Beziers and Moving Vector Graphics

Postby tulamide » Tue May 17, 2016 12:51 pm

Hey aronb,

just had a deja-vu. Look at the Ruby code. If there is an input called @x, replace all occurrences with another name (including the input)
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Previous

Return to User Examples

Who is online

Users browsing this forum: Google [Bot] and 10 guests

cron