Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/HackSoc/LudumDare28
Browse files Browse the repository at this point in the history
  • Loading branch information
Frankablu committed Dec 16, 2013
2 parents c5f0c07 + 47920e5 commit 40d6f24
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
You Only Get Juan
===========
You play as Juan, a mech soldier person thing. You find yourself in a time loop that forces you to cross your own time line.
You play as Juan, a owl ninja person thing. You find yourself in a time loop that forces you to cross your own time line.

You must protect your past self in order to survive to the present.

Expand All @@ -11,12 +11,3 @@ YOGJ uses the [love2d](http://love2d.org/) library for drawing.

Once installed simply run:
> love path/to/game
## TODO
* Health Bar / Text
* Time Bar / Text
* Victory Screen
* Balance
* Enemy spawning
* Time travel period
* Levels?
3 changes: 3 additions & 0 deletions constants.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
constants = {}

-- Debug mode: show hitboxes, and have lots of health
constants.debug = true

constants.playTime = 160
constants.jumpTime = 100
constants.framerate = 30
Expand Down
4 changes: 1 addition & 3 deletions entity/entity.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ Entity.dy = 0
Entity.ghosted = false
Entity.orientation = 1

Entity.static.debugHitboxes = false

function Entity:initialize(id, x, y, sprite, collider)
self.id = id
self.x = x
Expand Down Expand Up @@ -63,7 +61,7 @@ end
function Entity:draw(vx, vy)
self.sprite:draw(self.x - vx, self.y - vy, self.orientation)

if self.class.debugHitboxes then
if constants.debug then
x1, y1, x2, y2 = self.hitbox:bbox()

x1 = x1 - vx
Expand Down
6 changes: 6 additions & 0 deletions entity/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ local class = require 'middleclass.middleclass'
require 'entity.mob'
require 'drawable.drawable'
require 'utils'
require 'constants'

local highestiteration = 0

Expand All @@ -18,6 +19,11 @@ function Player:initialize(id, x, y, collider, orientation)
self.iteration = highestiteration
self.orientation = orientation
self.canJump = true

if constants.debug then
self.maxHealth = 999999999999999999999999999
self.health = self.maxHealth
end
end

function Player:isCurrentPlayer()
Expand Down

0 comments on commit 40d6f24

Please sign in to comment.