Week 4 – Game Engine
In the fourth so-called chapter of the game engine tutorial,
the main idea was to make the spaceship move. In order to make the intergalactic
vehicle move, we had to use some special functions which GLUT have that can
interact and do something if the user interacts with it. In order to make it
interact with any specific key which is pressed, we had to implement a map data
structured which permits to store different keys or pairs of values to make the
pressed key give a certain response when they are being interacted with.
Another concept which was "underlined" was the delta time, which is
being determined by a function. GLUT includes a function which showcases the
amount of time passed in the game in a certain unit of time, the unit is
milliseconds. Thinking from a physics perspective and from a realist point of
view, the ship needs to rotate as well this meaning that the space vehicle needs
rotation angles, without rotation the controlling of the ship can become really
difficult. The controls of the ship are basic, in order to move forward or
backwards the up, respectively the down, arrow key needs to be pressed. To move
left or right, the left and right arrow key need to be operated. To fly upwards
or downwards the page up, respectively the page down needs to be used. After
successfully following the tutorial I managed to get a moving ship that rotates
and moves.
In the following images can be seen the spatial vehicle in different positions, with different angles:
No comments:
Post a Comment