Search found 9 matches
- Fri Apr 16, 2021 10:25 am
- Forum: Support and Development
- Topic: Multidimentional arrays/Tables
- Replies: 14
- Views: 11805
Re: Multidimentional arrays/Tables
I got the double array table working, so yeah, I got the answer for that. For some reason my whole system was really wonky and too much work. I just wanted to do simple animation (that really wasnt really even needed) and with my idea how to do it was really complicated and too much work. I mean I c...
- Sun Apr 11, 2021 11:33 am
- Forum: Support and Development
- Topic: If statement and Goto
- Replies: 38
- Views: 41033
Re: If statement and Goto
Thanks. I will take a look.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.
- Sun Apr 11, 2021 4:44 am
- Forum: Support and Development
- Topic: If statement and Goto
- Replies: 38
- Views: 41033
Re: If statement and Goto
Looks like I´m still stuck with how I should go with the structure or the idea of it. All the previous examples seem really clear to me and I wanted to try them out. But I just couldn´t get it. Cant get my head around it. Well, I went to back my old if state == 1 then, if state ==2 then route. But t...
- Fri Apr 09, 2021 7:29 am
- Forum: Support and Development
- Topic: Multidimentional arrays/Tables
- Replies: 14
- Views: 11805
Re: Multidimentional arrays/Tables
So you need to define all the different "slot" on that array? I thought you could do it once and be done. I think thats the thing I missed and I couldnt make it work. I think this helps. Thanks. Do you think this is the way to go? Or is there more streamlined approach you would suggest?
- Fri Apr 09, 2021 5:04 am
- Forum: Support and Development
- Topic: If statement and Goto
- Replies: 38
- Views: 41033
Re: If statement and Goto
Im been working with my first little try-out out project. I try to make small memory game. I thought I could just wrap around few hours of code and get the basic commands, but its been like four days. I have working prototype and everything I wanted is there at the moment. But the whole code and th...
- Fri Apr 09, 2021 4:50 am
- Forum: Support and Development
- Topic: Multidimentional arrays/Tables
- Replies: 14
- Views: 11805
Multidimentional arrays/Tables
I seem to have problem to use right table store method. Or I just cant figure out the best way to use it. Or them. So I want to store 10 images and all those 10 images have 10 frames (they are on they own images as well. I want to put them in table and I want to call them with numerical index. Becau...
- Thu Apr 08, 2021 11:02 am
- Forum: Support and Development
- Topic: If statement and Goto
- Replies: 38
- Views: 41033
Re: If statement and Goto
How much have you read on software programming patterns? Specifically the state pattern, it's very cool: https://gameprogrammingpatterns.com/state.html As I understand it, you're encapsulating logic into separate objects, and at one given moment only one of those objects is controlling the game (bo...
- Wed Apr 07, 2021 8:20 am
- Forum: Support and Development
- Topic: If statement and Goto
- Replies: 38
- Views: 41033
Re: If statement and Goto
Its not about restart the whole program. Maybe you want to just restart the level. And not jump all the way to the main menu. Variables could be always zeroed out. Now Im thinking flags, but I think Im heading in wrong direction here. Now I have tons of flags and state variables on my practice proje...
- Tue Apr 06, 2021 11:54 pm
- Forum: Support and Development
- Topic: If statement and Goto
- Replies: 38
- Views: 41033
If statement and Goto
Im new with Love2d, and I have just tried it out for few days. I have some coding experiences from the past. More of the basic kind Id say. I feel like Love2d is pretty cool and could be something long run for me. I just need to get hang of things. So. Now I try to get the idea about Gotos and Ifs. ...