Skip to content

WHKnightZ/OpenGL_Gravity_Duck

Repository files navigation

Gravity Duck

Game made by C++ OpenGL

Content:

Setup:

  • Setup MinGW/G++
  • Open main.cpp or Gravity_Duck.dev if you have Dev C++
  • Only build main.cpp

Linker:

  • Window: -lopengl32 -lglu32 -lglut32 -lSDL2 -lSDL2_mixer -mwindows -m32
  • Ubuntu: -lGL -lGLU -lglut -lSDL2 -lSDL2_mixer
    Note:
    -lopengl32, -lglu32, -lglut32 & -lGL, -lGLU, -lglut for OpenGL
    -lSDL2, -lSDL2_mixer for Audio
    -m32 for Win32 bit
    -mwindows for hide Console

Image:

Image

Type of Enemy:

  • Enemy_Block_Horizontal
  • Enemy_Block_Vertical
  • Enemy_Worm
  • Enemy_Shooter
  • Enemy_Fly
  • Enemy_Fly_Chase
  • Enemy_Crusher

Map Structure:

Line 1: Appear of Duck: x real, y real, Gravity Direction
Line 2: Destination Position: x, y, Gravity Direction
From Line 3 to 17: Tiles of Map
Next: Count of Switches
Each switch has 1 Line: x, y, Rotation Direction (0 is ccw, 1 is cw)
Next: Count of Enemies
Each enemy has 1 Line: Type, x, y, ... follow type of Enemy

Note:

In Map_18
Enemy_1: Move 0 Move_Max 81
Enemy_2: Move 29 Move_Max 81
Reason:
Move_Max = Move_Max + 9 = 90 (Stt = 3, Stt Change Every 3 Time (Enemy_Time = 3) => +9 Offset For Move_Max)
=> Move = Move_Max / 2 = 45 (Balance Bullet For 2 Enemies)
But Enemy_1_X (17) > Enemy_2_X (15) = 2 * 32 = 64 (32 Is Size Of Tile)
Offset_Bullet = 4 => Enemy_1_Latency = 64 / 4 = 16
=> Enemy_1_Move = 45 - 16 = 29

Conclusion:

Full 40 Maps - Thanks to Armor Games
Like original game 80%
I fixed some places to make game more reasonable :D

Youtube:

https://www.youtube.com/watch?v=uzZv5hL9D2U

--- End ---

About

Game Gravity Duck

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages