Search found 111 matches

by milon
Thu Apr 15, 2021 2:54 pm
Forum: Support and Development
Topic: about Lua and games
Replies: 1
Views: 84

Re: about Lua and games

See the Games & Creations thread: https://love2d.org/forums/viewforum.php?f=14 Look for anything with an attachment or a link. You'll find code snipets, full games (.love files), etc. Keep in mind that a .love file is just a renamed .zip file - you can unzip it to see all the files & code. A...
by milon
Tue Apr 13, 2021 2:59 pm
Forum: Support and Development
Topic: If statement and Goto
Replies: 28
Views: 1012

Re: If statement and Goto

Here's a sample game state system I just whipped up. I've not done this before, so I don't promise it's correct, but I think it's solid. The only thing I don't like about is all the string repetition. It would be better to define the strings in one table and then set player.string to that. (Which wo...
by milon
Tue Apr 13, 2021 1:10 pm
Forum: Support and Development
Topic: REQUESTING HELP - Posting Rules
Replies: 36
Views: 291806

Re: REQUESTING HELP - Posting Rules

Raaidah wrote: Mon Feb 08, 2021 12:19 pm Hi. I'm new to love 2d, however my app just keeps showing no games. Is there anyone that can guide me through. Please
Love2D isn't a game itself. It's framework for games. You still have to supply the .love game file. Once you have that, don't run Love2D itself - run the .love instead.
by milon
Tue Apr 13, 2021 12:57 pm
Forum: Support and Development
Topic: Multidimentional arrays/Tables
Replies: 14
Views: 431

Re: Multidimentional arrays/Tables

You can also use the # prefix to get the size of a table Note though that it only counts the elements from index 1 up until the first nil. Not on my system. local test = {1, 2, 3, 4, 5} print(#test) -- 5 test[3] = nil print(#test) -- 5 print() for i = 1, #test do print(i, test[i]) end The output of...
by milon
Mon Apr 12, 2021 9:10 pm
Forum: General
Topic: Camera Tutorial Link Expired
Replies: 2
Views: 232

Re: Camera Tutorial Link Expired

Thanks for that. I added it to the wiki Tutorials. :)

https://love2d.org/wiki/Category:Tutorials
by milon
Mon Apr 12, 2021 8:12 pm
Forum: Support and Development
Topic: my love2d is broken
Replies: 6
Views: 270

Re: my love2d is broken

Sounds like you've got a bad install or something corrupted in your OS. Try this: 1. Uninstall Love2D 2. Reboot 3. Download a fresh installer and re-install Love2D Let us know if that doesn't work. EDIT - What's changed since the last time it worked properly? Or is this a new install? Could also be ...
by milon
Mon Apr 12, 2021 8:07 pm
Forum: Support and Development
Topic: Multidimentional arrays/Tables
Replies: 14
Views: 431

Re: Multidimentional arrays/Tables

You can also use the # prefix to get the size of a table (much simpler, IMO). Here's a 2D nested example of that: local images = {} for i = 1, #images do images[i] = {} for j = 1, #images[i] do images[i][j] = love.graphics.newImage(imageName) end end Just keep in mind that each images[x] entry is it...
by milon
Thu Apr 08, 2021 8:18 pm
Forum: General
Topic: Example code of Platformer AI
Replies: 15
Views: 4901

Re: Example code of Platformer AI

Maybe it's better to think in terms of cached landing points . Then it doesn't matter if your enemies jump the same height/distance or not. Note that your procedural generator needs to be aware of the enemy's jumping capabilities to create navigable maps, unless you want them getting stuck or diving...
by milon
Thu Apr 08, 2021 7:39 pm
Forum: Games and Creations
Topic: WordPlay: An educational game for under 6s
Replies: 9
Views: 3883

Re: WordPlay: An educational game for under 6s

I agree - it's a really nice font. I haven't looked into the code, but maybe you can edit the font a bit if you really want to keep it?

And again, this is a great game. Thanks for posting it!