Page 1 of 1

Textboxes in a level

PostPosted: Mon Jul 03, 2006 4:46 am
by Citizen-D
Is it possible to add text boxes to a custom made level (similar to those that appear in the tutorial levels)?

Cheers,

D

PostPosted: Mon Jul 03, 2006 11:44 am
by tmcsweeney
I don't think the editor allows you to do it, but I've done some inital work reverse enginering the level format, and one of the things I've managed to do is insert text that is displayed in game.

PostPosted: Mon Jul 03, 2006 10:27 pm
by dudiobugtron
tmcsweeney wrote:I don't think the editor allows you to do it, but I've done some inital work reverse enginering the level format, and one of the things I've managed to do is insert text that is displayed in game.

HAX :D

PostPosted: Tue Jul 04, 2006 12:16 pm
by tmcsweeney
Yeah potentially :( I started the work with the goal of using it for more interesting level editing (using something like Visio to build the level with no constraints, and a python script to convert that into a .lvl).

But the potential for evil is significant, would be pretty easy for someone to cheat in a contest by creating bars that are ever so slightly longer than the game normally allows, i.e. Enough to be cheaper, but not enough that it is visibly different to a casual observor.

PostPosted: Tue Jul 04, 2006 12:22 pm
by tmcsweeney
Actually, thinking about it some more, it would be possible to write a validator, one that decompiles the levels submitted to a contest and checks that they meet certain constraints:

    That the original level and budget haven't been tampered with.
    That all the pieces added are within the length limits imposed by the game.
    That there are no instances of "The force"
    etc...

PostPosted: Tue Jul 04, 2006 3:21 pm
by FFT
First two wouldn't be difficult, force would be difficult to detect. That is, "force" and not simply pieces that happen to be close together.

PostPosted: Tue Jul 04, 2006 4:26 pm
by tmcsweeney
"The Force" (as I understand it) occurs when the end of one piece intersects the body of another.

It shouldn't be to hard to detect. you just calculate the distance from each point to the closest point on every single line that it could intersect with (i.e. those that don't use that point)). Any distance less than a given threshold is deemed to be intersecting.

The trickiest bit would be setting the threshold, but I think that can be done empirically. set up a whole slew of levels that are border line cases. Come to some agreement about which are "The Force" and which are ok, and then use a modified version of the decompiler to find out what the minimum acceptable threshold is.

If someone was running a competition like this they'd need to allow everyone to run the validator on their own levels.

PostPosted: Tue Jul 04, 2006 7:05 pm
by FFT
tmcsweeney wrote:"The Force" (as I understand it) occurs when the end of one piece intersects the body of another.
Correct, however it's only "force" when this is used to make perpetual motion machines and so on. If intersecting points were not allowed, PeterT's solution for the most recent contest would be invalid.

PostPosted: Tue Jul 04, 2006 9:23 pm
by tmcsweeney
Possibly, I haven't look at the level. but if bars/ropes/elastic, or plates/rubber/cloth intersect then a force is generated. That force will almost certainly change the outcome of the level. I don't see how you can successfully discriminate between Evil Force and inocuous Force. Doing it manually would be a nightmare of judgement calls. At least an automated solution would be consistent, if somewhat brutal.

PostPosted: Tue Jul 04, 2006 10:38 pm
by dudiobugtron
tmcsweeney wrote:I don't see how you can successfully discriminate between Evil Force and inocuous Force

This was FFT's point. But yeah Peter could have easily (?) done his solution without intersecting those bars on the end pulley, so there's no problem with disallowing it to make verification easier.
Of course, what should really happen is that the editor shouldn't let you make a level where things go through each other in impossible ways anyway.

Also I'm pretty sure a force isn't generated when ropes intersect like that.

PostPosted: Wed Jul 05, 2006 12:25 pm
by tmcsweeney
|Going back to the original topic for a moment.....

I made a mistake, sort of... It is would seem that it is not possible to add text to a normal level. There is a flag in the header that you need to clear for the level to work with the added text, but this flag also disables the save button (which I hadn't noticed before).

So yes, you can add text, but the level will behave like a tutorial and you won't be able to save your creations.

PostPosted: Mon Jul 24, 2006 12:56 am
by BioDroid
write with anchors 8)

PostPosted: Thu Jan 25, 2007 5:47 pm
by Cluster Carter
hmmm... this may work...

OR

You can just use ARedit to type text into a level.

PostPosted: Thu Jan 25, 2007 9:22 pm
by dudiobugtron
Cluster Carter wrote:hmmm... this may work...

OR

You can just use ARedit to type text into a level.


Progress eh? Where would we be without it?