Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
 
Welcome
to the Actionsoft Forums!


New to the forums? Go ahead and register! Why register? Click here to find out the difference of being a guest and a member. After you're done, go here to learn how to start posting. Make sure you've read and agree with the rules of posting here!

The forums is run by three administrators. Read here who they are and what you may (and may not) expect from them.

Actionsoft's latest game, Midnight Mansion 2: The Haunted Hills,  includes 28 mansions. The 8 Built-in mansions have 3 difficulties along with 4 extra custom mansions. We don't have that many other custom MM2 mansions yet. Design your own custom mansion! Info below.  You can find out more about the game here.

The original Midnight Mansion game contains over 150 mansions. The 8 included mansions which have 3 difficulty levels each, and about 115 approved custom mansions which you can download here and also several freely uploaded mansions. To know the difference between these three types of mansions, click here.

Are you a creative person and thinking of designing a mansion yourself? Or want to know about how to upload it? Click here and we'll show you! You'll find guidelines for betatesters here.

News:
Midnight Mansion 2: The Haunted Hills version 1.0.2b has been released. This fixes a bug in Jasperlone Mountains Hard. Simply re-download the game, bring over your custom mansions folder from the old version and play on. All your saves and high scores will not be changed.

Midnight Mansion HD (MM1) is now available at the Mac App Store and at the Actionsoft website. A Windows version is now available.

Here is a list of downloadable MM1 HD ready custom mansions, which also work in the Windows version of the game.

The MM2 custom mansion Hanging Gardens of Babylon by Freddy/SandyBean/Josephine was updated on 16 Feb 2014 to add a third section.


  HomeHelpSearchLoginRegister  
 
Pages: 1 2 
Send Topic Print
Modeling Jack's World (Read 15216 times)
ryos
Explorer
Offline


Colorado, USA

Posts: 243
Utah, USA
Gender: male
Modeling Jack's World
15.04.2007 at 02:54:40
 
As I strive to put interesting features into my current mansion project, I've found that trial and error is currently my only method of design, and I think that stinks. I can't help feeling that I could be much more effective if I were able to describe interactions in Midnight Mansion mathematically so that I could model how a certain mechanism is to work before I go building it. It also occurs to me that some of what I want to know may already be common knowledge among the community.

So, before I went haring off trying to figure all this out on my own, I figured I'd post a list of all the things I want to know and see what others can fill in. After that, I'll figure out the rest and post them in a follow-up, so we can all have a handy reference to build off of.

Units
If you're gonna describe something, ya gotta have units! Fortunately, we only need three in this case. I've chosen to use
seconds (s)
for time,
tiles (t)
for distance, and
tiles/second (tps)
for speed.

