SFML community forums

General => SFML projects => Topic started by: raycrasher on July 18, 2012, 02:38:12 pm

Title: Cloud Wars - WIP
Post by: raycrasher on July 18, 2012, 02:38:12 pm
Hello!

I would like to present my pet project, Cloud Wars - a space tactical game in the spirit of Battleships Forever(http://www.wyrdysm.com/games.php (http://www.wyrdysm.com/games.php)), but with significant RPG elements. It is still very much a work in progress - all that is finished are the Ship Editor, the GUI (libRocket), the Lua script bindings (Diluculum and SLB), resource managers, particle systems, Box2d physics, and other bits and pieces. The ship sprites are from community resources from Battleships Forever (I have asked permission), slightly edited. All other resources are made by me or from public domain graphics (such as nebulae)

The reason why I'm posting this unfinished project is that I just want to hear ideas from the community for me to mull over whenever I'm stuck. If you want a look at the code, I can send you the code and data.

Some areas on which I need feedback are on the following:


I can also offer working code for sprite batching, particle systems, the libRocket GUI interfaces, and the Lua scripting system if anyone's interested.

Thank you for SFML - it's a really great library!



Screenies:
(http://i1156.photobucket.com/albums/p572/cinquedia/3.jpg)(http://i1156.photobucket.com/albums/p572/cinquedia/2.jpg)(http://i1156.photobucket.com/albums/p572/cinquedia/1.jpg)
Title: Re: Cloud Wars - WIP
Post by: Grimshaw on July 18, 2012, 03:07:47 pm
What?!! Sick! Amazing :D:D:D::D
Title: Re: Cloud Wars - WIP
Post by: Nexus on July 20, 2012, 06:01:15 pm
Looks great so far, and the technical background sounds quite interesting.

Steering behaviors with Box2d. I already read Steering Behaviors for Autonomous Characters (www.red3d.com/cwr/steer/  (http://www.red3d.com/cwr/steer/)) and I'm basing the code from this. The thing that I'm not sure of is how to apply the resultant steering vector to the ship. Thrusters? Pull the ship by the nose? (I tried the latter, it works, but you get some kind of pendulum effect (can be mitigated), and I can't simulate thrusters.)
Coincidentally, I have had the same problem a week ago. I am currently experimenting with aircraft formations, and taking a closer look at the steering behaviors (also at that page). For the moment, I leave a small tolerance angle inside which no corrections are performed -- tuned such that when thrusters stop, the remaining inertia is enough to align a plane correctly. But this is more a temporary solution.

I wonder how this is usually solved, too. While a gradually decreasing side-thrust can lead to a correct alignment, it may take longer than necessary. Maybe even advanced control systems (like PID controllers) that minimize the settling time and overshoot?
Title: Re: Cloud Wars - WIP
Post by: raycrasher on July 21, 2012, 11:04:52 am
Thanks for the replies! :)

Anyway, I just finished the steering behaviors the other day, and the ships are now chasing each other all over the screen. I went with the simple solution, which is to apply the desired vector as a force somewhere near the ship's nose, increase angular damping to about 0.8, and multiply the angular rotation by 0.95 when the heading of the desired vector is less than 30 degrees. Its an ugly hack, but it gives good results. I'm going to simulate thrusters firing with data retrieved from b2Body::GetLinearVelocityFromLocalPoint.

In the works - using Lua as a scripting language for RML (Rocket Markup Language, an HTML/CSS-like language for the GUI), should be simple enough, but there's much work to be done refactoring the mess inside ShipEditor. When it's done, I can then use Lua inside RML element event handlers, like:
<button id="myButton" onclick="Gui.Document('MainMenu'):GetElementByID('myButton'):SetInnerRML('You clicked me')">Click</button>
Title: Re: Cloud Wars - WIP
Post by: raycrasher on July 17, 2013, 10:23:25 am
After one year...

AN UPDATE! Yay!

It has been almost year since the last post, but the game has had significant developments. Specifically, I grew tired of the compile times I am getting with C++ (I use Boost!). So I switched to C#, and used a custom C++/CLI wrapper around the C++ SFML libraries to improve performance and get around the glitches I was getting with the .NET version of SFML. The game is not yet finished, but I am really planning on finishing this before March of next year, especially because this is my thesis project.

Here is the result so far:

(http://i1156.photobucket.com/albums/p572/cinquedia/combat6.jpg)
(http://i1156.photobucket.com/albums/p572/cinquedia/combat5.jpg)
(http://i1156.photobucket.com/albums/p572/cinquedia/combat.jpg)
(http://i1156.photobucket.com/albums/p572/cinquedia/combat2.jpg)

Title: Re: Cloud Wars - WIP
Post by: Yemeni Cpluspluser on July 17, 2013, 06:40:53 pm
It seems that it used more of GameMaker 8.1 or GMstudio engines then SFML engine, or I am just imagining.
Any way, you should be proud that my first post is in your topic  :P
Title: Re: Cloud Wars - WIP
Post by: Erikpetrov on July 18, 2013, 09:45:24 am
I've played this game a long time ago.It's cool.Basicly when i played it was made in GameMaker.
Title: Re: Cloud Wars - WIP
Post by: raycrasher on July 18, 2013, 01:29:51 pm
Yeah, it's basically a clone of Battleships Forever. I even asked permission on the BSF forum for use of the sprites. They didn't seem to mind. :) I've been playing BSF for a long time, and I thought of making a game like that just for kicks. And add a little spice to it while I'm at it.

However, this is made in C# and SFML 2.0, so its a LOT faster, especially when lots of ships and bullets are flying. And it has C# scripting support, for the modders.

Title: Re: Cloud Wars - WIP
Post by: Yemeni Cpluspluser on July 28, 2013, 07:38:26 pm
I can't wait to try your c# and SFML version of the game, the screen shots looks very exciting  ;D