General discussion about LÖVE, Lua, game development, puns, and unicorns.
Ulydev
Party member
Posts: 445
Joined: Mon Nov 10, 2014 10:46 pm
Location: Paris
Contact:

These can either be small games, quick demos, or whatever you could think of.

Here are some fiddles made by the community:

http://lovefiddle.com/RfgEHx82s7QuyusZJ - Game of Life by Feyrn
http://lovefiddle.com/xjfvZ2Lk7DcCAebCf - Metaball by Alexar
http://lovefiddle.com/XSaubcmTaqZtFfspN - Snake by Alexar
http://lovefiddle.com/BEZZLDkSf5wum8xGD - Pong by bartbes
http://lovefiddle.com/gAfgmqzs6Ld7gWamf - Sample platformer movement

Sheepolution
Party member
Posts: 263
Joined: Mon Mar 04, 2013 9:31 am
Location: The Netherlands
Contact:

And be sure to check out the Code Doodles thread for inspiration.

I was too lazy to optimize the old code, but here's my Trippy Stars

Tanner
Party member
Posts: 166
Joined: Tue Apr 10, 2012 1:51 am

Something is a little off but here's a sphere illuminated using only it's own vertex data.

http://lovefiddle.com/aPTWoDGSp8NRr5zXA

Tjakka5
Party member
Posts: 240
Joined: Thu Dec 26, 2013 12:17 pm

I've written a alternative to tables to store objects and looping over them.
It's a lot faster (benchmarks down below), but it's still missing a way to collect garbage.

http://lovefiddle.com/zRbrTvMapCshjCxym

Code: Select all

Insert TABLE 10000000: 0.907s
Insert LIST  10000000: 0.201s

Insert Remove TABLE 10000000: 0.997s
Insert Remove LIST  10000000: 0.022s

Insert Iterate TABLE 100000: 5.50s
Insert Iterate LIST  100000: 3.66s

Check out my portfolio: http://tjakka5.sorunome.de/

Inny
Party member
Posts: 652
Joined: Fri Jan 30, 2009 3:41 am
Location: New York

This is pretty sweet, how are you pulling it off? Point me into a github repo so I can expand my brain's meat.

Ulydev
Party member
Posts: 445
Joined: Mon Nov 10, 2014 10:46 pm
Location: Paris
Contact:

Inny wrote:how are you pulling it off?
Hey there, it uses Meteor as the backend/frontend and love.js for running LÖVE code in the browser.
Check out the repo on https://github.com/Ulydev/lovefiddle

MrFariator
Party member
Posts: 208
Joined: Wed Oct 05, 2016 11:53 am

Interesting, it's basically something similar to C++'s vector class? I could very well have use for something like this.

Tjakka5
Party member
Posts: 240
Joined: Thu Dec 26, 2013 12:17 pm

MrFariator wrote:
Interesting, it's basically something similar to C++'s vector class? I could very well have use for something like this.
I don't know exactly how a Vector in C++ works, but by the looks of it, yes.
The general idea is that you just have a list that you want objects to be in, and apply some sort of logic to them; you don't care about working with individual objects beyond that (And removing them).

This is usually the way (Or at least my way) that OOP Classes work;
You create a bullet, you put it in a table, and update their position every frame.

I should also note that this implementation gives up "strict-ness" for speed. When you remove a object it really just sets a flag that it shouldn't be iterated over anymore, thus the reference only gets removed when its overwritten.
That is one of the problems that I need to address still, I'll try to bring out a updated version soon.
Check out my portfolio: http://tjakka5.sorunome.de/

Ulydev
Party member
Posts: 445
Joined: Mon Nov 10, 2014 10:46 pm
Location: Paris
Contact:

Simple fiddle to calculate the first ~18 digits of π

http://lovefiddle.com/L9SgsK5xrGFYtDzWW

easy82
Party member
Posts: 184
Joined: Thu Apr 18, 2013 10:46 pm
Location: Hungary