At first I drew a cube.Then I thought, "Let's load the map."The result was a maze.And let's add panels!And let's add fireballs!But what about without a third-person view?And where is the multiplayer?So there was a game Walkers
Video
About the game
As you know, every programmer must write a game and chat. In the end, I did this and that. However, under the "chat" I understand the addition of multiplayer. The result was a more or less serious game, which I now want to show.
WASD - Movement Arrows - camera rotation (you can use the mouse in full screen mode) Shift - sit down Space - jump In the main menu, you can look up to see records.
')
How to set the level
The number of rows and columns (N, M) is indicated first.
Then N lines of M characters define a static map.
'.' - floor
'E' - finish
'0' - danger (lava / water / ...)
'*' - wall
'P' is the starting position of the player. If the character 'P' is not, then the starting position is the position (0, 0)
After this comes the number of moving objects and their description. Moving objects are of 3 types: Hpanel - periodically disappearing panel, Mpanel - moving panel, Fpanel - fireballs.
Hpanel: H xy <first delay> <first interval> <second interval> <initial state (0/1)> The scheme of its work is as follows: first, during the <first delay> it will be <the initial state>, then the state will change to <first interval>, then it will change to <second interval>.After that, the alternation of <first interval> and <second interval> will occur.
Mpanel: M xy <time per cell> <PARAM> <PARAM> is a string describing panel movement.Valid characters are S (stay), UDLR (up, down, left, right).It is important to remember that the string will be processed cyclically.After processing the last character of a line, the position of the panel becomes (x, y)!
Fpanel: F <x * 100> <y * 100> <z * 100> <r * 100> <DIR> <time per cell> <cooldown> <distance * 100> <first delay> <sx * 100> <sy * 100> <sz * 100>. The position of the fireball launcher is given by the numbers x, y, z.In the parameters, you must specify these numbers multiplied by 100. All numerical parameters must be integers.r is the radius of the fireball.<DIR> - Direction (UDLR).<cooldown> - the gap between launches.sx, sy, sz - scaling of balls.This allows you to run ellipsoids.distane - the distance that the balls will fly.<first delay> is a parameter that allows you to shift the balls along the direction of their flight.
After that textures are set. All textures are in the Textures folder. Specify the number of textures, then the names of objects and the names of pictures. Valid objects:
sky
wall
exit
floor
danger
hidden
moving
Files with levels are stored in the Levels folder. The number of levels is stored in the “param.walk” file, which is restored after deletion with the correct number. Levels should be numbered from one. In the published version of 13 levels.
I learned:
C ++ programming
Write Qt projects
Work with OpenGL
Work with network
Write multithreaded applications
Work with matrices
And:
Understand how skeletal animation works
Tried to work with Git
And got a very important lesson: We need to think about what will be the result before you sit down to write.So, due to the fact that the graphics and calculations were in the same class, I had to work hard to smash them into different classes and run them in separate threads.
What is mine, what is not mine ...
I did not use ready-made engines. However, textures and models are not mine. Model taken from Half-life. If someone did not recognize the hero, this is Barney.