Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML for ludum dare or game jams?  (Read 6433 times)

0 Members and 1 Guest are viewing this topic.

Murii

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
SFML for ludum dare or game jams?
« on: January 13, 2014, 07:29:39 am »

Hey guys,do you think SFML its good for game james,i`m asking this because right now i`m making a little lib for helping me out to develop games faster.But it seems like its hard to port the games to anathor platform using C# and SFML or SFML in general.So i`m asking you guys(the ones)who actually participated in a game jam and ported the game to all the platforms,how have you made this possible in so little time?

Daddi

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
    • http://foxdev.de/
    • Email
Re: SFML for ludum dare or game jams?
« Reply #1 on: January 13, 2014, 08:02:35 am »
If you use SFML and its standard C++ bindings, its very easy to port it to all platforms. Of you are using C# its gonna be much harder, because C# and .NET is meant for Windows and you need additional runtime libraries like mono etc.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: SFML for ludum dare or game jams?
« Reply #2 on: January 13, 2014, 08:58:27 am »
It really depends. SFML is a great library and easy to work with, however in most Game Jams the goal is to get something up and running as fast as possible, thus you're much quicker with pre-built engines.
I'd still use C++ & SFML since it's never really a race for the higher ranks for me, but it's just about fun, the experience and learning something. :)

As for porting, by using no OS specific code and crossplatform libraries, it's very easy to write portable code in C++. C# with the .NET library is a bit more of a challenge, but should still be doable with Mono. Alternatively you can also often run you Windows applications via WINE on Linux, although you'll always run into a few that don't like WINE.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Lo-X

  • Hero Member
  • *****
  • Posts: 618
    • View Profile
    • My personal website, with CV, portfolio and projects
Re: SFML for ludum dare or game jams?
« Reply #3 on: January 13, 2014, 09:41:42 am »
I've done two Ludum Dare and one SFML Game Jam so far with SFML. It's really possible.
But as exploit3r said, I use some bunch of personal pre-built code that allow me to skip the windowing/states/base scene nodes part.

If you want to look at what I managed to achieve :

Ludum Dare 48h #28
Ludum Dare 48h #27
SFML Game Jam #1

For these three project, I used some kind of framework of my own that I created while following the SFML Game Development Book very carefully. Link to it on GitHub :

https://github.com/Lo-X/potato-framework


