Even more physics, first shop guis - Devblog #6

posted in Astero Inc. - Devblog for project Astero Inc.
Published June 05, 2020
Advertisement

First of all, I decided to change the blog style a little. Since I think there are more game developers or beginner game developers, than non-game developers, now it will be more like “from developer to developers”.

Docking physics

This wasn't that hard, but still. Ships while docked shouldn't be able to just fly back or rotate without moving the ship they're docked to. To get the proper behavior, they needed to act like one ship. To achieve this, ships were detecting, if they are docked and if they are, all vectors (total thrust vector) were added together, mass became total mass of ship and ship docked to it. Then, like before, the code created new velocity vector and added it to the original vector. Next, velocity value and rotation were copied by docked ship. Rotation was a bit harder, but still doable. Simply rotate docked ship by its own origin and by the player ship origin.

Shop gui

Shop gui was actually quite simple. Pre-defining everything to display, running function responsible for changing page and everything seemed ready. For graphics, I decided to use simple duplicate-blur-merge-repeat magic. There is also new game currency, which is the main feature of today (yesterday). The topic for yesterday was “Rune”. This is now the game currency. It didn't get its own graphics yet, but it is in game. I also want to create window with specific information about product (the empty rectangle near products) and add automatic shop closing, when undocking.

0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement