Search found 37 matches
- Fri Aug 06, 2021 6:15 am
- Forum: General
- Topic: how to make individual objects in lua?
- Replies: 4
- Views: 6227
Re: how to make individual objects in lua?
Speaking as someone who's dabbled in Lua OOP and ultimately mostly given it up except where absolutely necessary, I'd strongly advise against trying to arbitrarily apply any particular programming paradigm to Lua, especially OO. This is because Lua is a very simple language, and the words we use to ...
- Thu Aug 05, 2021 7:18 pm
- Forum: Support and Development
- Topic: Adding trees and rivers to procedural map and voronoi to tiles
- Replies: 7
- Views: 4783
Re: Adding trees and rivers to procedural map and voronoi to tiles
Gotcha lol. Yeah I do sometimes accidentally get rivers, but there's nothing in the code saying "make rivers" per se.
- Wed Aug 04, 2021 7:13 pm
- Forum: Support and Development
- Topic: Adding trees and rivers to procedural map and voronoi to tiles
- Replies: 7
- Views: 4783
Re: Adding trees and rivers to procedural map and voronoi to tiles
Not as such right now. There's nothing forcing water tiles to spawn next to each other. Though I think that's simple enough to make happen, with some post processing. Like after you generate the initial noise map, you could iterate back over it smoothing it out with some probabilities. Say, if noise...
- Wed Aug 04, 2021 6:41 pm
- Forum: Support and Development
- Topic: Implementing levels
- Replies: 16
- Views: 13190
Re: Implementing levels
Ah, neat! So, Lua makes this kind of thing super easy, actually. What you'll want is probably to set up a table in advance, that you'll use to store your maps. Because, those maps, they're just tables too! You can shove tables inside other tables, and keep them there, pull them back out later, etc. ...
- Tue Aug 03, 2021 11:02 pm
- Forum: Support and Development
- Topic: Implementing levels
- Replies: 16
- Views: 13190
Re: Implementing levels
The type of game im making is basically a more simple game, basically picture a block going through an obstacle course, and if it falls it dies. Simple games are a fantastic place to start! Are you looking to make all the levels yourself? Or write code to do procedural generation? Single-screen, or...
- Tue Aug 03, 2021 6:56 pm
- Forum: General
- Topic: Code preferences
- Replies: 9
- Views: 8953
Re: Code preferences
How about classes? There are definitely times when it's useful to pair a table with some functions, particularly in game dev. When that situation arises, I try to keep it as flat as possible. I don't bother with encapsulation or any of that OOP nonsense (I solve the problem of shared state by doing...
- Tue Aug 03, 2021 6:46 pm
- Forum: Support and Development
- Topic: Adding trees and rivers to procedural map and voronoi to tiles
- Replies: 7
- Views: 4783
Re: Adding trees and rivers to procedural map and voronoi to tiles
Sure! I recently implemented a few different "tilesets" for forests, volcanos, and caves.
cave:
forest:
volcano:
Edit: Here, go ahead and poke through my source if you like.
https://github.com/applebappu/wizard-tower
cave:
forest:
volcano:
Edit: Here, go ahead and poke through my source if you like.
https://github.com/applebappu/wizard-tower
- Tue Aug 03, 2021 2:41 am
- Forum: Support and Development
- Topic: [SOLVED] Why is my font not dimming?
- Replies: 2
- Views: 2412
Re: Why is my font not dimming?
Oh my god, lmao. I knew it would be dumb. Thank you. Setting it to 100/255 for the RGB and 255/255 for the alpha yields:
Thank you!
Thank you!
- Tue Aug 03, 2021 12:18 am
- Forum: General
- Topic: Code preferences
- Replies: 9
- Views: 8953
Re: Code preferences
I pretty much always separate out variable declarations, table items, function declarations, everything gets its own line. It just makes it way way easier to go back and parse later as the project gets larger. One-liners are fun as a challenge but it doesn't make a good workflow for me. As for namin...
- Tue Aug 03, 2021 12:06 am
- Forum: Support and Development
- Topic: Adding trees and rivers to procedural map and voronoi to tiles
- Replies: 7
- Views: 4783
Re: Adding trees and rivers to procedural map and voronoi to tiles
I had to deal with something similar in my own game, actually. Your implementation may vary, but basically what I did was use the initial output of the noise map to then choose tiles from a table of potential selections, and then tweaked the table and the noise function until I was getting stuff I l...