You could of course use ,/;:\={}()-_=+!@#$%^&*~`'"?<>| as well.spirulence wrote:Interesting. I hadn't thought of doing that. I just implemented it and I have to agree, the levels are now far easier to edit by hand. The only potential pitfall is that it's now harder to have more than 36 tiles in a tileset. I hope that won't be a problem in the project I'm using it for.
LoveWars prototype/demo
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: LoveWars prototype/demo
Help us help you: attach a .love.
- arquivista
- No longer with us
- Posts: 266
- Joined: Tue Jul 06, 2010 8:39 am
- Location: Insert Geolocation tag here
- Contact:
Re: LoveWars prototype/demo
and that is the thing that makes that method interesting for developing roguelikes (just to emulate old style school rogues).Robin wrote:You could of course use ,/;:\={}()-_=+!@#$%^&*~`'"?<>| as well.
--------------------------------------------------------
To Do: Insert Signature Here
--------------------------------------------------------
To Do: Insert Signature Here
--------------------------------------------------------
Re: LoveWars prototype/demo
It can be ~30/40 ish cell types per level, rather than for the entire game, if you include a table with your level file that translates the symbols to cell types. Symbols not specified in the table could refer to some default instead. Unique cell types can be specified in the level file itself, etc.spirulence wrote: Interesting. I hadn't thought of doing that. I just implemented it and I have to agree, the levels are now far easier to edit by hand. The only potential pitfall is that it's now harder to have more than 36 tiles in a tileset. I hope that won't be a problem in the project I'm using it for.
The idea is Kornel Kisielewicz's, it'll probably be included in his next DoomRL release.
- arquivista
- No longer with us
- Posts: 266
- Joined: Tue Jul 06, 2010 8:39 am
- Location: Insert Geolocation tag here
- Contact:
Re: LoveWars prototype/demo
XXXRL series seems to have interesting LUA concepts and have a lot to teach and inspirefwoop wrote:
The idea is Kornel Kisielewicz's, it'll probably be included in his next DoomRL release.
http://doom.chaosforge.org/wiki/index.php?title=Sandbox
Code: Select all
-- SANDBOX HELLS ARENA ----------------------------------------------------------
Levels("CUSTOM",{
name = "Hell's Arena",
Create = function ()
Level.fill(CELL_PRWALL)
Level.tile(".",CELL_FLOOR)
Level.tile("X",CELL_RWALL)
Level.tile("#",CELL_RWALL)
Level.tile(",",CELL_BLOOD)
Level.tile(">",CELL_STAIRS)
Level.put(2,2,{
"#######################.............................########################",
"###########.....................................................############",
"#####..................................................................#####",
"##........................................................................##",
"#..........................................................................#",
"............................................................................",
"..................................,,,,,,....................................",
"..,,,.............................,,,,,,,...................................",
"..,>,............................,,,,,,,,,..................................",
"..,,,............................,,,,,,,,...................................",
"..................................,,,,,,....................................",
"............................................................................",
"............................................................................",
"#..........................................................................#",
"##........................................................................##",
"#####..................................................................#####",
"###########.....................................................############",
"#######################.............................########################",
})
Level.scatterPut(5,3,68,15,{
",..,.,",
",XXXX.",
".XXXX,",
".XXXX.",
",..,.,",
},CELL_FLOOR,9+random(8))
Level.scatter(2,2,77,19,CELL_FLOOR,CELL_BLOOD,100)
Level.player(38,10)
end,
OnEnter = function ()
Player.setWeapon( ITEM_SHOTGUN )
Player.addItem( ITEM_SHELL )
Player.addItem( ITEM_SHELL )
Player.addItem( ITEM_SHELL )
Player.addItem( ITEM_SHELL )
Level.result(1)
msg("A devilish voice announces:")
msg("\"Welcome to Hell's Arena, mortal!\"")
msg("\"You are either very foolish, or very brave. Either way I like it!\"")
msg("\"And so do the crowds!\"")
msg("Suddenly you hear screams everywhere! \"Blood! Blood! BLOOD!\"")
msg("The voice booms again, \"Kill all enemies and I shall reward thee!\"")
Level.summon(NPC_DEMON,3)
Level.summon(NPC_LOSTSOUL,2)
Level.summon(NPC_CACODEMON,1)
end,
OnKill = function ()
local temp = random(3)
if temp == 0 then msg("The crowds go wild! \"BLOOD! BLOOD!\"")
elseif temp == 1 then msg("The crowds cheer! \"Blood! Blood!\"")
else msg("The crowds cheer! \"Kill! Kill!\"") end
end,
OnKillAll = function ()
if Level.result() == 1 then
msg("The voice booms, \"Not bad mortal! For a weakling that you ")
msg("are, you show some determination.\"");
msg("You hear screams everywhere! \"More Blood! More BLOOD!\"")
msg("The voice continues, \"I can now let you go free, or")
msg("you may try to complete the challenge!\"");
local choice = msgconfirm("\"Do you want to continue the fight?\"")
if choice then
msg("The voice booms, \"I like it! Let the show go on!\"")
msg("You hear screams everywhere! \"More Blood! More BLOOD!\"")
Level.drop(ITEM_CHAINGUN)
Level.summon(NPC_DEMON,3)
Level.summon(NPC_CACODEMON,2)
Level.result(2);
else
msg("The voice booms, \"Coward!\" ")
msg("You hear screams everywhere! \"Coward! Coward! COWARD!\"")
end
return
end
if Level.result() == 2 then
msg("The voice booms, \"Impressive mortal! Your determination")
msg("to survive makes me excited!\"")
msg("You hear screams everywhere! \"More Blood! More BLOOD!\"")
msg("\"I can let you go now, and give you a small reward, or")
msg("you can choose to fight the final challenge!\"")
local choice = msgconfirm("\"Do you want to continue the fight?\"")
if choice then
msg("The voice booms, \"Excellent! May the fight begin!!!\"")
msg("You hear screams everywhere! \"Kill, Kill, KILL!\"")
Level.drop(ITEM_SHELL,4)
Level.drop(ITEM_AMMO,4)
Level.summon(NPC_CACODEMON,3)
Level.result(3);
else
msg("The voice booms, \"Too bad, you won't make it far then...!\" ")
msg("You hear screams everywhere! \"Boooo...\"")
Level.drop(ITEM_SHELL,3)
Level.drop(ITEM_LMED)
Level.drop(ITEM_SMED)
end
return
end
if Level.result() == 3 then
msg("The voice booms, \"Congratulations mortal! A pity you came to")
msg("destroy us, for you would make a formidable hell warrior!\"")
msg("\"I grant you the title of Hell's Arena Champion!\"")
msg("\"And a promise is a promise... search the arena again...\"")
Level.drop(ITEM_SCGLOBE)
Level.drop(ITEM_BARMOR)
Level.drop(ITEM_LMED)
Level.result(4)
end
end,
OnExit = function ()
msg("The voice laughs, \"Flee mortal, flee! There's no hiding in hell!\"")
end,
})
--------------------------------------------------------
To Do: Insert Signature Here
--------------------------------------------------------
To Do: Insert Signature Here
--------------------------------------------------------
- arquivista
- No longer with us
- Posts: 266
- Joined: Tue Jul 06, 2010 8:39 am
- Location: Insert Geolocation tag here
- Contact:
Re: LoveWars prototype/demo
In my 2.92 Duo Intel Mac the 60 FPS drops to 30/25 FPS when selecting an unit and then raises to 40. Returns to 60 when i Unselect/click outside map. Not an expert on this, but considering the kind of operation in cause and that this should be an low demanding turn based game problably there is some routine draining somewhere?bartoleo wrote:What are your FPS?
--------------------------------------------------------
To Do: Insert Signature Here
--------------------------------------------------------
To Do: Insert Signature Here
--------------------------------------------------------
Re: LoveWars prototype/demo
Found it!
it was :
love.graphics.setFont(10)
in draw
from wiki:
Try it now
it was :
love.graphics.setFont(10)
in draw
from wiki:
I've updated source and .loveOr, in the case of the default font,
love.graphics.setFont(size)
This latter method is however strongly discouraged. Each time setFont is called without a font object, a new font object is created. Doing so each frame will use up a huge amount of RAM. It's okay if you use it once, but doing it multiple times is a bad idea. Instead, try this:
myFont = love.graphics.newFont(size)
love.graphics.setFont(myFont) -- you can use this line each frame without eating too much memory
Try it now
Bartoleo
- arquivista
- No longer with us
- Posts: 266
- Joined: Tue Jul 06, 2010 8:39 am
- Location: Insert Geolocation tag here
- Contact:
Re: LoveWars prototype/demo
Yah, you got it! Stable 60's FPS now!bartoleo wrote:Found it!
I've updated source and .love
Try it now
--------------------------------------------------------
To Do: Insert Signature Here
--------------------------------------------------------
To Do: Insert Signature Here
--------------------------------------------------------
Who is online
Users browsing this forum: No registered users and 6 guests