Advertisement Jump to content
Sign in to follow this  
Melkon

C++ (SFML) and Flash player/Unity

This topic is 1900 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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#).

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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) Edited by Karsten_

Share this post


Link to post
Share on other sites

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! :)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!