Code Monkey home page Code Monkey logo

svg2dc's Introduction

svg2dc

svg to dreamcast engine exporter.

alt text

This is a small utility that convert our maps (created in inkscape) in a C fonction that loads all the asset into our custom Dreamcast engine. It is essentially a XML parser looking for particular data. The program will check for any incompatible image size and will calculate the memory usage. It also keep tracks of filenames and will only load any duplicated assets once.

How to use

  1. Select the Output Folder first. This will be where your asset will be copied along with the mapdata.c file.
  2. Select your SVG. Once it is selected it will do all the job for you- copying your asset into the Output Folder, converting the object position and size into something usable for my unamed DC engine.

XML special tag

alt text

Here's some special XML tags that the software will catch

  • u : expects a number between 1.0 and 0.0 - used for UV mapping.
  • v : expects a number between 1.0 and 0.0 - used for UV mapping.
  • setAnim : if the texture is a spritesheet, will select the appropriate sprite. expects a integer. you also need to set u and v for this to work

The program also detext if a images has been mirrored and will flip the UV map accordingly.

Compatibility

You will need processing in order to execute this.

If you're interested in using this for your project and want a less specific output than my custom engine, I'd be happy to try to make this more usable. Please fill an issue in or contact me at r.rabot_at_gmail.com

svg2dc's People

Contributors

lerabot avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.