Concerning the porting, do use C# since it's microsoft only (and Mono is not good enough to be an alternative when it comes to video games).
C++ really is the best option, I used it for every jam to port my code quickly from linux to windows. I also use the exact same IDE on both (Qt Creator) that alows me to not even worry about the makefile, I just copy/paste my files and re-compile the game. (very lazy work, but it's fine when the time is limited)

amir ramezani

  • Jr. Member
  • **
  • Posts: 81
  • i'm a programmer who can't see well
    • View Profile
    • download useful software!
    • Email
Re: SFML for ludum dare or game jams?
« Reply #4 on: January 13, 2014, 10:24:35 am »
C++ is the best option, but if you want to use .net, mono is best, but Dotnet is just for Microsoft and Microsoft created it for windowsand xBox
if you can't see well, you can't test your applications and operating system well
my game engine:
allegro game creator
my operating system:
AmirOS

Murii

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
Re: SFML for ludum dare or game jams?
« Reply #5 on: January 13, 2014, 12:26:14 pm »
First of all i dont want to use C++,because its too hard and i really dont like it that much compared to C# or Java.So lets say i`ll stick with C#.If i want to deploy it to Mac or Linux the only thing i need its Mono and the OSs installed on my computer and maybe Wine  to be sure that i`ll work perfectly ?? I`m asking this because i really want to participate in the next Ludum Dare competition and i need to port the games on all 3 OSs whitout any problems :) .
« Last Edit: January 13, 2014, 12:29:10 pm by Murii »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: SFML for ludum dare or game jams?
« Reply #6 on: January 13, 2014, 12:51:42 pm »
If i want to deploy it to Mac or Linux the only thing i need its Mono and the OSs installed on my computer and maybe Wine  to be sure that i`ll work perfectly ??
At best you just go, write a simple Hello World example, then start your Linux machine, compile and run it, then move to your OS X machine, compile and run it.
After you've successfully done that you'll know on your own how to set things up.

If you have concrete questions about the process, come back and ask, but there's no reason to explain everything in detail, because in the end, you'll just have to try it regardless. :)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Murii

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
Re: SFML for ludum dare or game jams?
« Reply #7 on: January 13, 2014, 01:04:05 pm »
Ahh!! I don't have an Linux machine or Mac :((

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: SFML for ludum dare or game jams?
« Reply #8 on: January 13, 2014, 01:14:14 pm »
Don't worry for Linux, just get yourself a VM (e.g. VirtualBox) and install a Linux on it. For Mac you could try to install OS X on an VM as well, but keep in mind that this could be illegal.
Cross compiling (from one OS for another OS) is partially possible with C++, but in the end, it's never really advised, especially if you have the possibility of doing it natively. For C# & .NET I doubt that there's such an option at all.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: SFML for ludum dare or game jams?
« Reply #9 on: January 13, 2014, 02:26:28 pm »
All you people that don't care for C#, please just stop and learn about the subject before talking about it. And enough of the nonsense that C# is not portable.... As long as you avoid using any OS specific code from the .NET framework you will have no problem moving your program to a different platform. The same applies to C++.

Just because you do not use something does not mean there is something wrong with it or can't be considered as a perfectly valid alternative to something else. Please note I do use C++ also.

As for compiling, no language that utilizes the CLI (C#, VB.NET, F#, ect) is ever compiled to native code until it is ran. This means you can compile a C# program with Visual Studio, switch over to linux and drop that same executable into mono and it will still run without the need for recompilation.

Quote
Concerning the porting, do use C# since it's microsoft only
Quote
Of you are using C# its gonna be much harder, because C# and .NET is meant for Windows

So untrue, just because Microsoft designed the language doesn't make this the case. It is like saying the entire linux kernel or git was designed exclusively for Linus Torvald's personal use. C# is in fact a ISO and ECMA standard language and was designed to be implemented cross platform. I don't think that all the MS specific stuff that was dropped into C++ was an ISO standard.  :)

Quote
So lets say i`ll stick with C#.If i want to deploy it to Mac or Linux the only thing i need its Mono and the OSs installed on my computer and maybe Wine  to be sure that i`ll work perfectly ?? I`m asking this because i really want to participate in the next Ludum Dare competition and i need to port the games on all 3 OSs whitout any problems

You won't even need Wine, as long as you avoid the very few windows specific namespaces in the .NET framework all you need to do is remap the CSFML dlls to the platform specific naming. Then your program will run without any problem on any platform using mono.


On a side note, Murii if you are looking at participating in the game jam (and I highly recommend that you do) I have ported Thor to C# with my NetEXT library. It contains many helpful classes that should help get you off the ground when you are writing your game.  ;)
« Last Edit: January 13, 2014, 05:52:05 pm by zsbzsb »
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Lo-X

  • Hero Member
  • *****
  • Posts: 618
    • View Profile
    • My personal website, with CV, portfolio and projects
Re: SFML for ludum dare or game jams?
« Reply #10 on: January 13, 2014, 03:22:34 pm »
Even if what you said is entirely true and all that, Linux and Mac users still have to install Mono if they want to play the game haven't they ? So in the jam context you ask people to install things that are required to play the game.

It's explicitely said in the advice section of Ludum Dare that the players shouldn't need to do anything other that to unzip your game package and double-click the .exe. And that's a good advice, because I skip games that requires me to install something or switch OS : Unity games, C# games, games that requires VS to be installed, etc. : I just don't play them.

Finally, last time I tried to launch a C# game with Mono on my linux it failed, back in last september.

I'm not a C# hater, that's not a language I use often but I understand it becomes handy and easy to use... when you want to do something for Microsoft devices.

Murii

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
Re: SFML for ludum dare or game jams?
« Reply #11 on: January 13, 2014, 04:39:13 pm »
Thanks a lot for so many messages!Now i really don`t care if the linux users or mac users need to install mono in order to run my game,they`ll see the game its wroth the effort so yeah :).Now the second thing is ,if i got it correct is that they can run my .exe in linux,mac if they have mono installed?
And zsbzsb i`ve already made a little lib for collision,entities and states but i`ll look over your lib because it sounds good :)
Lo-X,how have you started the game and why do you thing it failed to start?
Thanks again for all the support but in my 2+ years of progamming i`ve switched quit a lot of frameworks,engines and this must stop!

P.S: If i`m going to participate in ludum dare i don`t care if 1 or 2 from 5 can`t start the game,just because they are noobs or whatever.I just need to know if its working for the rest of 3 people or 4 :)


btw : C# - FTW :)
« Last Edit: January 13, 2014, 04:40:45 pm by Murii »

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: SFML for ludum dare or game jams?
« Reply #12 on: January 13, 2014, 05:25:17 pm »
Now i really don`t care if the linux users or mac users need to install mono in order to run my game
Quote
If i`m going to participate in ludum dare i don`t care if 1 or 2 from 5 can`t start the game

No, you still should care, it is one of the things that you must think over when picking the right coding tool for the job.  ;)

Quote
if i got it correct is that they can run my .exe in linux,mac if they have mono installed?

Yes, as long as you don't use any windows specific parts of the .NET framework. (Check this) Also if you use SFML.NET you will need to learn to use the config files to remap CSFML to the native counterparts on linux/mac.

Quote
And zsbzsb i`ve already made a little lib for collision,entities and states but i`ll look over your lib because it sounds good

Well NetEXT doesn't handle any of that (it is a bit more low level than that), but I have just released Spitfire in light of the upcoming game jam which does contain some of that functionality if you are interested.

Quote
If i`m going to participate in ludum

Maybe you are a bit confused, but the next ludum dare isn't until April and it will be the SFML Game Jam in about 18 days.  ;)
« Last Edit: January 13, 2014, 05:36:15 pm by zsbzsb »
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Murii

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
Re: SFML for ludum dare or game jams?
« Reply #13 on: January 13, 2014, 05:36:38 pm »
I`ve done the test and everything showed green,YAY,now this means i can put it on a linux platform ?
Also how does the config files for remaping CSFML work?
« Last Edit: January 13, 2014, 05:46:54 pm by Murii »

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: SFML for ludum dare or game jams?
« Reply #14 on: January 13, 2014, 05:57:24 pm »
I`ve done the test and everything showed green,YAY,now this means i can put it on a linux platform ?

Install linux in a VM and try it out  ;)

Quote
Also how does the config files for remaping CSFML work?

http://www.mono-project.com/Config_DllMap

All you need to do is remap the dlls, don't worry about remapping functions.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

 

anything