Search found 239 matches

by RNavega
Wed Mar 06, 2024 8:29 pm
Forum: General
Topic: fixed
Replies: 4
Views: 751

Re: help cleaning up my code

TBH, the way that they create many threads, how they don't use the code tags, plus asking basic questions that hint to a skillset level where they shouldn't be able to write multi-state game code in the first place, makes me think that they did not write this code but got it from somewhere else, lik...
by RNavega
Tue Mar 05, 2024 7:30 pm
Forum: General
Topic: game additions
Replies: 4
Views: 712

Re: snake game additions

Instead of love.graphics.setColor + love.graphics.rectangle, use a single love.graphics.draw(myImage, ...), with myImage holding the result of love.graphics.newImage() done in the initialization part of your program, outside of any repeating functions. You'd need 2 images for the snake: the head and...
by RNavega
Tue Mar 05, 2024 3:32 am
Forum: General
Topic: game additions
Replies: 4
Views: 712

Re: snake game additions

Hm, actually, what I said about "resetting the timer to zero" after the waiting time passes is incorrect . It probably won't make a perceptual difference, but the accurate thing to do is to reset it to "its current value, minus the waiting time", because it might slightly pass th...
by RNavega
Tue Mar 05, 2024 1:03 am
Forum: General
Topic: game additions
Replies: 4
Views: 712

Re: snake game additions

Hi, could you please edit your post to put the code between the [code] [/code] tags? This way it preserves the indentation that you were working on, helping people to understand your code more clearly. As for the movement, it happens inside love.update(), right after the "local headX, headY&quo...
by RNavega
Fri Mar 01, 2024 7:03 am
Forum: Support and Development
Topic: Scaling a shader centered at the mouse point
Replies: 1
Views: 969

Re: Scaling a shader centered at the mouse point

A zoom is a scale operation, and if you want to scale something (like a UV coordinate) based on some point other than the origin, then you need to chain the operations carefully so the scale happens relative to that point. So say you have a 2D space, with a point A somewhere and a point B somewhere....
by RNavega
Fri Mar 01, 2024 6:38 am
Forum: Support and Development
Topic: 2.5D effect?
Replies: 3
Views: 1040

Re: 2.5D effect?

For sure. There are probably a few different ways to do false 3D effects. Here's one, very hastily done: https://love2d.org/forums/viewtopic.php?p=258506#p258506 (Edit: to run it, you download that Parallax_Scrolling.love file, then either drag-and-drop it onto love.exe, or run the command line &quo...
by RNavega
Thu Feb 29, 2024 9:25 pm
Forum: Libraries and Tools
Topic: Native open/save dialogs for Windows
Replies: 2
Views: 1406

Re: Native open/save dialogs for Windows

pgimeno wrote: Thu Feb 29, 2024 11:15 am I believe you can fix that with 'chcp 65001'. Note also that you need to set the terminal to use a font containing all the Unicode characters you want to print, because the default one is very limited.
Thanks for the tip!
by RNavega
Sun Feb 25, 2024 5:18 pm
Forum: Libraries and Tools
Topic: Native open/save dialogs for Windows
Replies: 2
Views: 1406

Native open/save dialogs for Windows

This is an example of how to use the LuaJIT FFI to bind the (obsolete) GetOpenFileNameW() and GetSaveFileNameW() functions from WIN32 so that you can get native dialogs that properly display content on both ASCII and Unicode encodings. So things like the dialog title and the filename, as well as the...
by RNavega
Mon Feb 19, 2024 12:08 pm
Forum: Support and Development
Topic: Trying to figure out collision with tiles in platformer game
Replies: 11
Views: 2163

Re: Trying to figure out collision with tiles in platformer game

I posted these two articles in another thread, but the subject was different so I'll repost them here instead of linking there.
Tutorials on how to make tile maps and handling tile collisions:
- https://sheepolution.com/learn/book/18
- https://jonathanwhiting.com/tutorial/collision/
by RNavega
Sun Feb 18, 2024 9:19 pm
Forum: Support and Development
Topic: Tips & advice for making a small beginner project?
Replies: 6
Views: 641

Re: Tips & advice for making a small beginner project?

I'd like to learn to use the LOVE2D engine as a spare time thing, and I don't want to start off very ambitious, so I was wondering if anyone had good advice on how to start off once I've gotten through the basics of the engine? (...) Would this be a good place to start & work towards or should ...