Search found 173 matches

by darkfrei
Mon Apr 19, 2021 4:02 pm
Forum: General
Topic: Using love for a battle demonstrator
Replies: 4
Views: 129

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: 4
Views: 129

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: 4
Views: 129

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: 14
Views: 324

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: 29
Views: 1164

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: 29
Views: 1164

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.
by darkfrei
Sun Apr 11, 2021 12:13 pm
Forum: Support and Development
Topic: If statement and Goto
Replies: 29
Views: 1164

Re: If statement and Goto

Small example: state one has physics, but state two has random directions.
by darkfrei
Sun Apr 11, 2021 11:39 am
Forum: Support and Development
Topic: If statement and Goto
Replies: 29
Views: 1164

Re: If statement and Goto

pgimeno wrote: Sun Apr 11, 2021 11:04 am I wrote about one way of dealing with states, starting here: https://love2d.org/forums/viewtopic.php ... 26#p194226

Take a look, see if that helps you wrap around your head around it.
How I can understand which stete is enabled?
by darkfrei
Sun Apr 11, 2021 1:26 am
Forum: General
Topic: Pipes: spritesheet, quads
Replies: 5
Views: 448

Re: Pipes: spritesheet, quads

On this device pixels with area 3x3 are really too big.
by darkfrei
Sun Apr 11, 2021 12:41 am
Forum: General
Topic: Pipes: spritesheet, quads
Replies: 5
Views: 448

Re: Pipes: spritesheet, quads

How to know minimal possible resolution? Right now one pixel has area 3x3 pixels, but it looks to big for this device. I need to make one line less or set the pixel to area 2x2 pixels.