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/brell was updated on 19. Nov 2023 to add a fourth section. Available here


  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Under the Hood (Read 6950 times)
VernJensen
YaBB Administrator
*****
Offline



Posts: 1064
Los Angeles, CA
Gender: male
Under the Hood
17.02.2007 at 04:30:56
 
Okay, so this *is* related to Midnight Mansion, but I didn't know where else to put it.

Someone mentioned a while ago in some other forum post (I forget where) that I was probably right when I said that things are more complicated "under the hood" than they appear when you play the game. Today I was working on the new troll monster, that can both walk left/right AND climb ladders. And ladder climbing is pretty tricky.

So for those of you who are a little curious what the source code looks like, and to gain a deeper appreciation for the complexity of the game "under the hood", here is some of the code (not even all of it!) that handles Jack climbing ladders.

Hmm, seems it's too long to post as a message, so I'm attaching the file. This is purely for your amusement.

I seem to remember ladders took me like 2+ weeks to get working initially, not to mention fixing bugs later. It was definitely one of the harder parts of Jack's movement.

This is also one of those things you might call "ugly code."
Back to top
 

 
IP Logged
 
joeb
Adventurer
*
Offline



Posts: 360
Re: Under the Hood
Reply #1 - 17.02.2007 at 06:24:19
 
Vern,

Living in a programmers world daily I think I have an appreciation of what's under the hood. Just curious about when the rest of the car will be available (expansion pack).

Roll Eyes Roll Eyes Roll Eyes

Thanks,

Joe B
Back to top
 
 
IP Logged
 
joeb
Adventurer
*
Offline



Posts: 360
Re: Under the Hood
Reply #2 - 17.02.2007 at 06:32:18
 
Why ugly?
It's commented which is my definition of pretty vs ugly.

Joe B
Back to top
 
 
IP Logged
 
Anthony
YaBB Administrator
*****
Offline


Nova Scotia, Canada

Posts: 1367
Canada
Gender: male
Re: Under the Hood
Reply #3 - 17.02.2007 at 10:04:43
 
Looks like hard work, Vern! Here's an example of what I did with my simple Meta language. (Type of code) These I believe is the buttons code... or the controls... It's been along time since I programmed, took me awhile to figure out. Its the code for my game, Laser Blaster. Download it free at my site! (www.antsarts.surf.to)
Back to top
 

Anthony Duchesne ~ Original designer of Castle Basano, Leofani Manor and Jasperlone Mountains
Anthony AnthonyDuch http://www.facebook.com/profile.php?id=590111070  
IP Logged
 
aquaMat
Expedition Leader
***
Offline



Posts: 1159
Berlin, Germany
Gender: male
Re: Under the Hood
Reply #4 - 17.02.2007 at 20:59:36
 
Vern....that's really amazing (and crazy...) - so many linmes of code needed just for moaking someone / something climbing a ladder....  Jesus Christ.   Shocked
I wonder how many pages would be filled by the code for the whole game ???
Back to top
 

Why is a carrot more orange than an orange ?
WWW  
IP Logged
 
Amplifyed
Adventurer
*
Offline


Formally known as "Sam
S."

Posts: 300
Down the hall on the 3rd right
Gender: male
Re: Under the Hood
Reply #5 - 17.02.2007 at 21:27:21
 
I'm not sure if there's a number for that!!! Grin
Back to top
 

-Vintage Octopus-
 
IP Logged
 
Anthony
YaBB Administrator
*****
Offline


Nova Scotia, Canada

Posts: 1367
Canada
Gender: male
Re: Under the Hood
Reply #6 - 17.02.2007 at 21:54:26
 
There's 311 lines exacly for my Laser Blaster! My older brother is coming over soon to help me to get Health Packs working and to appear every now and then when you're playing! Then Laser Blaster 1.2 will be out! After that, I'll get more weapons for 1.3! It'll be wicked.

@Vern:
Do you know any Meta-Laugage? I use a app. known as Metal with my code. You can download it at: http://www.iit.edu/~sarimar/GDS/DL/metal-173.sit
Back to top
 

Anthony Duchesne ~ Original designer of Castle Basano, Leofani Manor and Jasperlone Mountains
Anthony AnthonyDuch http://www.facebook.com/profile.php?id=590111070  
IP Logged
 
VernJensen
YaBB Administrator
*****
Offline



Posts: 1064
Los Angeles, CA
Gender: male
Re: Under the Hood
Reply #7 - 18.02.2007 at 02:50:47
 
joeb wrote on 17.02.2007 at 06:32:18:
Why ugly?
It's commented which is my definition of pretty vs ugly.


Well, ideally it would be modularized a bit more. Right now, it's the "stuff everything into one function" (or in this case 4 functions) type approach, which makes it hard to read, and difficult to modify and debug.

But sometimes you never really can get away with the "ideal" elegant approach, and have to go with real-world.

The nice thing it, I was successfully able to copy and modify this code for use with the new Troll monster fairly easily. Now I have a troll who runs along bricks *and* climbs ladders when he comes to them -- something I was previously afraid might be very hard.
Back to top
 
 
IP Logged
 
VernJensen
YaBB Administrator
*****
Offline



Posts: 1064
Los Angeles, CA
Gender: male
Re: Under the Hood
Reply #8 - 18.02.2007 at 02:58:37
 
aquaMat wrote on 17.02.2007 at 20:59:36:
I wonder how many pages would be filled by the code for the whole game ???  


Quite a few. Wink

I have 15 main source code files for the game, not including the animation engine, SpriteWorld, which I also wrote much of, and not including many utility files, used for things like handling File Input/Output.

In the previous source code listing, there were 4 "functions":

ClimbingSpriteMoveProc
FinishClimbingLadderMoveProc
GetLadderRect
GetLadderRectFromTile

Below is a screenshot showing the entire function list from just one of those 15 source code files, to give you an idea of how long one of the files can be. This particular file has 4910 lines of source code.

This is one reason why they say programming has a "steep" learning curve on modern computers. Wink

And now you can also recognize why commercial games typically have *teams* of 30+ people working for 1-3 years to create a single product. (Although many are typically do artwork or other non-programming roles.)
Back to top
 

functionlist.jpg (102 KB | )
functionlist.jpg
 
IP Logged
 
Anthony
YaBB Administrator
*****
Offline


Nova Scotia, Canada

Posts: 1367
Canada
Gender: male
Re: Under the Hood
Reply #9 - 18.02.2007 at 03:18:17
 
Looks... long. Wink
Back to top
 

Anthony Duchesne ~ Original designer of Castle Basano, Leofani Manor and Jasperlone Mountains
Anthony AnthonyDuch http://www.facebook.com/profile.php?id=590111070  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print