2020-06-25 01:50:15

So I am doing this thing where you are climbing a 100 floor tower with obstacles, hazards, and puzzles. What is the quickest way to build maps and make hazards? I don't want to declare spawn_hazard 1000 times, and I don't want to include .map files with the game because I don't want people editing the maps. How should I implement a builder for developers? Help would be appreciated.

2020-06-25 02:59:00

arrays are fucking stupid in BGT, dictionaries are slow and prone to crashing.

Facts with Tom MacDonald, Adam Calhoun, and Dax
End racism
End division
Become united

2020-06-25 03:18:27

I mean...Pack your map files in an encrypted datafile?

2020-06-25 04:15:00

Yeah but then how would you make the game decrypt each and every map file. Not to mention knowing which exact key applies to each exact file.

-----
YouTube
GitHub
Discord: @tunmi13#1880

2020-06-25 12:07:17

How big are we talking for each floor?
Thinking about all of the games I've made, it'd be quicker to list those that do not use string arrays as the source.
Swamp Platformer was made specifically to test going object-based with an editor.
Sengoku Jidai could be easily text-based, but I randomized everything and used a less intuitive save format, so added an editor anyway (idr something like shift+ctrl+f6 at the pause menu?).
DBGU and EC both use a variation on a weird datastructure that probably exists elsewhere, but I've not heard of, where there's a list of position-value pairs, and everything to the right of the x position is associated with the value. I've used it for terrain, elevation, and some objects / obstacles / etc in unreleased projects. It basically has to be coded by hand, though, so hardly anything more interesting than how EC does it ever got anywhere.
I made some kinda Mario thing as a test back in like 2006 or so. Not sure if that's still floating around somewhere. The accessibility is terrible, but it was more or less like the Swamp Platformer, except I did everything in code, so got lazy and made it way too easy to just jump-spam to victory.
And DLE is naturally completely different.
Otherwise, I just made a text map, and coded something that could interpret it. Mario, the JFIMA, those piles and piles of maps for LC that I'll never get to use? All done on a PACMate, most of them while either in class or in a vehicle (or summer 2009. I'm still annoyed that the GU sidescroller is the only releasable thing to come of the mountains of stuff I threw at the wall that year. sad ).
Jeqo Legends uses text for arenas. Jeqo Prime? Text. Redsword? Text.
For anything up to 50 tiles wide, I just do text. All the better if a Braille display is involved, so I can view whole rows, and scroll through without getting lost.
And for something wider than 50, I just make more than one and link them with programming magic.
Yes, this applies even when things on the map are not necessarily fixed. ... Crap, why didn't I do that with Mario? It's easy to loop through the map, spot chars that correspond to enemies or items, and just spawn the thing there, replacing the tile if necessary. I did that in the JFIMA. Later levels in Mario would be much prettier if I'd ddone it there, too.

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2020-06-25 14:17:30

@tunmi because they would all be in one file with the same key.

2020-06-27 04:41:46

Because that's not how packfiles work.
To answer your question OP: There is a function, I think it is like script_compiled or something of that nature, check the help files.
For map creation, asuming they would be dynamic? Just use loops to quickly lay down tiles and hazards and whatnot.
If you can come back to us with a more specific set of questions I'd happy to go into more detail, but as of right now I'm not quite sure what you need.

----------
“Yes, sir. I am attempting to fill a silent moment with non-relevant conversation.”
“You don’t tell me how to behave; you’re not my mother!”
“Could you please continue the petty bickering? I find it most intriguing.” – Data (Star Trek: The Next Generation)

2020-06-27 06:16:13

@2, so? I really don’t understand, did someone ask you about that?

2020-06-27 07:59:40

I believe 2 is pointing out options.
@2: Unfortunately sense BGT does not haev any other forms of iterable beyond simple arrays and dictionaries, map systems are severely lax. If Bgt had tuples, sets or things of that nature it would be so much more responsive.

----------
“Yes, sir. I am attempting to fill a silent moment with non-relevant conversation.”
“You don’t tell me how to behave; you’re not my mother!”
“Could you please continue the petty bickering? I find it most intriguing.” – Data (Star Trek: The Next Generation)