BGMC26: Solar Sailing Simulator

Control your spacecraft with the power of the sun. Try not to drift into interstellar space or to fall into the sun. Collect the comets.

Press H in-game for some help. Arrow keys are used to tilt the sails. The main goal is to collect the comets.


Download (blend):
Original Submitted Version: SolarSailingv1_0.zip (13.5 MB) (Runs on BGE 2.78 and 2.79)
Mac Support, UPBGE support, Small physics Tweak: SolarSailingv1_1.zip (13.5 MB)

Note that this blend will only tun on Linux and on 64 bit Windows (as it uses some compiled C code to accelerate computation. I do not have access to a mac to compile/test. With some luck, you may be able to use the makefile in Data/Scripts/Makefile to build it for mac.

The game looks really good !

Although its pretty hard, the controls are not intuitive at all, but this was expected :slight_smile:

I got 3 comets and then I ended up rotating on myself, like some orbital potato… It was fun !

Now the surprise was in the sources: ctypes + some very light C DLL, that was very cool to see !
Until now I had no idea how to get a C program running with Python, but the communication process between ctypes and the actual C function seemed surprisingly easy in code ! Really inspiring !

Man… I’m stuck on a mac, but I love the idea. Could you do a video of the mechanics sometime, just to showcase how the math works? Your thread was fascinating.

I got 3 comets and then I ended up rotating on myself, like some orbital potato… It was fun !

Yeah, the coupling between rotation, motion and orbit is super difficult. Normally after the hours spent play-testing during a BGMC I’m pretty good at a game. But with this one I frequently end up in an unrecoverable spin after 5-6 minutes game time (particularly when moving away from the star).

Now the surprise was in the sources: ctypes + some very light C DLL, that was very cool to see !
Until now I had no idea how to get a C program running with Python, but the communication process between ctypes and the actual C function seemed surprisingly easy in code ! Really inspiring !

As you may notice, the function name in the dll is “test” - as it was my first time doing this. I built up that function slowly, and never got around to changing the name of it (oops). I was surprised how easy it was to use C without needing cython or a complex interface. I’ll do it again if there’s something that needs a speedup (in this cast it gave about a 10-15x performance boost). Compiling multi-platform was a bit harder than I was expecting, but now that I know how to do it it’s not so bad.

This game was really fun to develop, even if it’s not a very good game to play.

I would really love to see a tutorial on that…I could think of a million things to improve via dll.

the c acceleration makes me give a high score despite gameplay issues,

without risk there can be no reward.

(UPBGE doesn’t respect the background color of ImageRender, so the forces applied on the craft aren’t correct.)

@sdfgeoff: Could you report a bug or explain the issue or offers a file test please ? The issue you are talking about isn’t related to srgb isn’t ?
Also in UPBGE you should not anymore use ImageRender.background but horizon and zenith.

Wooooowwww i really like this Game its Nice !!! i really enjoyed the game music its really enjoyable it seems like you did the sun well looks like nodes there mayte nice use of em buddy ,i really found it hard to understand how ive collected comments maybe its just stupid of me bbut i really find it hard to understand Gameplay is Good ,sound is good, Graphics are good and the Mechanics seem complex but works perfectly really ell optimised and stable as well there mayte !!!

(LoL The Orbiting is nice too !!!)
I am truly impressed by its overall progress i would give it a 7.4 out of 10 for a Nice BGE Game well done there mayte and keep it up bro im really impressed.

Fred/K.S

@Dr. Binary: If you have gcc and make installed (or any c compiler), you can try running the “Makefile” in the scripts directory to build the C source.
I do plan on making a video of the mechanics because they are fascinating (to me at least).

@Justin:
Sure. Though I’m not sure you’ll still think “a million things” afterwards! But then, you came from a C background(?) so you can probably think of more things than I!

@BPR:
Thanks.

@tristan73:
Ahh, this evening I’ll add in the horizon/zenith and see if that helps. If not, I’ll file a bug report

@Fred:
Thanks for the nice comments. And yes, I fully agree with you that it’s hard to understand how the mechanics work. Even I can’t play this game very well and I spent many hours playing it while developing! I’ll make a video with an explanation of the mechanics this evening, and maybe that will help a bit.

Both are automatically included in Xcode; I’ll give it a shot and let you know how it goes.

Edit:
Actually, make and gcc gave me a “too short” unusable .o file, but I peeked into your python a bit. All you need to do to make this mac compatible is add the following to line 18 of vehicle.py:

elif platform.system() == ‘Darwin’:
_accel_path = os.path.join(os.path.split(file)[0], “light.so”)
print("Detected Mac OSX: ", end=’’)

Mac uses .so files as well.

This game was sweet! It is definitely easy to loose control, but I think that adds to the appeal. Games are too easy these days. I actually thought the biggest problem was being able to loose control, yet not die for an indefinite amount of time. Otherwise, cool music, gorgeous special effects, well done as always, sdgeoff!

Thanks Dr. Binary. I’ve made that fix and uploaded to the first post.

I MADE A BIG MISTAKE. When I simplified the physics, I missed one important thing. I’ve added two lines of code, and it’s made the game slightly more controllable. Still pretty confusing, but it’s now a little easier to control your rotation.

Played it, found it looking very neat(love the comet effect, the sun looks nice too). Also, I was spending some time trying to understand what the thing does at all. Later I figured out basic tactics. To get closer, try to make the sail go parallel with sun vector. If want to get off, make it kinda perpendicular. Not easy to control. Quite fun at first, but gets boring over time.

Nice concept, enjoyed it. I hope you have good luck with it :slight_smile:

Amazing work with the shaders! It looks fantastic. The camera control is really nice too.

Game-wise however I think some improvements can still be made.
The most important (and perhaps overlooked) is that the players of the game are very unlikely to understand the physics you have implemented to produce motion. There is no visual feedback about how the forces were acting on the sail as well as how my input changed this beyond the small “controller?” moving around slightly. Perhaps some sort of heatmap shading could have been useful.

I think its a great concept but the divide between a “dumb” player and the complex game mechanics needs to be bridged.

I think its a great concept but the divide between a “dumb” player and the complex game mechanics needs to be bridged.

There are no dumb players(gamers). Only dumb developers. Present company excluded of course. :slight_smile:

EDIT:
It wont work for me. Using Win 64 bit. BF 2.78. Pressing the help button does nothing. I had to rely on Nicolas_A to supply the readme. The dumb gamer should not have to read through the game script to find out how to play the game, and the back story. I didn’t see a sail. The sun looks really cool.
Sorry.

@Thatimster:
Yup, I fully agree. It the appearance is that of a casual game, but the physics is that of a simulator. While I didn’t put much effort into making it understandable for a normal player, I’m not sure that the mechanics could have been. This game always was more of an “I wonder how it actually would be” than an attempt to make a playable game. I did experiment with an indicator to show force (you can uncomment the “self.set_widget_visible(False)” in game.py to re-enable it. I disabled it because it didn’t really make it any easier (IMO). Yellow lines are the sun vector, green for force, purple for velocity.

@theoldguy
Yup, the player is the person who decides if this is a “good” game, and this particular one is not. I knew this pretty much as soon as I implemented the physics, and could see no way to make it a good game. So I finished it up and consider it as a failed gameplay prototype. Still interesting to me for the code and physics side, but not as a game.

I compiled the windows dll on Windows 8, so it may be some backwards compatibility issue. Is there a message in the terminal/system console? I suspect there is because otherwise the ‘H’ key would have brought up some text.

LMAO. . . I’m disappointed that I can’t play it. You always make pretty good games. I think if DL the 64 bit version of blender, it would play. And yes, I am the dumb gamer that Tim speaks of. LOL. So developers could learn a lot from me. :slight_smile:

Yup, it will need the 64 bit version of blender.

Very nice visuals! I collected 6 comets, but I also felt like that was all luck… then I flew out to interstellar space.

So I finished it up and consider it as a failed gameplay prototype.

Not at all, it’s hard, but still a good game. It’s amazing to me that someone could code something like this.