Skip to content

mathantunes/atari_pingpong_go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

atari_pingpong_go

Atari Ping Pong Golang Implementation using a DDD approach

Following the learning path Here

Setup SDL development

Youtube video reference

After setup, a very basic test application can be used to validate instalation.

go run ./app/sdl2/main.go

Execute actual game

go run ./app/pingpong/main.go

Domain Layer

Entities

A Paddle is what the player controls through the keyboard

A Ball is the moving part between the players

Value Objects

A Keyboard Event represents a new state the player wants to set to paddle

Service

A G structure inside game package is responsible for holding all game logic. It abstracts the calls to Update and Draw by utilizing the interfaces defined for entities

Infra Layer

A EventDispatcher is responsible for reading SDL keyboard events and calling all KeyBoardListener subscribed to the dispatcher.

A EventPooler is responsible for pooling SDL events and calling the respective dispatcher

TODOS:

  • ✔ Frame Rate Independence
  • ✔ Score
  • ✔ Game Over State -> Win/Lose
  • Multiplayer
  • ✔ AI more imperfect
  • Window resize

About

Atari Ping Pong Golang implemented

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages