00:00
00:00
BoMToons
So many times, it happens too fast...you trade your passion for glory. Don't lose your grip on the dreams of the past, you must fight just to keep them alive.

Age 43, Male

Software Engineer

Somewhere in Nevada...

Somewhere in California..

Joined on 11/29/05

Level:
40
Exp Points:
17,124 / 17,760
Exp Rank:
1,272
Vote Power:
8.10 votes
Audio Scouts
1
Art Scouts
10+
Rank:
Police Officer
Global Rank:
14,724
Blams:
242
Saves:
415
B/P Bonus:
10%
Whistle:
Gold
Trophies:
42
Medals:
1,390
Supporter:
8y 5m 19d
Gear:
17

Madness: Premeditation Post-mortem

Posted by BoMToons - October 12th, 2010


Madness: Premeditation was a bit of an experiment for me. It's been a while since I've tried to do something "new" in flash and building this game was really rewarding because of the hurdles I had to overcome to make the game work properly.

The original concept was quite a bit different from the end result:
http://www.newgrounds.com/dump/item/36 e322a09404ef4656b121c96997db71

As you can see, it was going to be more of a step by step process where you had a choice of what to do every 5 seconds or so, then could watch the replay and see all your planning play out in full-speed. Seeing the "replay" was always a key part of the idea since a lot of the pleasure, I think, of the Madness series is just sitting back and watching the slaughter unfold.

Another big inspiration were all those "gun-fu" movies like "Equilibrium" where the main dude has obviously planned with precision how he'll kill everyone.

.
/* */
In the end, after some discussion with Luis, we decided to simplify the concept from the "choice every 3 seconds" down to distinct phases divided up by action type, so basically: 1. Run the level 2. Aim your guns and 3. Watch it unfold. This, not only made the game simpler to "pick up and play" it also narrowed the scope down to something we could finish in the limited amount of time we had.

My first hurdle was deciding how to show the player's path after having already run it:
http://www.newgrounds.com/dump/item/86 a3ae1c5f6c527eae1a1bfb218fdb47

One of my concerns was trying to reduce the amount of data I was storing to pull off the replay since I wanted it to be share-able in small data packets. I decided to drop a "node" every few frames at the player's x and y position and then use the drawing API to connect the nodes and approximate the path the player followed through the level.

Originally you could only shoot from one of those evenly-spaced nodes:
http://www.newgrounds.com/dump/item/37 74ffac903ea31035b59048ca83e073

Luis suggested I allow the player to place nodes anywhere along the line and I agreed that would be a lot better...but implementing that was another hurdle...

How can you calculate the x position of a variable line given a specific y position (and vice-versa)?

Eventually I remembered my Algebra class and used the point slope formula. I know this is a simple concept for most coders, but when I figured out how to make my move-able node "snap" to my arbitrarily-created line, it was a moment of triumph for me. Here's how it's done for those who might be wondering:

========NERDGASM=======

My line was already broken up into segments since I was dropping nodes at specific intervals, so I could always start with 2 points:
(x1,y1) and (x2,y2)

From these 2 points you can calc the "slope" of the line. ie: rise/run:
m = y1-y2/x1-x2;

Since I know the user's x mouse position, I can automatically center my node there:
finalx = this._xmouse;

Point slope formula is:
y2 - y1 = m(x2 - x1);

To calc the final y position, solve the equation for y2 using one of the line's end-points and your _xmouse to substitute:
finaly = (m*(finalx-x1))+y1;

Then just place the node at the final calculated points:
node._x=finalx;
node._y=finaly;

Now wherever you move your mouse, it will "snap" to the created line. (In the final game I also threw in some logic to calculate the X position based on the _ymouse to make moving along the line smoother when the slope was steep).

=====END NERDGASM========

