C++ (SFML) and Flash player/Unity

Started by
10 comments, last by kop0113 10 years, 5 months ago

Hello!

Is it possible (if yes, how?) for a c++ (sfml) game to make compatible with flash player OR unity?

It is important because i can reach much more people through fp or unity. (for example i can promo it on kongregate.com etc).

Thank you for answers!

Advertisement

Hello!

Is it possible (if yes, how?) for a c++ (sfml) game to make compatible with flash player OR unity?

It is important because i can reach much more people through fp or unity. (for example i can promo it on kongregate.com etc).

Thank you for answers!

No it is not.

[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

There is a slight chance you can reuse a part of your code (game logic and stuff) by using them as plug-ins in Unity 3d Pro edition, but you'll still have to re - implement a big part of your game in Unity scripting (java script or C#).

There is a slight chance you can reuse a part of your code (game logic and stuff) by using them as plug-ins in Unity 3d Pro edition, but you'll still have to re - implement a big part of your game in Unity scripting (java script or C#).

Well, i don't wanna change the language. Thank you!

The short answer is "Yes, but it's not worth it".

Some favourite quotes:Never trust a computer you can't throw out a window.
- Steve Wozniak

The best way to prepare [to be a programmer] is to write programs, and to study great programs that other people have written.
- Bill Gates

There's always one more bug.
- Lubarsky's Law of Cybernetic Entomology

Think? Why think! We have computers to do that for us.
- Jean Rostand

Treat your password like your toothbrush. Don't let anybody else use it, and get a new one every six months.
- Clifford Stoll

To err is human - and to blame it on a computer is even more so.
- Robert Orben

Computing is not about computers any more. It is about living.
- Nicholas Negroponte

There is FlasCC which will allow you to write native code for use in Flash. The Quake port basically just using the Flash framework for input and the entire game loop is in native code. Whether or not it is worth the effort is up to you. ActionScript 3 is a curly brace language, so unless you are using templates or advanced C++ extensively then porting "C with classes" type code would be pretty easy.

There is FlasCC which will allow you to write native code for use in Flash. The Quake port basically just using the Flash framework for input and the entire game loop is in native code. Whether or not it is worth the effort is up to you. ActionScript 3 is a curly brace language, so unless you are using templates or advanced C++ extensively then porting "C with classes" type code would be pretty easy.

Thank you very much! A will take a look on it.

FlasCC unfortunately still targets the unportable proprietary Flash stage system.

Emscripten could be perfect here. It is basically a C++ to Javascript compiler but also provides well known C++ media libraries such as SDL, OpenGL, SDL_mixer, SDL_image, Qt, glut etc...

My software always uses either SDL or Glut and OpenGL so it has been very easy to put out a web build. I highly recommend these technologies if you want to keep with C++ but also target the web (as well as every other platform under the sun ;)

https://github.com/kripken/emscripten

A few simple demos using the technology can be found at http://devio.us/~kpedersen/mutiny/doku.php?id=demos (apologies for the slow server)
http://tinyurl.com/shewonyay - Thanks so much for those who voted on my GF's Competition Cosplay Entry for Cosplayzine. She won! I owe you all beers :)

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.

Emscripten could be perfect here. It is basically a C++ to Javascript compiler but also provides well known C++ media libraries such as SDL, OpenGL, SDL_mixer, SDL_image, Qt, glut etc...
FlasCC unfortunately still targets the unportable proprietary Flash stage system.

My software always uses either SDL or Glut and OpenGL so it has been very easy to put out a web build. I highly recommend these technologies if you want to keep with C++ but also target the web (as well as every other platform under the sun ;)

https://github.com/kripken/emscripten

A few simple demos using the technology can be found at http://devio.us/~kpedersen/mutiny/doku.php?id=demos (apologies for the slow server)

Whao, that's sounds amazing, i think it's the time to learn SDL. Thank you! :)

Whao, that's sounds amazing, i think it's the time to learn SDL. Thank you! smile.png


smile.png

Luckily SDL also has some fantastic tutorials written by GameDev.net's own LazyFoo (http://lazyfoo.net/SDL_tutorials/). These should help you get started. For 2D games it covers pretty much everything.

As an added bonus, when compiled with Emscripten, your SDL games will actually be hardware accelerated because they use the web browsers HTML5 canvas underneath.
http://tinyurl.com/shewonyay - Thanks so much for those who voted on my GF's Competition Cosplay Entry for Cosplayzine. She won! I owe you all beers :)

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.

This topic is closed to new replies.

Advertisement