Search found 217 matches

by darkfrei
Thu Apr 22, 2021 11:32 am
Forum: Support and Development
Topic: Love doesnt wanna accept my structure
Replies: 8
Views: 1236

Re: Love doesnt wanna accept my structure

{tileset = love.graphics.newImage("tiles_blue") map = map} Don't forget the comma! {tileset = love.graphics.newImage("tiles_blue"), map = map} Lua starts from 1: local currentLevel = 1 local row = 1 local collumn = 1 -- maybe column? :) local value = levels[currentLevel][row][co...
by darkfrei
Thu Apr 22, 2021 12:30 am
Forum: Games and Creations
Topic: Neural Network: drones
Replies: 3
Views: 813

Re: Neural Network: drones

Intriguing. They learn? I tried to write a nn in Love (twice) but couldn't get smart enough. Your bots get smart? Yes, at the start they are totally random, but you can press space to make the learning process much faster. On the screen it takes about 300k targets :) :ehem: Cheat: The max speed mus...
by darkfrei
Wed Apr 21, 2021 7:00 pm
Forum: Games and Creations
Topic: Neural Network: drones
Replies: 3
Views: 813

Neural Network: drones

Hi all!

I've made a small program with bots, that must take targets. Bots are using the neural network with Genetic Algorithm.
by darkfrei
Mon Apr 19, 2021 4:02 pm
Forum: General
Topic: Using love for a battle demonstrator
Replies: 10
Views: 1988

Re: Using love for a battle demonstrator

Another bezier-clicker with zoom-to-mouse:
by darkfrei
Mon Apr 19, 2021 2:40 pm
Forum: General
Topic: Using love for a battle demonstrator
Replies: 10
Views: 1988

Re: Using love for a battle demonstrator

Thanks for your answeer. I dug a little into love2d. For tooltips, I could draw a semi-transparent rectangle with some text inside, but maybe there already exists a library for tooltip, attached to objects ? For zooming in/out, there is the "love.graphics.scale" function. I also noticed t...
by darkfrei
Sun Apr 18, 2021 7:49 pm
Forum: General
Topic: Using love for a battle demonstrator
Replies: 10
Views: 1988

Re: Using love for a battle demonstrator

- is it possible to use svg for objects ? I think almost all points: yes, but: Not direct svg, but you can make own parser for it. In this project I've used a map to make the svg, than I've saved it in absolute coordinates and saved as .lua table: https://love2d.org/forums/viewtopic.php?f=14&t=...
by darkfrei
Sun Apr 18, 2021 3:52 pm
Forum: Support and Development
Topic: Efficiently drawing a grid map
Replies: 19
Views: 3818

Re: Efficiently drawing a grid map

Gunroar:Cannon() wrote: Sun Apr 18, 2021 1:53 pm So I could make an atlas of all the tiles used using imagedata, then sort it(?) and then use the sprite batch
...
how? :)
I've made such spritesheet and used sprites (quads) from it:
https://love2d.org/forums/viewtopic.php?f=3&t=90857
by darkfrei
Sun Apr 18, 2021 12:05 pm
Forum: Support and Development
Topic: If statement and Goto
Replies: 38
Views: 8596

Re: If statement and Goto

darkfrei, you asked how you know what state the game is in. Ideally you shouldn't need to worry about that (except for debugging, of course). As long as your states and associated actions are well-defined, the game should run just fine regardless of state. If I have three states: LevelOne, LevelTwo...
by darkfrei
Sun Apr 11, 2021 2:06 pm
Forum: Support and Development
Topic: If statement and Goto
Replies: 38
Views: 8596

Re: If statement and Goto

pgimeno wrote: Sun Apr 11, 2021 1:18 pm Do you mean for debugging? You can add a 'name' field.
First I think in the old style, on key pressing check the state and do the code.

But you are right, I can use the state as a "key pressed" event holder and the code will be done.