Search found 1182 matches

by darkfrei
Thu Nov 12, 2020 11:44 am
Forum: Support and Development
Topic: Can someone help me with this piece of code?
Replies: 4
Views: 5029

Re: Can someone help me with this piece of code?

With this preset is much better:
Image
Image
So, your spritesheet cannot be right cropped, it's too small. Also, you can make the 9x3 tiles, not 7x4-1.
by darkfrei
Wed Nov 11, 2020 10:38 pm
Forum: Games and Creations
Topic: Gravity simulation
Replies: 0
Views: 5449

Gravity simulation

Hi!

I've made small simulation of gravity. No collisions, but you can simulate up to 1000 bodies with up to 14 fps. Such big simulation need about half million of interactions with each other body.

By default only 30 bodies, relative huge gravitational constant.
by darkfrei
Tue Nov 10, 2020 3:51 pm
Forum: Support and Development
Topic: Scaling and camera offset
Replies: 4
Views: 5461

Re: Scaling and camera offset

Why the WASD is reversed?

Why not exponential zoom?

Code: Select all

camscale_factor = (1+dt*zoomspeed) 
-- or camscale_factor  = 1/(1+dt*zoomspeed) 
camscale = camscale * camscale_factor
by darkfrei
Mon Nov 09, 2020 11:19 am
Forum: Support and Development
Topic: Zoom to Mouse
Replies: 5
Views: 6480

Re: Zoom to Mouse

Small library with zoom to mouse and move window with mouse.
by darkfrei
Thu Nov 05, 2020 9:09 pm
Forum: Support and Development
Topic: Zoom to Mouse
Replies: 5
Views: 6480

Re: Zoom to Mouse

My version of zoom to mouse: function love.load() -- sets up window variables window = {translate={x=0, y=0}, zoom=1} dscale = 2^(1/6) -- six times wheel movement changes the zoom twice; exponential zoom only end function love.wheelmoved(x, y) local mx = love.mouse.getX() local my = love.mouse.getY(...
by darkfrei
Sun Nov 01, 2020 6:11 pm
Forum: Games and Creations
Topic: Conway's game of life
Replies: 11
Views: 16034

Re: Conway's game of life

Color game of life, for Löve 11.3

Changings:
Added color
Childs become the color of their three parents, random and independently by channel.
Small probability (1%) of mutation for one of three color channels.
"Random" adds new cells, not removes existing.
by darkfrei
Sun Nov 01, 2020 5:12 pm
Forum: Games and Creations
Topic: nono: a game based on no
Replies: 36
Views: 52900

Re: nono: a game based on no

del
by darkfrei
Fri Oct 30, 2020 5:06 pm
Forum: Libraries and Tools
Topic: Artificial Neural Networks for lua
Replies: 14
Views: 34644

Re: Artificial Neural Networks for lua

3. sin actually is the derivate of cos and vice versa (sin' = cos; sin'' = sin) 4. canvas is like the screen you render to but as texture. so you render to an invisible screen, then render the invisible screen like you tell the program to forward any render operation to a canvas by enabling it. the...
by darkfrei
Thu Oct 29, 2020 5:30 pm
Forum: Games and Creations
Topic: Conway's game of life
Replies: 11
Views: 16034

Re: Conway's game of life

Thanks for your example!

Updated to 11.3, added features:
-- added 'r' to random the map
-- map is closed to torus topology
-- resize doesn't delete all dots
-- added GUI to start, clear and random
Issue: I don't know how to save the meta function to the table, but not call it.