Skip to content

RiverHillbug/GeometricArcader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Geometric Arcader

What is a Geometric Arcader?

Geometric Arcader is a 2D arcade game but implemented in the acquired 3D PPGA throughout GEOA which allows us to then use the 'redundant 3rd dimension' as the energy-container. You are a small rectangle/triangle constantly moving in a box which collides with the screen window. You continuously gain an amount of energy but depending on your movement speed you lose energy. The movement can only change directions by colliding with an object or rotation around a pillar. Pressing buttons changes the overall movement speed or initiates the rotation. What is extra in this game is up to the student.

How did I use Geometric Algebra in my game?

I used geometric algebra formulas to

  1. Move the player character at two different possible speeds in the scene
  2. Make the player character able to rotate around objects
  3. Determine if any collisions happen with the window borders

Formulas used in the project are:

  1. Translation and Rotation

image

  1. Containment test to determine collisions, which is a meet (operator^) of the player position and the collider plane. Collision happens if the meet is equal to 0. The size of the player sprite is also taken into account here.

    Edit: The correct way to do this in my game would be to join(playerPosition, colliderPlane) to get the distance between player and collider, and then subtract the sprite size from this value. This is how collisions were calculated in the first place but I mistakenly changed it to a meet on the last versison of my code.

And here is an overview of the calculations

  1. Player movement

image

  1. Player rotation

image

  1. Collisions

image image

How To Play

You can interact with the game with keyboard inputs.

  • R -> Toggle player rotation
  • S -> Player speed up / slow down
  • C -> Cycle between pillars in game
  • Arrow keys -> Move pillars

This project was built in my own game engine, FluffyEngine.

About

My "Geometric Arcader" project for Geometric Algebra class.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages