Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Looking for a 2D mapping software for a DBPro project

Author
Message
WickedVixen
19
Years of Service
User Offline
Joined: 28th Mar 2007
Location: New Brisbane, Utopia Prime, VGC GHQ
Posted: 20th Feb 2013 20:42
I found one in the Dark Basic Professional Quick Start Tutorial that outputs to either .BMP or .TXT format based on a few parameters: size, NPCs and Detail.

The items are color coded and include:
+ Walls
+ Doors
+ Secret Doors
+ NPCs
+ Up/Down Staircases
+ Floors
+ "Realwall"

I'd like to know if there's a resource that has free software that can do something like this, can generate large maps, edge-detects for rooms and passages, and can output into .TXT files.

(The one included with the Tutorial 6 is Color Arts Dungeon Creator.)

Please help.

All trees have bark. All dogs bark. All dogs are trees.
Arbrakan
15
Years of Service
User Offline
Joined: 10th Oct 2010
Location: Geneva
Posted: 20th Feb 2013 23:09 Edited at: 20th Feb 2013 23:20
DBPro is a programming language, if you are motivated to code a whole game. I think you can code a 2D map editor from scratch for your game. It is a good way to learn. And you can also use it for futur projects.

And we are here to help you.

Edit :
Joined: Wed Mar 28th 2007

I think you have the level in DBPro to code one from scratch.
I don't know if there is a good free 2D map editor. for DBPro.

Arbrakan
Nytus Sermus
13
Years of Service
User Offline
Joined: 17th Jan 2013
Location:
Posted: 21st Feb 2013 00:11
The main reason you wont find a complete solution is because most editors are developed to be application specific, and do exact certain things, even if you find one, im sure you'll have to modify it in one way or another to make it exactly what you need. Therefore most ppl would recommend you write you own. You can work off the example project to figure out how to write it, if you need help with one certain part or abother, post the code and ask specific coding questions and you'll likely get the help you need; most ppl just are going to help those who wont help themselves.
Best of luck- i'll help where i have time.

You could be done already.....stop trying to re-invent the wheel.
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 21st Feb 2013 14:18 Edited at: 21st Feb 2013 14:19
Quote: "Looking for a 2D mapping software for a DBPro project"


I doubt you will find one which makes the job easy.

mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 21st Feb 2013 14:29
I don't think so. Maybe you should try to ask for source code of a similar game...

*** Merry Chuckmas! ***
WickedVixen
19
Years of Service
User Offline
Joined: 28th Mar 2007
Location: New Brisbane, Utopia Prime, VGC GHQ
Posted: 21st Feb 2013 17:28
I think I can handle this semi-daunting task. It's something I had been toying with a while back and it never really worked out the way I had intended. (I was working on creating a DBPro source from a Random Dungeon Creator/Explorer program from THINK Pascal some time ago and lost all of my work... >_<

I think I can code something that will work, or at least generally speaking, some kind of random boxes and pathways generator. I don't think it would be too difficult to piece together and build...

I am seriously considering doing exactly that... Thinking about it while typing this reply; I think it can be done as a quick and dirty bit of code, then parsed to build my map. Shouldn't be too hard I think.

Thanks for the inspiration and future help. I will post my code here in bits for assistance as I feel I need it. Thanks.

~Cheers

All trees have bark. All dogs bark. All dogs are trees.
WickedVixen
19
Years of Service
User Offline
Joined: 28th Mar 2007
Location: New Brisbane, Utopia Prime, VGC GHQ
Posted: 22nd Feb 2013 03:06
This is what I have so far... Just room definitions and placement in the map(x,y) array. It's 200x200 and I'm having issues...

Here's my code.


Also, the rooms() array is supposed to be copied into the map() array once the rooms have been created and the pathways have been constructed. The algorithms for the pathways have not been created yet, either.

I am having a huge problem with the rooms not being placed properly in the map() array at this point. As the other 2 algorithms have not been created. Is there something I am missing from this one algorithm that is supposed to generate my rooms?

Here's the general layout:
+ create first box with wall characters
+ create second box, inside first, with floor characters
+ continue until all rooms are built

This is going to give me a set of rooms that overlap. If any go beyond the borders of the map (and essentially, beyond the limits of the map() array) then they're set to 1 or 200, respectively.

At least that's what it's supposed to do in theory... I could fill the map with Wall, place Floors for the rooms (if they overlap, they overlap), and redo the border should the Floors overwrite the border walls.

This method seems simpler, but I still have to generate the pathways connecting the rooms: if there's 20 rooms, 10 vertical pathways and 10 horizontal pathways. Just not sure how to code that, though...

Any suggestions are welcome. Thanks.

All trees have bark. All dogs bark. All dogs are trees.
WickedVixen
19
Years of Service
User Offline
Joined: 28th Mar 2007
Location: New Brisbane, Utopia Prime, VGC GHQ
Posted: 22nd Feb 2013 05:46 Edited at: 22nd Feb 2013 05:46
I changed it around and now I think I have something a little better...

I altered it to do the same thing, only display it differently. Again, no corridors or pathways, but I do have a random number of rooms being created, directly into the map() array.

Here's what I have...


This is just the beginning...! I can't wait to make this become 3D and work it into my 'Eris Light'!

There's a couple of things I was thinking of implementing, that I will post right now:
> a 'character record sheet' window
> an 'inventory' window with equipment slots with a better/worse checking system
> the possibility of using in-game 'adverts' for real products (a way of getting funding for the game... depends, but I think it's a good idea.) (WAY down the list)
> a 'Creature Companion' or '... Compilation' of the foes the player has encountered. (also WAY down the list...)
> website stats and possible multi-player, should this get really going... lol


Anyway, these are just ideas. Anything that I might have missed about this kind of simplistic dungeon crawler? Foes, weapons and food are some things I'm adding...
Just not sure what else.

Also, I think I've gotten off my own topic... LOL Please let me know and I'll drop this into another forum-area for WIP or something.

Thanks.

All trees have bark. All dogs bark. All dogs are trees.
WickedVixen
19
Years of Service
User Offline
Joined: 28th Mar 2007
Location: New Brisbane, Utopia Prime, VGC GHQ
Posted: 25th Feb 2013 04:51
I have discovered a new problem...

I get proper results with my maps when I use the algorithm I built (from a friend's THINK Pascal code) as a subroutine using GOSUB/RETURN, but not when I placed the same algorithm into a FUNCTION and called it from the main program...

I know there's a region system set up with variables called "scope", and that there are 'local' variables in the FUNCTION call that are either erased or destroyed upon leaving the function, there are 'global' variables that are used all over the application/program that work everywhere in the program (or at least, that's what they're supposed to do). Any #CONSTANT variables cannot be changed and are typically assumed to be 'global' as long as they are initialized at the start of the program.

Here's two programs, technically identical.
Program 1 is the FUNCTION called system.
Program 2 is the subroutine.

These are supposed to make a tiny 200x200 map, with pixels (DOT X,Y) and color them according to what's in their map(x,y) array coordinates. (The SET DISPLAY MODEs are set smallish to show what I'm doing in nearly a pixel-perfect state, in a window of that size.)

PROGRAM 1 - Function Call


PROGRAM 2 - Subroutine


Can you tell me why these two programs do not work when they are technically identical program? Any input or additional ideas are welcome.

This is bothering me as I wanted to use these algorithms as FUNCTIONs instead of subroutines (GOSUB/RETURN). Please help.

All trees have bark. All dogs bark. All dogs are trees.
Ortu
DBPro Master
18
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 25th Feb 2013 05:11
to make a variable global, you have to declare it as such.

mapsize in your function is = 0 as it is not global, was not assigned or declared within the function and was not passed as a parameter.

global mapsize = 200

should fix your problem

alternatively, you could pass it in as a parameter as you are doing with sides and addOne in your Roller function

WickedVixen
19
Years of Service
User Offline
Joined: 28th Mar 2007
Location: New Brisbane, Utopia Prime, VGC GHQ
Posted: 25th Feb 2013 06:46
Okay, I was wondering what my problem was.

Now that makes sense.

Thank you, Ortu!

All trees have bark. All dogs bark. All dogs are trees.

Login to post a reply

Server time is: 2026-07-07 03:23:54
Your offset time is: 2026-07-07 03:23:54