This is just 1 example of the many hurdles and new thought paths I had to take to get the game where it is now...getting the player's hands to move correctly and maintain the correct gun for Left and Right, laser-sight aiming, restricting 2 handed weapon aiming, removing nodes once they're placed, and saving/loading saved data with the NG API were other learning experiences along the path to getting the game released.

I didn't do it alone, a lot of the best gameplay ideas came from friends, like Luis,Coaly, and Jacksmack who helped refine how the path is displayed to indicate time passage (thick to thin, light to dark) and also displaying the time-stamp as you scroll along the line to allow more exact planning.

Many others have since given great suggestions, like having a timeline to scrub along to make node-placement more exact (and so you don't get inaccurate placement when lines intersect), allowing more sandbox control like level-design and placing your own enemies, projecting enemy paths the same way your own path is projected, restricting node placement based on gun recoil/re-loading, melee attacks, slow motion/bullet time, and throwing your gun when it's out of bullets...maybe in a sequel?!

I know there are still a few bugs, but I'm very happy with this game mainly because I learned so much when addressing the little hiccups that arose in trying to do things I hadn't done before. Sometimes it's easy to stick to the stuff you've been successful with, but when you stretch your skills with something fresh it can really help revive your love for the medium.

GOOD LUCK!

P.S.
http://www.newgrounds.com/dump/item/1b 2e605e26a3059793aea1dc8fb57a23

Originally the game was going to star Sanford and Deimos from Madness Combat 9...with Deimos being the "ghost" or "spirit" (because he died) who planned the level and then Sanford would use Deimos' post-mortal intel to execute the level with deadly accuracy. Someone told us it was too convoluted though, so we stuck with Hank...though on level 2's background Luis snuck in Jouste's poster of Sanford and Deimos :)

Madness: Premeditation Post-mortem


Comments

Get a tube yet?

Yes I did, been meaning to THANK YOU SOOOOO MUCH!

The nerdgasm was much needed, when I saw the formula I thought BALDERDASH! Impossible, but then again I'm new to as3 so Iunno, I do too many short coming answers, I actually have a idea in mind for a game with a friend of mine we've been working on for quite awhile, and after seeing this I gotta say it, SORTA inspired me a bit, and I am giving quite a good deal of thought into continuing it. I already commended you and luis for finding a new way of doing things and I gotta say its nice playing something orginal especially from well known artists such as yourself, looking for your next game bro. LOLK

Ha ha, thanks for dropping a note...my code is actually AS2! dun dun dun!

But it could easily be in as3 too, the important part is the algebra which is independent of ALL languages :)

Makes me feel good to think you were INSPIRED :)

That movie could give an erection an erection.

you are

yeah you should totally try to reinvent this with more polish to the gameplay mechanics and design choices. it would be r8 gud as jerry jackson would say

you're so passive aggressive...just say this one sucked :*(

It was a really cool concept I haven't gotten too far into it, unfortunately.. same for Chibi knights.. I guess I have a short attention span or just get inspired to make stuff of my own by your work ;)

if you can't get into chibi knight, I'm not sure what to tell you...that one's one my most "pick up and play" games...for now I'll just believe you're getting inspired :)

lol it doesn't suck at all, i just think you should remake it to give yourself more time to flesh out the difficulty curve and stuff. i really like the idea and i want to see another one. if only there was a way to help the player better understand the movement and timing of the enemies while playing...hmm...no but really make a #2, i know you can think up ways to make the game easier for all the n00bs out there (i am gosu, watch out vidgamedude)

yeah, one day I should definitely make a sequel...and put in all those suggestions I mentioned in my post.

billy crystals

Billy's Crysalis

Ha I code AS2 too and I love math and physics, this news post was really nice to read. Thanks for give us some good things to read au contrair from just some "oh I did a bread today". Also, my future thoughts are beetween an engineer or a mathematician!

I did a bread today?

Hm, interesting...

This is great stuff, you give the rest of us inspiration, it kind of makes me WANT to pay attention in math class.

OMG!

lol madness combat in medevil days

midevil or whatevr its called