Battle Among The Stars, Day 6

Today I spend time on finally getting the turret rotation to work, and as it turned out I hadn’t really understood the problems that I faced during LD yet – I ended up having rotation wrong again. (It only worked last time i looked at the problem because I had my 2D playingfield in front of me instead of looking from the top at it.)

Now personally i think adding rotational turrets should be something rather easy, and I was a bit annoyed on how long it took me, but I think my excuses are good enough, after all I’m still spending most of the time I work on this figuring out how to use the Unreal Engine, and it shows that the Engine is build to build shooters, most tutorials focus on that, and creating a shooter level is probably easier than to build a game like this from scratch. I might have saved some time using one of the available game templates (two stick shooter), but I figure that would have limited the learning experience.

Anyways, I now have rotating turrets on my ship (it is actually implemented through a blueprint component, something new in UE 4.7), and that are working, and also I implemented a simple zoom in / zoom out control (in the old default distance it was hard to even see the the turrets, so I moved a bit closer (for now) and gave the option to use the mousewheel for zooming in/out. (Not sure how I should provide that for gamepad, probably you’ll need to hold a shift key for that).

Also, i replaced the static ship in the main menu with the same thats being used by the player – which allows for a small turret-rotation animation at the start of the menu.

After that I spend quite some time reorganizing the folders of my project to something a bit less of a mess.

Now, all in all I’m happy with how much I got done, also, at the end of the video there is one more thing I’ve been working on ;)

Also, last friday I showed the previous video to some friends of mine (who are working in game dev), an Martin pointed out something that I’m still thinking about. As you might have noticed, when the ship turns your movement vector won’t change at all, only if you apply thrust it will have effect on the vector. Martin said, that if I fire thrusters to the side, I could make it actually in more of a turning around movement. At that time I thought he meant that I should do the ships rotation by thrusters (which I’m avoiding on purpose at the moment, because that would mean rotation needs counter-thrust to stop, which might make the controls a bit too harsh). Apparently what he meant was, that when the ship goes into a curve, the lateral thrusters (which are not implemented yet, but will come for strafing) could fire, by that helping to change the vector faster.

He actually has a good point there, but I don’t want to automate this behaviour away. Once I’ve implemented it you will be able to manually fire those thrusters, mainly for strafing, but it will allow you to influence the vector as well. The thing is that as with the forward breaking thrusters, those are maneuvering thrusters, and by that they are a lot less powerfull than the main engines, which means that managing rotation and the main engine will still be a more efficient way to control the vector, while the lateral thrusters will be better suited to make small corrections.

This all will get more interesting once the fuel mechanics come into play as well.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s