Page 1 of 1

Dungeon.lua hacking

Posted: Sun Dec 21, 2008 10:02 am
by iGame3D
[post modified, lua codes removed]
So I'm hacking the dungeon file and trying to figure out whats what.

I had posted lua code here, but that is getting really deep.
I'll post scripts and executable to download when I get to that point.

Posted: Sun Dec 21, 2008 11:28 am
by iGame3D
Can't delete a post I'll so at this point writing dsb_text2Map back out was possible.

Posted: Sun Dec 21, 2008 8:33 pm
by Sophia
:shock:

I assume you're writing some kind of parser/editor for DSB. I am impressed. :D

You probably more about the Lua language than I do, but if you need help with the specifics of DSB, I will certainly volunteer whatever information or code is needed.

I would warn that I have overruled certain aspects of Lua's internals because they don't do exactly what DSB needs to.

Notably:
:arrow: Do not use Lua's math library for generating random numbers. Always use dsb_rand(). This is because if/when DSB supports recording movies, this will allow the random seed to be stored and make the outcome deterministic.

:arrow: Don't use Lua's dofile() to include other Lua files when you're using DSB-- use the lua_manifest or the ability to import archetypes. This is because DSB does more than just load and run the file, such as fixing extensions. (it will search for a compiled .lxx if a .lua is not found)

Posted: Sun Dec 21, 2008 9:59 pm
by iGame3D
I'll need help eventually when I try to compile a fresh dungeon.lua from the editor. But first success at translating a text2map into a pretty set of mono colored buttons.


Image

Posted: Mon Dec 22, 2008 10:22 am
by iGame3D
Making progress, the scripting is getting too deep to post.

Image

Posted: Mon Dec 22, 2008 7:04 pm
by Sophia
That's pretty good if it is what I think it is-- though from just looking at it, it's almost as unclear as my approach of just using a PCX image. :P

Would you like some bitmaps that I've been using for wallitems and objects and such? :)

Posted: Mon Dec 22, 2008 11:09 pm
by iGame3D
Yeah that is hairy. There's to be a list of whats in the level, select item in the list will select the square changing the button border.

I kind of got distracted at 4AM turning the map into 3D...which is pretty much working with raw quads and cubes, now to hack to use textured walls and floors. Then get back on track with pulling the data into lists.

Yeah I'll take some textures, maybe I can point the map tool toward them so you can see what's at a dungeon point.


bill at igame3d dot com if you want to deliver them
Thanks.
I'm so fried, went to bed at 7AM.

Posted: Tue Dec 23, 2008 1:58 am
by iGame3D
A little sidetracking is well worth it.
I've tried for years to make this 3D dungeon doodler, finally it works the way I intended.
Happiness and joy.

Image[/img]

Posted: Tue Dec 23, 2008 8:19 am
by ian_scho
Wow that's great, I like that. Well done dude!

Posted: Tue Dec 23, 2008 1:25 pm
by iGame3D
Best three day coding marathon ever!

Image

Posted: Tue Dec 23, 2008 1:29 pm
by Gambit37
Wooty, looking very nice indeed!

Is this the beginnings of a full visual editor? It could be the thing to convince me to start using DSB... :)

Posted: Tue Dec 23, 2008 1:57 pm
by linflas
+1 !

Posted: Tue Dec 23, 2008 8:26 pm
by Sophia
The editor is going to end up looking better than the game it's editing. :shock:

Posted: Wed Dec 24, 2008 1:17 am
by Trantor
Does this mean I will have to switch from RTC to DSB? It looks very impressive to say the least!

Posted: Thu Dec 25, 2008 1:16 pm
by iGame3D
Sophia wrote:The editor is going to end up looking better than the game it's editing. :shock:
Well thats my 3D game engine, the editor was just a "lets see what I can do with your lua" thing expanding to "I wonder if I can make a 3D dungeon from this". So far so good.
Trantor wrote:Does this mean I will have to switch from RTC to DSB? It looks very impressive to say the least!
I'm not sure what RTC offers in way of editing.
Its going to be some time before I can get a Dungeon Master editor that isn't a bugs nest.
Moving the editor to 3D opened a whole can of worms.

How many lua programmers around here?

I would love to not have to toil on it all alone.
Best would be to make a very generic grid/tunnel mapping tool.
The output style should be customizable for other games.
Like a text adventure: "you are in a long hallway, there are exits east and west", hmm, 5AM Christmas morning, there's time to try that.

On a related note I was thinking of Zombie Master.
A Dungeon Master spin off where you start the game, choose your zombies from the picture frames, and then go on a munch hunt through the dungeons of the living.
Not sure what to do with the items and skills...Journeyman Zombie Ninja, lookout!

Our latest game is kind of like that, but not as funny.
Image

Posted: Fri Dec 26, 2008 12:52 pm
by Joramun
A 3d editor is superfluous, IMHO, so don't bother with that, if it's a bugs nest !!

An editor is necessary, but it has to overcome several difficulties, notably that of being at the same time user-friendly and lua-friendly...

The idea I had in mind to achieve this was making a set of "preset mechanics" that emulates simple dungeon mechanisms with lua script, but require only a few parameters to be set in the editor, preferably using a few clicks.

Re: Dungeon.lua hacking

Posted: Tue Feb 17, 2009 1:57 pm
by Joramun
So, what's up with that iGame3D (just notice the 3D, so do the 3D if you feel like it) ?

Re: Dungeon.lua hacking

Posted: Wed Feb 18, 2009 9:11 am
by iGame3D
iGame3D is an OpenGL game engine, with Lua scripting plus FLTK UI interface building via integrated murgaLua.
Our website doesn't get updated much, guess I'll update it soon.
I loathe updating web pages.
Lots of old stuff there, most of our previous games were in our own scripting language before the Lua switch.

Working on a game right now for the uDevGames Mac game dev contest, deadline is March 2nd.
You can read the Dev Diary here, it starts at most recent post.
I think I'm funny, so go ahead, read and laugh as much as I do.

I haven't updated that in a while either, enjoyed some slack for a week, then hardcore bug squashing and level detailing for another.
Just made a wicked cool arcade level tonight, fun stuff.

I should be able to post a build for mac and windows by the end of the week, will need lots of testing.
I'll drop the propaganda in some other thread and leave a link here.

The game is a zombie adventure, you control zombies and send them to eat people.
Mmmm!

If you meant the DSB editor, I'll have to get back to it after the contest.
I don't even remember what I did to make the stuff that is in this thread.
Lack of sleep is hell on memory.

Re: Dungeon.lua hacking

Posted: Wed Mar 04, 2009 2:47 am
by iGame3D
Better late then never!
See this D-M forum post for what the hacks above turned into.

Have fun!
Thanks again Sophia for kick starting my brain with DSB!