Roguelike Development with Love2d?
Roguelike Development with Love2d?
I've been obsessing over a roguelike that's slowly coming together in my mind lately. I've been using love2d for a while but it seems particularly unsuited for roguelike development. Is this the case or am I just not doing it right? Also, is a roguelike with multiple zlevels (similar to dwarf fortress) a reasonable possibility using lua or should I suck it up and learn C++ despite already knowing lua and being familiar with Love2d.
- DaedalusYoung
- Party member
- Posts: 413
- Joined: Sun Jul 14, 2013 8:04 pm
Re: Roguelike Development with Love2d?
I don't see why it would be unsuited. What problems do you encounter?
Re: Roguelike Development with Love2d?
Roguelikes and Roguelites are definitely possible in LÖVE.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
personal page and a raycaster
Re: Roguelike Development with Love2d?
I'm not running into problems necessarily, I actually love the way tables work in Lua which is why I don't want to give it up. It just seems at odds with the layout of a roguelike. even the concept of love.update doesn't make sense for roguelikes, neither does love.draw because you only need to update once per turn. The whole game timer system seems at odds with it. Plus drawing things with love2d would be wasteful in a traditional roguelike (pretty sweet for adding non traditional graphics options though). I'm just worried that I'll get a ways into it and find out the language and platform aren't suited to what I'm doing.DaedalusYoung wrote:I don't see why it would be unsuited. What problems do you encounter?
Re: Roguelike Development with Love2d?
Well, you can actually redefine love.run to call love.update or love.draw whenever or however much you want. However, this is not necessary. Many modern roguelikes use constant updates/draws (DCSS, TOME). Just have some sort of timer and use that for the basis of your updates. Inefficiency is not really a problem, if you just set an FPS limit by adding a sleep to update, I doubt it will use more than 1-2% CPU @ 30-60FPS on a modern computer.osoII wrote:It just seems at odds with the layout of a roguelike. even the concept of love.update doesn't make sense for roguelikes, neither does love.draw because you only need to update once per turn.DaedalusYoung wrote:I don't see why it would be unsuited. What problems do you encounter?
Anyway, there are already some roguelikes using LOVE. Snapshot is actually quite actively developed.
- substitute541
- Party member
- Posts: 484
- Joined: Fri Aug 24, 2012 9:04 am
- Location: Southern Leyte, Visayas, Philippines
- Contact:
Re: Roguelike Development with Love2d?
There are roguelikes made in Love2D. As for the love.update, you can either edit love.run, or just check for events like this:
Note that you need to use the keypressed/keyreleased functions, not the love.keyboard.isDown functions since it will send an event every frame.
Code: Select all
-- in some function that sends an event once (i.e., love.keypressed)
if (someExpression == true)
someEvent = true
end
-- in love.update
if (someEvent == true)
someEvent = false
-- do something
end
Currently designing themes for WordPress.
Sometimes lurks around the forum.
Sometimes lurks around the forum.
Re: Roguelike Development with Love2d?
Unless you plan to launch a game that would run on people's toaster or something, the inefficient part isn't really relevant. You can just keep drawing the game state every frame easily. Although I guess if you want to cut down on cpu cycles used you could draw everything to a canvas whenever an event happens and just keep drawing that canvas to the screen in love.draw.
Re: Roguelike Development with Love2d?
Having a roguelike to play while your bread is being heated.... Toaster Fortress....Plu wrote:Unless you plan to launch a game that would run on people's toaster or something, the inefficient part isn't really relevant. You can just keep drawing the game state every frame easily. Although I guess if you want to cut down on cpu cycles used you could draw everything to a canvas whenever an event happens and just keep drawing that canvas to the screen in love.draw.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
personal page and a raycaster
Re: Roguelike Development with Love2d?
that actually sounds like a fun game, now i know what my next project is going to be about (im dead serious).Davidobot wrote:Having a roguelike to play while your bread is being heated.... Toaster Fortress....Plu wrote:Unless you plan to launch a game that would run on people's toaster or something, the inefficient part isn't really relevant. You can just keep drawing the game state every frame easily. Although I guess if you want to cut down on cpu cycles used you could draw everything to a canvas whenever an event happens and just keep drawing that canvas to the screen in love.draw.
Re: Roguelike Development with Love2d?
Yay! More Roguelikes! I will finally have something to do while my bread is being heated!jjmafiae wrote:that actually sounds like a fun game, now i know what my next project is going to be about (im dead serious).Davidobot wrote:Having a roguelike to play while your bread is being heated.... Toaster Fortress....Plu wrote:Unless you plan to launch a game that would run on people's toaster or something, the inefficient part isn't really relevant. You can just keep drawing the game state every frame easily. Although I guess if you want to cut down on cpu cycles used you could draw everything to a canvas whenever an event happens and just keep drawing that canvas to the screen in love.draw.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
personal page and a raycaster
Who is online
Users browsing this forum: Google [Bot] and 1 guest