Page 1 of 3

Friday Facts #80 - Crazy start

Posted: Fri Apr 03, 2015 3:33 pm
by slpwnd
Easter news from Wube Software: http://www.factorio.com/blog/post/fff-80

Re: Friday Facts #80 - Crazy start

Posted: Fri Apr 03, 2015 4:00 pm
by waduk
I misread today release as 0.12.0 :)
My eyes playing trick on me. I guess i'm dying to see those silo's in-game,..although,..
"...The engine is simply not ready for this kind of visuals...."
is kinda heartbreaking...

Re: Friday Facts #80 - Crazy start

Posted: Fri Apr 03, 2015 4:28 pm
by Drury
The rocket is basically moving in the Z axis (it is flying straight up). This is something the engine can't do, so we simulate this by moving the rocket along the Y axis. There are many questions arising: What should happen when player starts moving to the north, sort of "chasing" the rocket? What about the rocket shadow? We can't simply get the shadow "mirroring" what is on the ground ... How does the rocket "interact" with flying robots?
Screenshake would potentially help. As the rocket engine starts, the screen starts shaking; when it "gets closer" to the camera, the screenshake would be so intense that the camera pans a whole screen to the side. In this frame, delete the rocket and calm the screenshake.

Another way would be to have the rocket accelerate until it reaches the speed at which the player has no way of keeping up, then delete it when it's a sufficient distance away from the player. This way it only seems to stick around unnaturally long when the player chases it on a train, which is something people normally wouldn't do, and still the rocket disappears only once it overtakes the train and disappears offscreen. If the player is a sufficient distance away when the rocket lifts off, it disappears the moment it launches. If people cheat to keep up with the rocket, it disappears, say, 20 seconds after liftoff.

The rocket shadow can be a separate object that moves on an X axis rather than Y at the same speed as the rocket, or X and minus Y at once. Depends on projection, seems a bit too obvious for you guys not to consider though.

As for flying robots, I think the only way here is to either go functionalist and let the rocket clip horribly with the robots or implement extra pathfinding so they avoid the silo at all times or even only when a rocket is being launched. The latter would be tricky to implement I think; some robots would inevitably fly over the silo as a rocket is being launched nonetheless. That's not to say the former would be easy :D I don't really know about how you implemented it but seems to me to be simply node-based, if that is so you could "simply" add 4 nodes in the corners of the silo which the robots which would otherwise enter the premises route by. This way you'd also have to check whether or not a robot's travel path intersects the silo so at this point idk really, but then again, I'm the horrible coder here, not you. GL;HF.

Re: Friday Facts #80 - Crazy start

Posted: Fri Apr 03, 2015 4:45 pm
by Xterminator
Man I love the easter additions. :D The idea of automating the mass production of easter eggs sounds awesome to me! Haha

Keep up the great work, and I'm sure you guys will find a way to get things to work properly with the Rocket Launch etc..:)

Re: Friday Facts #80 - Crazy start

Posted: Fri Apr 03, 2015 5:00 pm
by SHiRKiT
The silo could be broken into 4 pieces of 5x5? But I imagine you have already thought of that.

Re: Friday Facts #80 - Crazy start

Posted: Fri Apr 03, 2015 5:29 pm
by AssaultRaven
The Easter thing reminds me of Shamus Young's Empire of Candy idea. I do wonder if the Factorio engine would be good for that.

Re: Friday Facts #80 - Crazy start

Posted: Fri Apr 03, 2015 5:54 pm
by Ojelle
As for the rocket, it might sound stupid, but just draw it over all the robots? Its going up, so the robots would be on ground level behind it. (and for the launch itself, you could consider a 'stop' of all droids for 3 secs, the explenation would be that they 'watch' your feat.) The last one sounds a bit stupid, I know, but it would only happen very seldomly and its a nice stupid little extra.


Edit: or all colliding robots at the very start (when its still low) just explode! (and further on they just render behind the rocket) You should not launch a rocket where there are a million drones. (and at the point you can launch that thing a few droids wont matter anyway)

Re: Friday Facts #80 - Crazy start

Posted: Fri Apr 03, 2015 6:05 pm
by y.petremann
I'd love to have these easter additions, they would not be too hard to implement with my texture pack toolkit.

Also for the silo, I think I have some solution, when the rocket is going to a specified speed or height, it is forced to go away from the screen (taking account the maximum zoom).

Re: Friday Facts #80 - Crazy start

Posted: Fri Apr 03, 2015 7:28 pm
by Barfussmann
The rocket is basically moving in the Z axis (it is flying straight up). This is something the engine can't do, so we simulate this by moving the rocket along the Y axis. There are many questions arising: What should happen when player starts moving to the north, sort of "chasing" the rocket? What about the rocket shadow? We can't simply get the shadow "mirroring" what is on the ground ... How does the rocket "interact" with flying robots?
some ideas:
- Rocket acceleration is exponetialen or like real rockets some think like this

