Jump to content

  • Log In with Google      Sign In   
  • Create Account

C++ (SFML) and Flash player/Unity


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
11 replies to this topic

#1 Melkon   Members   -  Reputation: 531

Like
0Likes
Like

Posted 02 November 2013 - 07:14 AM

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!



Sponsor:

#2 SimonForsman   Crossbones+   -  Reputation: 6303

Like
1Likes
Like

Posted 02 November 2013 - 07:55 AM

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.


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!

#3 meeshoo   Members   -  Reputation: 508

Like
1Likes
Like

Posted 02 November 2013 - 08:53 AM

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



#4 Melkon   Members   -  Reputation: 531

Like
0Likes
Like

Posted 02 November 2013 - 08:57 AM

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!



#5 Josh Vega   Crossbones+   -  Reputation: 1206

Like
1Likes
Like

Posted 02 November 2013 - 10:58 AM

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


Some favourite quotes:
Spoiler

#6 stupid_programmer   Members   -  Reputation: 1224

Like
1Likes
Like

Posted 02 November 2013 - 11:49 AM

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.



#7 Melkon   Members   -  Reputation: 531

Like
0Likes
Like

Posted 02 November 2013 - 11:59 AM

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.



#8 Karsten_   Members   -  Reputation: 1655

Like
1Likes
Like

Posted 04 November 2013 - 01:34 PM

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_, 04 November 2013 - 01:43 PM.

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


#9 Melkon   Members   -  Reputation: 531

Like
0Likes
Like

Posted 04 November 2013 - 01:43 PM

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



#10 Karsten_   Members   -  Reputation: 1655

Like
1Likes
Like

Posted 04 November 2013 - 02:00 PM

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.

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


#11 Godmil   Members   -  Reputation: 744

Like
1Likes
Like

Posted 04 November 2013 - 03:10 PM

Quick note, Lazy Foo's SDL tutorials haven't been fully updated to SDL2 yet. This site has good tutorials though http://twinklebeardev.blogspot.co.uk/p/sdl-20-tutorial-index.html?m=1



#12 Karsten_   Members   -  Reputation: 1655

Like
1Likes
Like

Posted 05 November 2013 - 04:08 AM

Ah good point, it is worth mentioning that Emscripten provides SDL 1.x (and soon SDL 2.0). However, since the emscripten version of the SDL API has been tweaked to run in a mobile browser (i.e touch events) and is already 3D accelerated, it is likely to stick around for many years to come (and will almost certainly still outlive commercial proprietary products like Unity).

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





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS