To learn how to work with GoRoutines, Channels, State I implemented a Space Invaders Game :)
- Usage:
- git clone https://github.com/kenlomaxhybris/spaceInvadersWithGoRoutines.git
- cd spaceInvadersWithGoRoutines/
- either from binary:
- ./spaceInvadersWithGoRoutines
- or from code..
- go get
- go run spaceInvadersWithGoRoutines.go
- go run spaceInvadersWithGoRoutines.go -flagPieceHeartBeatMS 10 -flagMotherShipHeartBeatMS 10 -flagWidthPx 600 -flagHeightPx 500 -flagSpacingPx 40
- Do not share state across GoRoutines.
- Use Selects and Channels wisely
- If channels are filling up, find a way to empty them more quickly