## Search found 812 matches

Fri Jul 26, 2019 12:04 pm
Forum: Games and Creations
Topic: Snake!
Replies: 9
Views: 5528

### Re: Snake!

this thread is 11 years old
Mon Jun 10, 2019 9:53 pm
Forum: General
Topic: Code Doodles!
Replies: 155
Views: 70059

### Re: Code Doodles!

GOO SIMULATOR 2020 You need moonshine for it to work cause i'm bad at shaders. 1560203306.png function love.load() s = "" --love.graphics.setBackgroundColor(1, 1, 1) love.physics.setMeter(40) world = love.physics.newWorld(0, love.physics:getMeter() * 8, true) moonshine = require 'moonshine' blur = ...
Fri Jun 07, 2019 8:19 pm
Forum: Support and Development
Topic: How to detect collision for multiple objects
Replies: 4
Views: 1237

### Re: How to detect collision for multiple objects

Normally there's no need to check collision between A and B and then between B and A. This way, the number of collision checks can be cut in half just by doing the second loop over all objects with an index greater then the current one: for i = 1, #objects - 1 do local object1 = objects[i] for j = ...
Fri Jun 07, 2019 11:45 am
Forum: Support and Development
Topic: How to detect collision for multiple objects
Replies: 4
Views: 1237

### Re: How to detect collision for multiple objects

1. Loop through all the objects 2. For each object, Loop through all the objects again. This is called a nested loop. 3. Make sure the 2 objects you're checking aren't the same object. 4. Check if the 2 objects are colliding In code this looks something like this. Note that this code is completely u...
Mon May 06, 2019 11:40 am
Forum: Support and Development
Topic: Looping through table inception
Replies: 2
Views: 894

### Re: Looping through table inception

What you need is recursion . Some thing like function iterate(t) for i,v in ipairs(t) do if type(v) == "table" then iterate(v) end end end Note: That code is completely untested. That function doesn't do anything other than iterating, So if you want it to do something with the elements in the table ...
Sun Apr 14, 2019 4:02 pm
Forum: Support and Development
Topic: movement code
Replies: 2
Views: 5484

### Re: movement code

thx
Thu Apr 04, 2019 8:56 pm
Forum: Support and Development
Replies: 2
Views: 1184

Writing data to a file is simple, The trickier part is how to structure the data. You could use something like a csv or ini file, But considering your dealing with lua, I'd suggest learning about table serialization. Table serialization basically converts lua tables into strings that you can write t...
Mon Apr 01, 2019 4:06 pm
Forum: General
Topic: need help
Replies: 5
Views: 6886

### Re: need help

What you need is experience with lua scripting and game development.

Rpg's are complicated, You might want to look into making something simpler just to get your feet wet. A good start is a pong clone or a snake clone. You can also follow some of the tutorials on the wiki.
Sun Mar 31, 2019 11:06 pm
Forum: General
Topic: I want to create 2D Animation
Replies: 1
Views: 5938