Page 1 of 1

Interested in the creation of your game

Posted: Wed Sep 24, 2014 7:06 pm
by AirFlare
Hello everyone,

I'm new here, I just discovered this game and I find it awesome (my congratulations)
Would it be possible for anyone (maybe the creator) to explain to me how he did the missiles on the wraith, on the main battlecruiser and on all the other ships (GE speaking)?
I would be interested in the missiles that fires directly in the direction the unit is facing, the missiles of the battlecruiser that cross specifically at the target point then separate because of where they are fired from, the green/blue missiles that spreads like waves and, how to make missiles keep going in a chosen direction and only be destroyed after they hit something ?)

Your help would be greatly appreciated, and again, great game, and hello everybody of the community

Re: Interested in the creation of your game

Posted: Wed Sep 24, 2014 7:27 pm
by Caladbolg
I am sure Erik will be more than happy to answer you when he finally gets off his lazy ass and start working on CC.

In the meantime, I hope you continue to enjoy playing CC and our small community. we are mostly all assholes but if you keep it in mind... we are kinda okay.

Re: Interested in the creation of your game

Posted: Thu Sep 25, 2014 2:19 am
by Siretu
Caladbolg wrote:I am sure Erik will be more than happy to answer you when he finally gets off his lazy ass and start working on CC.

In the meantime, I hope you continue to enjoy playing CC and our small community. we are mostly all assholes but if you keep it in mind... we are kinda okay.
I can answer this post without working on CC! Win-...win?

Anyway, hi! I created like 95% of Cruiser Command.

The first approach to missiles is probably movers, as described by Blizzard here: http://us.battle.net/sc2/en/game/maps-a ... le-movers/
Unfortunately, movers suck. They're in my opinion the worst part of the editor. I spent like a week struggling with them until I decided to make a custom physics system to handle it.

So I have a physics loop trigger and I give all the stuff mass and velocity and then I move them accordingly each tick. This physics loop handles all the ship movement and also the projectile movement. This means that to create a projectile, I only have to create it with triggers and then use one of my custom physics function to push it in a direction.

There's also a couple of other parts needed. I add timed life to the projectile so it doesn't fire forever. I also added collision detection in my physics system and I make sure to register the projectile for collisions.

Unfortunately, I don't really have the physics code available somewhere since it's heavily integrated in my code. I'll tell you though that I started out with the tutorial here: http://www.sc2mapster.com/forums/resour ... cs-engine/ but then changed it a lot over time.

Is it worth it for you? I don't know. It was one of the best decisions I did, but mostly because CC is a big game where I really want lots of projectile control. It is a lot of work though to get fully implemented.

Re: Interested in the creation of your game

Posted: Sun Sep 28, 2014 12:47 am
by AirFlare
Oh well hi ! I guess you're the guy I was looking for then (My hero) :P
That's pretty interesting what you did there ... So you didn't find a way to do the missile thing with movers hmm ? That's sad I really expected to be a way :(

However, I'm really interested in how you created your own physics engine in your game ... Would you mind telling me more about how you did so ? (It opens a lot of interesting game options for me). Because I'm a student in physics, but I just have no idea in the triggers (or anywhere else in GE) where or/and how you can apply the motion/force formulas.

I wanted also to thank you very much for your help, time and explanations.

Re: Interested in the creation of your game

Posted: Sun Sep 28, 2014 12:52 am
by AirFlare
Oh well, forget my last question, I just did a search on SC2Mapster, and there are some good tutorials about it there, I just never had the idea to look for that kind of thing. Anyway, thank you very much !

Re: Interested in the creation of your game

Posted: Sun Sep 28, 2014 4:02 am
by Siretu
I'm pretty sure there is a way, but since I spent hours after hours on getting a standard straight missile to work, I didn't want to imagine the time that would go into getting more complex projectiles to work.

Re: Interested in the creation of your game

Posted: Tue Oct 28, 2014 2:25 pm
by slapshot
From what I read, it seems like movers *may* offer the option of moving stuff, but then you would need to do the detection anyways, and combining the two makes sense (only check for collisions on objects that moved this tick)