Pack of noob questions
Posted: Fri Jan 08, 2016 9:40 am
Good os.date() to all.
I have some noob or stupid questions about love2d and lua.
I do on love2d a big(rpg) game, i know this bad choice for "my first game", but me need some great experience.
So...
1. My game is big and i want to create controller for all mobs. Each mob have function life() and it must pass trough loop. This slow down the game and there need something like another thread. How i can run this loop in parallel to main thread? love.thread - bad choice, because i want run only function without creating file and channels for this. And i'm doubt about coroutines. Please suggest the best way.
2. Game have the big map with 1000x1000 32x32 tiles and about 10 z-levels. Some tiles can be transparent and i want to draw objects in 1 z-lvl down, but i don't know how. I use the spritebatch for this(thanks to all guys from my latest topic) and pass trough loop all objects in screen area, but before i pass all objects on z-lvl for create list with objects in screen area. So, I need to draw current z-lvl and lower z-lvl in specific places. And do it fast. How?
Objects not tied to tiles!
3. I have many polygonal objects in screen area. And i want to get object by pointer. Earlier i'm just check contents of tile and pixels in their icon. Now i can't and haven't ideas or algorithms for it. Any suggestions?
4. I'm walked away from bounding box collision. I want the vertex-based collision and i'm looking for good algorithms. Where i can find polygonal collision check(with expulsion, desirable)?
Sorry for my english. It looks bad...
I have some noob or stupid questions about love2d and lua.
I do on love2d a big(rpg) game, i know this bad choice for "my first game", but me need some great experience.
So...
1. My game is big and i want to create controller for all mobs. Each mob have function life() and it must pass trough loop. This slow down the game and there need something like another thread. How i can run this loop in parallel to main thread? love.thread - bad choice, because i want run only function without creating file and channels for this. And i'm doubt about coroutines. Please suggest the best way.
2. Game have the big map with 1000x1000 32x32 tiles and about 10 z-levels. Some tiles can be transparent and i want to draw objects in 1 z-lvl down, but i don't know how. I use the spritebatch for this(thanks to all guys from my latest topic) and pass trough loop all objects in screen area, but before i pass all objects on z-lvl for create list with objects in screen area. So, I need to draw current z-lvl and lower z-lvl in specific places. And do it fast. How?
Objects not tied to tiles!
3. I have many polygonal objects in screen area. And i want to get object by pointer. Earlier i'm just check contents of tile and pixels in their icon. Now i can't and haven't ideas or algorithms for it. Any suggestions?
4. I'm walked away from bounding box collision. I want the vertex-based collision and i'm looking for good algorithms. Where i can find polygonal collision check(with expulsion, desirable)?
Sorry for my english. It looks bad...