Code: Select all

acceleration = thrust - ((mass of hull and cargo + mass of fuel) *  gravity)
fuel ist continuous draind

- The camera is focused on the rocket for the first few seconds.
So you can`t catch up to the rocket.
And befor the shadow is of the silo the silo is of the screen.

- The robot could be send out of the danger zone.

- The smoke also perhaps the fire could be rendert with several overlaping smoke/fire sprites like in Dragon Age: Inquisition.

Re: Friday Facts #80 - Crazy start

Posted: Fri Apr 03, 2015 7:29 pm
by Ojelle
Another idea: when the rocket animation is going, freeze the player. He watches. With a bit of screen shake it could end up nice.

Re: Friday Facts #80 - Crazy start

Posted: Fri Apr 03, 2015 7:51 pm
by ocbaker
Very much looking forward to more train related stuff!

Re: Friday Facts #80 - Crazy start

Posted: Fri Apr 03, 2015 7:55 pm
by Yttrium
another problem, When does this horizontal rocket diappear if its going vertically up your screen?
Can you place your character 100 meters away and still see the rocket fly by? Or does it "Just disappear" after 80 meters?

Re: Friday Facts #80 - Crazy start

Posted: Fri Apr 03, 2015 8:08 pm
by BrinCaspian
Ojelle wrote:Another idea: when the rocket animation is going, freeze the player. He watches. With a bit of screen shake it could end up nice.
I was going to suggest something similar. Maybe pause the game, center the screen on the rocket launch, lock the screen, add the screen shake for effect, and just have it removed once it leaves the visible map. Then return the screen to center on the player and unease the game.

Also, as far as the Silo size issue, is there any way to give it four points, one at each corner, and as long as one is on screen, the game renders the silo?

Re: Friday Facts #80 - Crazy start

Posted: Fri Apr 03, 2015 8:33 pm
by Weresmilodon
Is the launch automatic, or do you need to trigger it somehow?

If it needs to be triggered, for example via a button in the silo UI, then freezing the character is a fairly good idea, as you then know where they are in relation of the distance from the silo, and it insures that the freeze wouldn't be deadly. (Unless you are being attacked as you launch it)

If it's automatic, things get more complicated.

Re: Friday Facts #80 - Crazy start

Posted: Fri Apr 03, 2015 8:37 pm
by aRatNamedSammy
Ojelle wrote:Another idea: when the rocket animation is going, freeze the player. He watches. With a bit of screen shake it could end up nice.
i agree, so noone will be able to chase down the rocket ;) lolll i guest at that point, a bit of video animation could be easier than a whole process like you plan to do..
.. well, except if we wil need to launch numberous rockets

Re: Friday Facts #80 - Crazy start

Posted: Fri Apr 03, 2015 8:53 pm
by Drury
BrinCaspian wrote:
Ojelle wrote:Another idea: when the rocket animation is going, freeze the player. He watches. With a bit of screen shake it could end up nice.
I was going to suggest something similar. Maybe pause the game, center the screen on the rocket launch, lock the screen, add the screen shake for effect, and just have it removed once it leaves the visible map. Then return the screen to center on the player and unease the game.
The problem with this approach is that the game pausing itself for longer than 1 second should be a last ditch thing and is something Factorio is already being criticised for doing when research is completed (I'd suggest the whole research progress bar UI element flashing yellow instead).

Re: Friday Facts #80 - Crazy start

Posted: Fri Apr 03, 2015 9:46 pm
by Klonan
Don't forget that rockets have to perform a gravity turn! Going straight up might get you into space... but going sideways is whats going to keep you there.

http://en.wikipedia.org/wiki/Gravity_turn

Re: Friday Facts #80 - Crazy start

Posted: Fri Apr 03, 2015 9:58 pm
by quinor
yeah, KSP everybody...

Re: Friday Facts #80 - Crazy start

Posted: Fri Apr 03, 2015 10:11 pm
by Talguy
I am just freaking out over the whole pre signal mention. I have been following the openttdcoop team for some time. In what way will "chain signals" work differently?

Re: Friday Facts #80 - Crazy start

Posted: Fri Apr 03, 2015 10:34 pm
by Drury
Klonan wrote:Don't forget that rockets have to perform a gravity turn! Going straight up might get you into space... but going sideways is whats going to keep you there.

http://en.wikipedia.org/wiki/Gravity_turn
I don't think this is viable to visualize in top-down view when the camera is ~50m above the surface.