Dungeon.lua hacking

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
iGame3D
Novice
Posts: 28
Joined: Thu Dec 18, 2008 7:02 pm
Location: Hotel Colorado
Contact:

Dungeon.lua hacking

Post 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.
Last edited by iGame3D on Mon Dec 22, 2008 10:29 am, edited 1 time in total.
iGame3D
Novice
Posts: 28
Joined: Thu Dec 18, 2008 7:02 pm
Location: Hotel Colorado
Contact:

Post by iGame3D »

Can't delete a post I'll so at this point writing dsb_text2Map back out was possible.
Last edited by iGame3D on Mon Dec 22, 2008 10:25 am, edited 1 time in total.
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post 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)
iGame3D
Novice
Posts: 28
Joined: Thu Dec 18, 2008 7:02 pm
Location: Hotel Colorado
Contact:

Post 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
Last edited by iGame3D on Mon Dec 22, 2008 10:22 am, edited 1 time in total.
iGame3D
Novice
Posts: 28
Joined: Thu Dec 18, 2008 7:02 pm
Location: Hotel Colorado
Contact:

Post by iGame3D »

Making progress, the scripting is getting too deep to post.

Image
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post 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? :)
iGame3D
Novice
Posts: 28
Joined: Thu Dec 18, 2008 7:02 pm
Location: Hotel Colorado
Contact:

Post 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.
iGame3D
Novice
Posts: 28
Joined: Thu Dec 18, 2008 7:02 pm
Location: Hotel Colorado
Contact:

Post 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]
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Post by ian_scho »

Wow that's great, I like that. Well done dude!
iGame3D
Novice
Posts: 28
Joined: Thu Dec 18, 2008 7:02 pm
Location: Hotel Colorado
Contact:

Post by iGame3D »

Best three day coding marathon ever!

Image
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post 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... :)
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Post by linflas »

+1 !
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

The editor is going to end up looking better than the game it's editing. :shock:
User avatar
Trantor
Duke of Banville
Posts: 2466
Joined: Wed Mar 09, 2005 4:16 am
Location: Berlin, Germany
Contact:

Post by Trantor »

Does this mean I will have to switch from RTC to DSB? It looks very impressive to say the least!
iGame3D
Novice
Posts: 28
Joined: Thu Dec 18, 2008 7:02 pm
Location: Hotel Colorado
Contact:

Post 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
User avatar
Joramun
Mon Master
Posts: 925
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Post 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.
What Is Your Quest ?
User avatar
Joramun
Mon Master
Posts: 925
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Re: Dungeon.lua hacking

Post by Joramun »

So, what's up with that iGame3D (just notice the 3D, so do the 3D if you feel like it) ?
What Is Your Quest ?
iGame3D
Novice
Posts: 28
Joined: Thu Dec 18, 2008 7:02 pm
Location: Hotel Colorado
Contact:

Re: Dungeon.lua hacking

Post 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.
iGame3D
Novice
Posts: 28
Joined: Thu Dec 18, 2008 7:02 pm
Location: Hotel Colorado
Contact:

Re: Dungeon.lua hacking

Post 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!
Post Reply