Please use these units when posting quantities (or if there's a better unit, use it but explain it).

Modeling Jack's Motion
  • How fast does Jack run (tps)?
  • How fast does he fall?
  • How fast does he slide down poles?
  • How high does he jump?
  • How high does he jump from vines?
  • How fast does he travel horizontally while falling?
  • How far can he jump (can be obtained from the previous three)?
  • How fast does he climb ladders and vines?
  • How far can he fall without dying?
  • Bonus question: What effect do moving things (conveyor belts, moving platforms) have on Jack's horizontal motion, and is there a mathematical relationship between this effect and the speed of the platform?


Modeling other motions and times

General:
  • What is the conversion factor between the speed number you type into the dialog box and tps? Is this factor the same for all sprites that can have a speed?
  • How do duration numbers translate into seconds? (some dialogs say it's s/60, but others don't. Is this consistent?)
  • How long does it take a door to open?
  • How long does it take Jack to flip a switch?


Spiders:
  • How fast does a big spider descend/ascend? (tps)
  • Small spiders--actually, I can't make head nor tail of these numbers. If someone could explain what they mean I would be most appreciative.


Birds:
  • How does the amplitude number translate into vertical range (as in, given an amplitude number, how many tiles will the bird deviate up or down from its placed position)?
  • What does "angle delta" mean?


Fish: What relationships correlate initial speed, gravity, jump height, and speed of ascent/descent at a given vertical position?

Final remarks
I think that's all the information anyone could need to model any aspect of the game. If we can figure out all these numbers, it should be possible to just plug things into a spreadsheet and churn out answers to all sorts of design problems.

Here's a simple example if you're having trouble visualizing why I'd want to know all this: Suppose Jack is sliding down a pole. You have horizontal zapper beams across the path of the pole, and you want Jack to ride down in a cocoon of safety, with beams turning off just as he reaches them, and turning back on just as he passes through. I've seen this done before, and wanted to do it, but got stymied by the prospect of building it by trial and error. If I knew Jack's rate of fall on a pole (and what the zapper durations mean), I could just set up a few formulas in Excel and fill down to churn out the values for all of the zapper beams.

Think of it. Just think of it!  Shocked Shocked Grin Tongue

Also, this information really should be in the manual. Eh Vern, wink wink nudge nudge?  Wink Wink Huh Huh
Back to top
 

"Fun game: try to post a YouTube comment so stupid that people realize you must be joking.  (Hint: this is impossible)" -Randall Munroe
 
IP Logged
 
joeb
Adventurer
*
Offline



Posts: 360
Re: Modeling Jack's World
Reply #1 - 15.04.2007 at 07:27:22
 
ryos,


I've also puzzled over those factors myself.  Undecided Undecided Undecided

I've done the same as you with trial and error methods because I was too lazy too sit and calculate especially because it's different from Mac to Mac. I'm sure there's formulas behind the movement. just not sure whether Vern would publish those.
FWIW I did do a bunch with measurements in the custom graphics tutorial so that may help but that's a GREAT idea about modeling a mansion first. In a post somewhere I did mention that I was using Excel to track my layouts, critter dispersal, path validation and such and it would be very cool to add movement formulas to it.
Hmmmmmmm, we need to talk about this some more (unless Vern considers it taboo or reverse engineering). But I definitely LIKE the idea!

Joe B
Back to top
 
 
IP Logged
 
ryos
Explorer
Offline


Colorado, USA

Posts: 243
Utah, USA
Gender: male
Re: Modeling Jack's World
Reply #2 - 15.04.2007 at 08:53:18
 
joeb wrote on 15.04.2007 at 07:27:22:
...too lazy to sit and calculate...


Heh. I'm an engineering student. Sit and calculate is what I do.  Cheesy

Quote:
...especially because it's different from Mac to Mac.


Sure, the absolute timing of things will differ from mac to mac, but the timing of events in relation to each other should remain constant. Were it not so, Jack would have a different jumping range on different computers, and crazy zapper beam contraptions wouldn't work, and Freddy's evil pixel-perfect Bedlam tricks would break, etc.

Quote:
I'm sure there's formulas behind the movement. just not sure whether Vern would publish those.


I really hope he does. Like I said, this is information that I feel should have been included in the documentation. A number (for example, the speed numbers) is meaningless without a dimensional unit that relates it to something.

Quote:
FWIW I did do a bunch with measurements in the custom graphics tutorial so that may help...


ryos goes to read the tutorial...
Hey, that's nice! I now know that what I had previously referred to as a "tile" is really half of a tile, at least in the graphical sense. I chose the tile because it seems to be the only unit that's sane to try and measure in the editor, due to the grid. It also seems the most convenient, because everything is tiles in MM. So: 16x16 pixel tiles, 40x27 tile screen.

Actually, I do have a program (Art Director's Toolkit) with an onscreen ruler. That will be of much use I think.

Quote:
...but that's a GREAT idea about modeling a mansion first. In a post somewhere I did mention that I was using Excel to track my layouts, critter dispersal, path validation and such and it would be very cool to add movement formulas to it.
Hmmmmmmm, we need to talk about this some more (unless Vern considers it taboo or reverse engineering). But I definitely LIKE the idea!


Yay! Someone else crazy like me! Wink

I'll get to measuring tonight when I get done with work. My tools of choice will be the aforementioned ADT and a stopwatch. I'd be happy to post any spreadsheets I come up with as well. It should be easy to come up with a few calculator sheets (fish movement, small spider movement, etc) that convert desired movement characteristics to dialog box numbers.
Back to top
 

"Fun game: try to post a YouTube comment so stupid that people realize you must be joking.  (Hint: this is impossible)" -Randall Munroe
 
IP Logged
 
Psychotronic
Explorer
Offline



Posts: 174
Alaska
Gender: male
Re: Modeling Jack's World
Reply #3 - 15.04.2007 at 10:04:35
 
I don't have time to really get into this right now, but I'd recommend using game seconds instead of real world seconds to make measurements. And the most reliable way to do that is the zapper beams. The time increments the zapper beams use is supposed to be 1/60th of a second. So a beam with 1 on and 59 off should flash once per second, and you can make measurements off of that.
Back to top
 
 
IP Logged
 
joeb
Adventurer
*
Offline



Posts: 360
Re: Modeling Jack's World
Reply #4 - 15.04.2007 at 12:23:25
 
Quote:
is supposed to be


Yes and no. REALLY don't want to get into it but a slower machine takes more time to do EVERYTHING not just the system task which is supposed to occur once a second but actually doesn't based on interrupt status. This is from my Test Engineering days at GE, RCA, Intel and Motorola and based on what's actually hooked to the processor and the speed of those peripherals you can see some interesting "seconds".
But the model you present is an accurate one for figuring out what ryos is talking about.

What kind of engineering? Based on the sit and calculate (or plug and chug as we called it in the olden days) I'd say you were one of those unfortunate soul EE students looking to calculate anything but parasitic capacitance. YUK!!!!

Let me know what you come up with and I'll see if I can Excel it. Doing a lot with Excel now as we're using a new product called Crystal Xcelsius for creating dashboards for financial analysis and it'd be fun to do something other than figure out how the bank can make yet more money.

And yes, my wife says I often dabble in the realms of crazy and she just wishes I weren't so good at it.

Tin foil hat is now off.....

Later dude,

Joe B
Back to top
 
 
IP Logged
 
ryos
Explorer
Offline


Colorado, USA

Posts: 243
Utah, USA
Gender: male
Re: Modeling Jack's World
Reply #5 - 15.04.2007 at 14:36:11
 
The zapper clock is an interesting concept, but unfortunately it proved too hard to watch both it and what I was trying to time, plus its inherent inaccuracy means that the error introduced is probably more significant than any differences based on differing machine time.

I still think it doesn't matter. The timing of all events in-game should scale in exact proportion to the current machine time. Data collected on a slow machine should yield the same models as data collected on a fast machine. We just have to be careful not to mix data sets and we should be fine.

Naturally, as with all empirical functions, there is an error involved that we need to be aware of. These methods are only so precise, and yield functions that are only valid under conditions near those used to determine them. Fortunately, this application does not demand a great deal of precision. One thing I've learned is that good enough is sometimes good enough. Smiley

Anyway, I found a free stopwatch program called "Chimoo Timer" that works quite well. I didn't have time to get many measurements and I'm now going to bed, but I'm optimistic that this will prove fruitful.

Oh, and I'm a ChemE, hoping to work on alternative energy technologies/solutions. My dream is to help improve batteries to the point that an electric car has only upsides. They're already pretty close; see the Tesla Roadster for the best example. I also wouldn't mind working on renewable processes for producing electricity (like this one for example).

But right now, what I feel like is a monkey with a calculator. Grin
Back to top
 

"Fun game: try to post a YouTube comment so stupid that people realize you must be joking.  (Hint: this is impossible)" -Randall Munroe
 
IP Logged
 
ryos
Explorer
Offline


Colorado, USA

Posts: 243
Utah, USA
Gender: male
Re: Modeling Jack's World
Reply #6 - 16.04.2007 at 13:49:20
 
Progress report time! (What follows is a description of what I've done so far to try and discover the function that maps the speed number to the physical unit of tiles per second, for those who are interested in that sort of thing.)

I timed all the speeds with Chimoo Timer, plotted the data, and fit a line to the plot. The resulting equation...didn't work in practice. I tried to construct a zapper beam room where Jack rides a platform of speed 20 across the beams in a pocket of safety, and the timings produced by the function were off by a fair amount. However, they were close enough that it wasn't too hard to tune the thing by hand.

After I had tuned it by hand, I entered those numbers into the sheet to determine the actual speed of the platform. I tuned another speed by hand to get another point and ran a line through it. The resulting function...didn't work.

Then, I came up with an even more accurate (but time-consuming) way to measure time in MM. Set up two zapper beams separated by the distance you're measuring over (one full screen for high speeds, less for slower speeds (for the sake of my sanity)). Have a platform with the speed to be determined bounce between them. Get the numbers right, and the beams will flash every time the platform hits them. The previously determined linear functions give a decent ballpark to start from.

Once the true numbers are determined by this method, not only will we have a table that we can use to just look up the proper speed, but we should get a more accurate function out of it as well. It's possible the relation isn't quite linear...we'll see.
Back to top
 

"Fun game: try to post a YouTube comment so stupid that people realize you must be joking.  (Hint: this is impossible)" -Randall Munroe
 
IP Logged
 
ryos
Explorer
Offline


Colorado, USA

Posts: 243
Utah, USA
Gender: male
Re: Modeling Jack's World
Reply #7 - 16.04.2007 at 15:43:34
 
...time passes...

Ok, I've got all the measurements done and the function fit. The data aren't entirely linear, but pretty close. It makes me wonder if I might be off in my measurements by 1/60th of a second on some of them. Oh well.

The function that provides the best fit is a third-order polynomial. THIS IS VALID FOR SPEEDS 1-20 ONLY! Fortunately, there aren't any other possible speeds. Grin

The function is accurate to +/- 0.5 tps (or 8 px per second). That should be good enough for most applications. Those that require more precision can use the lookup table.

Here it is:
y = ax^3 + bx^2 + cx + d
a = 0.000397348
b = -0.006289512
c = 1.808243877
d = 0.041327132

With y being the speed of the object in tps, and x being the speed of the object in MM speed numbers.

I haven't tested this yet, but given the method employed I feel confident that it worked. Smiley
Back to top
 

"Fun game: try to post a YouTube comment so stupid that people realize you must be joking.  (Hint: this is impossible)" -Randall Munroe
 
IP Logged
 
aquaMat
Expedition Leader
***
Offline



Posts: 1159
Berlin, Germany
Gender: male
Re: Modeling Jack's World
Reply #8 - 16.04.2007 at 21:32:22
 
Jesus, you guys really must have some spare time to fill !   Grin Cheesy Wink
Back to top
 

Why is a carrot more orange than an orange ?
WWW  
IP Logged
 
ryos
Explorer
Offline


Colorado, USA

Posts: 243
Utah, USA
Gender: male
Re: Modeling Jack's World
Reply #9 - 16.04.2007 at 23:07:54
 
aquaMat wrote on 16.04.2007 at 21:32:22:
Jesus, you guys really must have some spare time to fill !   Grin Cheesy Wink


What can I say? I'm out of mansions to play! Cheesy

The semester is winding down for me. I'm in the lull where there isn't much homework, but it's still too early to start studying for finals. Hence, this monkey starts looking for more things to calculate!

And, really, all that sounds time consuming, but it wasn't that bad.

BTW, do people want me to keep chronicling my quest to model Midnight Mansion? Or would you rather just consume the fruits when it's done? I did it assuming it would be interesting to someone, but if no one cares I'll save myself the trouble. Smiley
Back to top
 

"Fun game: try to post a YouTube comment so stupid that people realize you must be joking.  (Hint: this is impossible)" -Randall Munroe
 
IP Logged
 
Pages: 1 2 
Send Topic Print