Search found 811 matches

Mon Jun 10, 2019 9:53 pm
Forum: General
Topic: Code Doodles!
Replies: 155
Views: 61739

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: 198

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: 198

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: 380

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: 5253

Re: movement code

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

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: 6442

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: 5608

Re: I want to create 2D Animation

Long answer: No, But you could make an animation, and save each frame of it to a file, then assemble the frames into a video with pretty much any video editing software.

To save the frames you could use love.graphics.captureScreenshot
Sun Feb 10, 2019 3:52 pm
Forum: Games and Creations
Topic: blockNOT - logic platformer
Replies: 1
Views: 2121

Re: blockNOT - logic platformer

NOICE
Thu Jan 24, 2019 12:41 am
Forum: General
Topic: Code Doodles!
Replies: 155
Views: 61739

Re: Code Doodles!

This one isn't contained in main.lua, But i'd consider it a doodle. It's a bunch of randomly moving balls who evolve the ability to hit a target and avoid an obstacle via a genetic algorithm. It's pretty heavily inspired by this tutorial . The code is pretty haphazardly thrown together, But it works...