Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
umutseven92 committed Oct 3, 2023
1 parent cea68df commit 502af03
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

**One schoolbus, one ticking bomb, only one way to- forward. Godspeed.**

**Godspeed** is a simple game for Playdate, inspired by the movie [Speed](https://www.imdb.com/title/tt0111257/?ref_=fn_al_tt_1). You play as a bus, speding down a highway full of obstacles, and if you slow down, the bomb explodes.
**Godspeed** is a simple game for Playdate, inspired by the movie [Speed](https://www.imdb.com/title/tt0111257/?ref_=fn_al_tt_1). You play as a bus, speding down a highway full of obstacles, and if you slow down, or crash too much, the bomb explodes.

## Requirements

Expand All @@ -19,11 +19,11 @@
pdc source/ out/godspeed.pdx
```

* Then either play in the [Simulator](https://sdk.play.date/2.0.1/Inside%20Playdate.html#_running_your_game), or in your [Playdate](https://sdk.play.date/2.0.1/Inside%20Playdate.html#_running_your_game_on_playdate_hardware).
* Then either play in the [Simulator](https://sdk.play.date/2.0.1/Inside%20Playdate.html#_running_your_game), or in your [Playdate by sideloading](https://help.play.date/games/sideloading/).

## How to Play

Every obstacle you hit, you slow down. If you don't mash A hard enough, you slow down. If you slow down too much, you explode! How far can you go?
Every obstacle you hit, you slow down. If you don't mash A hard enough, you slow down. If you slow down too much, or hit obstacles thrice, you explode! How far can you go?

* <kbd>↑</kbd> to move up one lane
* <kbd>↓</kbd> to move down one lane
Expand Down
7 changes: 4 additions & 3 deletions source/main.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--[[
Godspeed is a simple game, inspired by the movie Speed, where you drive a bus in the highway full of obstacles. If you go slower than a certain speed, you explode. Hitting obstacles slows you down.
The game goes on forever, and there is a score. You gain speed by mashing the A or B button, and change lanes by the up & down buttons.
Godspeed is a simple game, inspired by the movie Speed, where you drive a bus in the highway full of obstacles. If you go slower than a certain speed, you explode. Hitting obstacles slows you down. If you hit obstacles three times, you explode.
The game goes on forever, and there is a score. You gain speed by mashing the A button, and change lanes by the up & down buttons.
]]

import "CoreLibs/object"
Expand Down Expand Up @@ -273,7 +273,7 @@ end

function checkSpeedForGameOver(speed, deltaTime)
--[[
There are basically two ways a player can lose:
There are basically two ways a player can lose that is dependent on speed:
1) If the player speed goes below `speedLimit` for `gameOverMs` / `gameOverTick` seconds,
2) If the player speed goes below `instantLoseLimit`. This is to prevent the player from cheesing the game by lighty tapping the button, rather than mashing it.
--]]
Expand Down Expand Up @@ -310,6 +310,7 @@ function resetGame()
end

function onCrashed()
-- This function is passed to the ObstacleManager, which is then passed into each obstacle. It is called when the player crashes into an obstacle.
crashes += 1
crashAmount:setCrashAmount(crashes)

Expand Down

0 comments on commit 502af03

Please sign in to comment.