Search found 4 matches

by Jhawsh
Mon Feb 10, 2014 9:53 pm
Forum: Support and Development
Topic: How to check if i need to generate more land?
Replies: 3
Views: 1721

Re: How to check if i need to generate more land?

Here's what I would do: function UpdateGround( x, y, w, h ) -- x and y are the lower left corner of the view-able screen. w is the width of the screen, h is the height. if not GroundMap[math.floor( x / 64 )] then GroudnMap[math.floor( x / 64 )] = math.floor( x / 64 ) * 64 - 64 elseif not GroundMap[...
by Jhawsh
Mon Feb 10, 2014 9:19 pm
Forum: Support and Development
Topic: How to check if i need to generate more land?
Replies: 3
Views: 1721

How to check if i need to generate more land?

Okay heres the deal, trying to create a simple parallax game. Currently i have it if u click left it goes left and when your in 300px of the edge of the box its moves the background instead of the player. How can i detect if i need to generate more land? https://love2d.org/imgmirrur/Ds8q2yR.gif play...
by Jhawsh
Wed Oct 17, 2012 7:25 pm
Forum: Support and Development
Topic: Simple Collision Detection
Replies: 5
Views: 3987

Re: Simple Collision Detection

Helvecta wrote:Wait, wait wait! Can you rephrase that? I'm confused about how you want the box to behave. :oops:
If they try and go outside the window it stops.
by Jhawsh
Wed Oct 17, 2012 4:45 pm
Forum: Support and Development
Topic: Simple Collision Detection
Replies: 5
Views: 3987

Simple Collision Detection

I am trying to make a basic game. Just a box you can control with "wsad" and you can go outside the window. My collision detector only stops when it outside the box and does not allow it to move afterwards, i am stuck and cant find out what to do. Here is my code. function CheckCollision(a...