Search found 102 matches
- Sun Oct 01, 2023 11:48 am
- Forum: Support and Development
- Topic: [Anim8] I'm having issues getting my coins to spin
- Replies: 2
- Views: 4565
Re: [Anim8] I'm having issues getting my coins to spin
I didn't look too closely but the console gives a clue: > There is no frame for x=2, y=1 I'm guessing you've declared your frames wrong. Check you haven't swapped row/col by mistake and got your frame sizes right. Oh wait I found my issue, apparently I just used the pixel width and height of the im...
- Sat Sep 30, 2023 10:48 pm
- Forum: Support and Development
- Topic: [Anim8] I'm having issues getting my coins to spin
- Replies: 2
- Views: 4565
[Anim8] I'm having issues getting my coins to spin
I created a coin spawner, I'm trying to tinker around a little bit but it can only load a frame of my animation. When I select the entire animation (x frames "1-6") the game is unable to load, but the spawner works perfectly. How can I fix this issue?
main.lua: line 26
main.lua: line 26
- Sat Sep 30, 2023 1:39 pm
- Forum: Support and Development
- Topic: How would I create spawnable objects in love2d without using OOP?
- Replies: 5
- Views: 5522
Re: How would I create spawnable objects in love2d without using OOP?
I'm having trouble understanding metatables and created multiple instances of the same object with them. For example spawning an enemy or collectables like coins. Is there an easier method of doing so in lua? Just forget metatables and use arrays / objects? enemies={} function create_enemies(no) fo...
- Sat Sep 30, 2023 1:38 pm
- Forum: Support and Development
- Topic: How would I create spawnable objects in love2d without using OOP?
- Replies: 5
- Views: 5522
Re: How would I create spawnable objects in love2d without using OOP?
Metatable spawing works like this: base={a=1,b=2,c=3,d=4} meta={__index=function(tab,name) return base[name] end} object1=setmetatable({a=99,c=5656},meta) object2=setmetatable({l=0,d=1},meta) object3=setmetatable({c="nope"},meta) for k,v in pairs(base) do print("key:",k,"va...
- Sat Sep 30, 2023 3:37 am
- Forum: Support and Development
- Topic: How would I create spawnable objects in love2d without using OOP?
- Replies: 5
- Views: 5522
How would I create spawnable objects in love2d without using OOP?
I'm having trouble understanding metatables and created multiple instances of the same object with them. For example spawning an enemy or collectables like coins. Is there an easier method of doing so in lua?
- Sat Sep 23, 2023 9:25 pm
- Forum: Support and Development
- Topic: Having trouble with Metatables
- Replies: 1
- Views: 2341
Having trouble with Metatables
Everything is working with my game except when I tried introducing object oriented programming to it. I want to hopefully implement monsters and enemies to my game but I decided to first work on a coin system. I followed a tutorial for metatables however I'm still having trouble getting the coin sys...
- Mon Sep 18, 2023 12:35 am
- Forum: Support and Development
- Topic: How can I scale my tilemap within the camera
- Replies: 2
- Views: 946
How can I scale my tilemap within the camera
My goal is to scale the camera in general so the viewing angle will be smaller. It is centered on the player but the camera is too far away. Someone suggested a zoon parameter but it only increases the size of the player and all other aspects aren't affected. Pushing and Popping doesn't work either....
- Fri Sep 15, 2023 11:16 pm
- Forum: Support and Development
- Topic: What are good places for a platformer environment?
- Replies: 1
- Views: 778
What are good places for a platformer environment?
I was toying around with making a 2d game that takes place in a randomly generated cave, however I felt like it was too constricting for a platformer. While I was able to get the random generation working the terrain was still not ideal for platformer navigation in my opinion. I might still also con...
- Sat Sep 09, 2023 1:26 am
- Forum: Support and Development
- Topic: [SOLVED] I tried writing a procedural generation algorithm but it doesn't seem to be working and I'm not sure why
- Replies: 3
- Views: 1212
Re: I tried writing a procedural generation algorithm but it doesn't seem to be working and I'm not sure why
Look at your getBorderCount function: wallCount = wallCount + map[gridX][gridY] should be: wallCount = wallCount + map[a][b] That way, your smooth function actually works! Oh my God that actually worked! I can't thank you enough. Only thing I need to figure out is how but at least I got something w...
- Fri Sep 08, 2023 10:26 pm
- Forum: Support and Development
- Topic: [SOLVED] I tried writing a procedural generation algorithm but it doesn't seem to be working and I'm not sure why
- Replies: 3
- Views: 1212
Re: I tried writing a procedural generation algorithm but it doesn't seem to be working and I'm not sure why
I based my code off of a video I saw in which a guy does the same thing I'm trying to do but in unity. Even though the code was simple and easy to understand. I wasn't able to get it working in love. It is basically meant go check if the tiles around each tiles are empty (0) or walls (1) and if wal...