Monday, November 25, 2013

Neat puzzle platformer to reference

http://www.newgrounds.com/portal/view/629074 "twin bots"

Why should I care?

After a play test session with a whole bunch of professional video game nerds.
From a certain video game school, and others in the industry. (Lets not mention exactly whom for legal reasons)
One of my harshest critics that night gave me a good question:

"Why should I care?"

So... I have decided there needs to be one more game mechanic added to make this game complete...
Ovens...

There are ovens on timers. When the timer goes to ZERO the oven turns on.
There are animals in [cages/boxes] that will be roasted if you do not rescue them before the timer goes off.
The boxes will shake to let you know something is inside of them.

I am thinking saving baby foxes.
Foxes sound really creepy when they make sounds.
Which is good. Because it means the first few levels you may avoid the boxes and let them get roasted
because the sounds sound like monsters.

Eventually you take the risk, or have to touch a box, and a baby fox comes out.

Gives it more challenge element.
Gives you a reason to care about what is going on in the game.

// A sprite rectangle that has a button that starts ON:
[X][G]
[g][X]

// A sprite rectangle that has a button that starts OFF:
[X][g]
[G][X]

When the level initializes, if there are more ON buttons than off, all turn ON.
If more off then on, all turn OFF.
Buttons will work like toggles.
If you turn ONE green button ON, ALL BUTTONS THAT ARE GREEN TURN ON.

Once an oven has turned on, the buttons will simply turn the oven on/off.
This can still be a puzzle element.


BEFORE YOU IMPLEMENT OVENS.

You must:
1. Implement basic blood decal placement.
2. Implement basic crate saving and destroying.
3. Implement level re-routing based on if you saved the box.

PARALLEL LEVEL SETS:

Set0: Easy as Pie
Set1: Somewhat Difficult.
Set2: HARD AS HELL


//Two glowing buttons on INTO LEVEL:
[G][R]
00 = Credits (Both off == credits room)
01 = HARD AS HELL
10 = EASY
11 = MEDIUM (Mixing RED + GREEN == medium)

Friday, November 22, 2013

This Game Teaches 30 Tricks To Make Your Action Game Feel Better

http://indiestatik.com/2013/11/21/game-teaches-30-tricks-make-action-game-feel-better/ Played all of this. It is definitely making me think I should take some time out for polish of my game before I release it.

Thursday, November 21, 2013

Wednesday, November 20, 2013

Checking Permissions at runtime in AS3.

I started with the search term "Checking to see if using networking at runtime in as3"
... no luck.

For some reason I couldn't quite figure this out.
I wanted some way at runtime to query if my game was compiled with
the compiler option "Use Network Services" == true or == false.

Then I googled:
Checking Permissions at runtime in AS3.

For some reason... Not much luck here either.

Answer for what I needed:

import flash.system.Capabilities;
Capabilities.localFileReadDisable;

Correction... That was a bit hackish and didn't work... Fix:

import flash.system.Security;
if ( Security.REMOTE ) { return;}

Wait... what am I doing... that is a constant... Need sleep... Correction to previous:

if ( Security.sandboxType == Security.REMOTE ) { return;}

Monday, November 18, 2013

Polishing Collision Physics:

Fix #1: Made a delay between when floor is destroyed from underneath falling column, and when falling column falls. Allows explosions to quickly sneak under the column before it falls. Fix #2: Made it so angled tiles no longer [squeeze / wedge] you through solid geometry. I've had this problem for 9 months. (Ever since I implemented angled tiles). But only until maybe 2 months did I realized the basic theory for solving it. And I am getting close to where I need to polish out all of those little glitches I know about.

Someone from PopCap likes my game.

I am not going to say exactly who, as I feel that would be impolite to speak on their behalf on this blog. But they were really impressed that I am a self-taught actionscript programmer and that I've only been developing the game for 11 months. He wants me to come back in 6 weeks for the next board game night to show off my progress. What am I currently programming? Last night I made a locking screen on my game, and sent out personalized letters to some friends with their own tailor made copy of the game. Each copy contains a password I made for them to unlock the game. I am not ready to release the game to the world, but I'd like to give people I know well copies so they can try it out and tell me what they think. Today I just fixed a glitch with my falling tiles. Not really a glitch as much as it was an "unexpected behavior" that resulted from my system following the rules I had laid down for it. Not sure what the vocabulary for classifying different errors is. It wasn't a syntax error, and wasn't a logic error in the sense that all the logic I had used was working how I had programmed it to. But after designing more levels, the level design didn't quite work how I wanted it to, so I modified the system to give it a... more predictable behavior. To be less abstract about it: Columns now DELAY by a few seconds before falling when the floor beneath them is blasted out. This allows for explosions to have time to sneak under those columns before the gap is sealed.

Tuesday, November 12, 2013

Bullet Bros

This game looks pretty cool: http://kotaku.com/bullet-bros-is-what-happens-when-contra-meets-monty-pyt-1462546409

Runtime Loaded .PNG files cannot have a color channel value of 255(FF)

I have no clue why this is. 
But if I use the loader class, values that are 255 turn to 254.
So a white pixel in an image goes from:
0xFFFFFF
to
0xFeFeFe

Solution:
I have cleanup code for when the bitmap is supposed to represent a very strict, clampped color pallet...
But I just found this... I am hoping it's results will be better than Flash's.

http://www.ionsden.com/article/png-decoder-actionscript-3

Monday, November 11, 2013

Creating Embedded Sound Assets at Runtime

I sucessfully extended from mx.core.BitmapAsset using as3commons.bytecode.
But I was having trouble with mx.core.SoundAsset.

After reading this, I figured out how I can handle the embedding of sound assets at runtime:
http://ltslashgt.com/2011/03/26/loading-embedded-as3-assets-at-runtime/

Embedded Asset Emulation at Runtime using AS3Commons.byteCode

After being up all night, here are the notes from my header file on how I was able to dynamically create embedded assets at runtime.
         * Makes an embedded bitmap class that extends from mx.core.BitmapAsset.
  * This is to emulate the embedding of bitmapData so that we can use
  * assets loaded from folder at runtime and pretend that they were
  * embedded.
  * 
  * FINAL LOGIC ON HOW TO CREATE:
   * 1. I couldn't figure out how to define a custom constructor code, and making just certain properties
   *    valid using the IPropertyBuilder seemed a little shotty. I wanted my new object to behave identially to
   *    an embedded asset.
   * 
   * 2. Solution:
    * A: I extended from the embedded asset type for bitmaps ( mx.core.BitmapAsset ) and made
    *    my own class BitmapAssetWrapper.
    * B: BitmapAssetWrapper has a static dictionary where I bind the unique fully qualified name
    *    of the dynamically constructed class before I build that dynamic class.
    * C: After the dynamic class is built, it's constructor will use describeType()
    *    to get the fullyQualified name of it'self. It will then use that fully qualified name to
    *    fetch the correct bitmapData from the static dictionary. Once it has the correct bitmap
    *    that is supposed to be linked to that class, that bitmap is used in the super() of the
    *    BitmapAssetWrapper's constructor.
    * D: The result is functionally, the creation of a dynamically generated mx.core.BitmapAsset
    *    That will allow me to EMULATE the embedding of assets. By allowing the emulation of embedded
    *    assets, I have made it so that I can use assets loaded at runtime, or assets loaded at compile time,
    *    without having to change anything.

Sunday, November 10, 2013

Time to learn about opCodes?

Beyond me, but might be close to what I am looking for.

Trying to define the constructor for a 
dynamically generated class that extends from
import mx.core.BitmapAsset;

https://gist.github.com/claus/1014957
Update:11:56PM
What did I get myself into??
http://www.arcadeprehacks.com/forum/threads/19923-Inside-SWFs-AS3-Bytecode-Tutorial-(Advanced)

This is a bit too low level for me...
Maybe hack around with ByteCode for a week and see if I can find a solution.

mx.core.BitmapAsset and as3Commons.byteCode

I couldn't get:
var classBuilder:IClassBuilder = packageBuilder.defineClass( _currentClassName, "mx.core.BitmapAsset");

To work.
It kept throwing:
VerifyError: Error #1014

I tried the following solution on stack overflow:
Modify flex-config to say:
< static-link-runtime-shared-libraries > true </static-link-runtime-shared-libraries >
In flash Develop the equivalent is in your config options for the compiler:
See picture below:
That didn't work...
So I found the .swc that the mx.core.BitmapAsset lived in and added it to my project.
Because I know that the "import" statement does NOT work with .swc files in flash develop.
See picture below.
That didn't work...

Then I read this blog post:
http://www.actionscripterrors.com/?p=49
Quote:"Try [...] or adding an instance of the class to the project."

So, to get:
var classBuilder:IClassBuilder = packageBuilder.defineClass( _currentClassName, "mx.core.BitmapAsset");
to work...

I just had to change it to this.
var mxCoreHack:BitmapAsset = new BitmapAsset(null);
var classBuilder:IClassBuilder = packageBuilder.defineClass( _currentClassName, "mx.core.BitmapAsset");
See Pic:


