vector graphics ?

Started by
4 comments, last by Cafall 21 years, 6 months ago
Hey, has anyone ever used vector files like .swf instead of regular raster files for games? I mean in c++ instead of using programs like flash to play them. It would be very cool to be able to use animations made in flash etc for cartoon type graphics. This could reduce download size of 2d games a great deal... How difficult would it be to for example read a animation in flash .swf format and use it in your game? [edited by - cafall on October 19, 2002 9:37:00 AM]
Advertisement
It depends on how tightly you want it integrated. A hacked in ActiveX control floating over your screen could be done in a few lines of code. To find out what would fit your needs head over to
OpenSWF.org and check out the spec, code and tutorial sections.
I was thinking more of simpy using it as a alternative to storing graphics in for ex. .bmp files. I would do all the game specific stuff in c++.

So loading the graphics in, load them into a directdraw surface or d3d texture would be all I want. Maybe I could use a activex control to do that, but that would require the flash player to be installed I guess. I could read the file by hand but that seems complicated...
What about making your own simple text format, editable in notepad?
Yes a custom format is probably the simplest solution, I even found source code to a simple vector draw program so making some basic graphics shouldn''t be much of a problem.

The advantage with using programs like flash is that it has very powerful animation tools though..


I''d investigate the possibility of writing a converter for the swf format, to your own format. Check out that link above for some specs.

Anyone have any resources for vector-animations handy?

2DNow - Specializing in yesterday''s technology today!

This topic is closed to new replies.

Advertisement