Whooo!!!
Now I am a bit closer to allowing Matt to load assets into the game at runtime.
Wouldn't be so hard if I wasn't configuring the game to be able to switch back and forth
between embedded compile time assets and runtime assets.

I am liking this person's game

http://www.newgrounds.com/portal/view/628123 Asslevania

This abstraction is more intense than I imagined.

Need to use DescribeType to figure out the inheritance structure of Embedded Objects so that I can re-create them using as3commons.byteCode.

This way I can abstract my code to use embedded assets at compile time, or assets from a folder at run time.

So You Want An Artist

2013.11.08:

I wanted an artist... But then I realized I needed an art pipeline:
------------------------------------------------------------------------

I am trying to make a folder called "assets" that my .swf takes from on runtime so that
my artist Matt can test out art in a build of the game without me rebuilding it.


The basic challenge:
I want to switch between a build with embedded art assets. 
(uses art assets embedded at compile time) and between a 
build that pulls from Matt's asset folder at runtime.


Implimentation Challenge #1:
/////////////////////////////////////////////////////////////////////////////////////
A lot of flixel classes use COMPILE-TIME embedded assets of type "class".
For example: When loading a sprite sheet, you load a class that represents that sprite sheet.
NOT a bitmap data instance. When loading bitmaps from a folder at RUNTIME the data is stored within
a bitmapData instance.


So, the problem is the data format:
1. Flixel uses Class type.
2. My assets are of type "Class" when embedded at compile time.
3. My assets are of type "BitmapData" when embedded at runtime.


SOLUTION:
In both modes of my game, I need the data abstracted to the common format of type "class".
Todo this I am using AS3Commons ByteCode to dynamically generate class definitions at runtime.
http://www.as3commons.org/as3-commons-bytecode/emit.html#Generating_classes


Implimentation Challenge #2:
///////////////////////////////////////////////////////////////////////////////////
I am refactoring the game to work with an instance of my own type called
"GenericAssetPack".
The "GenericAssetPack" will be able to load assets from:
1. COMPILE-TIME static registry. No conversion necessary as assets in registry are type "Class".
2. From a RUNTIME folder of PNG files. Will need to convert BitmapData object into type "Class".


After the GenericAssetPack is finished loading, all of the contents of the GenericAssetPack
get injected back into a static registry. This is a bit convoluted, but it is to avoid a huge
refactor that I don't think is necessary.


In future games, the game may work DIRECTLY with a GenericAssetPack instead of with
a registry. Especially since static classes cannot have interfaces and previously I have
had to create "interface hacks" to give my static registries an interface.


//TODO notes (You don't have to read these. I only wrote the below for me to understand)
1. Get GenericAssetPack loading AssetCoreMakeChoice.as assets.
2. Get GenericAssetPack dumping assets into AssetReg.as
3. Get game running again after huge refactor.
4. Work on runtime asset loading for Matt.

Friday, November 8, 2013

Thoughts on Profit Sharing

* Everyone on my team gets a 20% cut.

  * People on team:

   * 1. Programmer

   * 2. Game Designer

   * 3. Musician and Sound Effects

   * 4. PR / Marketing / Social Engineer / Website Maintainer.

   * 5. Artist.

   * 

   * Right now, one person does each job, and that job gets a 20% cut.

   * On my next game I am going to create a TODO list for each job.

   * Each item on the TODO list will be worth a given percentage of the 20% cut for that job title.

   * This is so if someone walks off the team, I know exactly how much I owe them, based on the assets

   * They have given me.

   * 

   * Example: Game Designer:

    *      Tasks: Make all 50 levels.

    *      Each level is worth 2% of the total 20% cut.

    *      If you make all 50 levels that I want in the game, then you get the full 20% cut.

Thursday, November 7, 2013

MakeChoice

Welcome to the DevBlog for MakeGamesHappen. You can expect scans of notes from our notebooks, screencaps, videos of the gameplay, and much more as we go through the journey of the release of our game. We will post as often as possible, comments and messages are encouraged.

Let us jump straight into the game then, shall we? The game we have in development is called MakeChoice. MakeChoice can be best described as a puzzle platformer similar to Pocket Bomberman, but with our own take.

You must make the right choice between two buttons, both linked to a chain of bombs.
Make the correct choice:
A pathway to the exit door will be forged, this can happen in two ways.
- Blowing out a section of wall in your way.
- Making blocks blown out from the ceiling fall into place (which you can then climb).

Make the invalid choice:
You will then find yourself terminated.
- Finding yourself crushed.
- Falling to your death.