Nav: (Display/Hide) - Home - About the Author / this page

Current Projects: Americana Engine (Game Engine Development)

Thursday, March 28, 2013

Bead Sprite: Zuma Blitz Spirit Turtle

Sprites are quite hard to do especially when they require conversion. The Zuma Blitz Spirit Turtle is no exception to this rule.

The turtle's more than capable of spitting out more fireballs than any other. That means more curve clears on shorter boards. It might be expensive but it's also responsible for almost 30M scores because players were exploiting the combo system by racking up combos while remaining in hot frog mode (which only works since the game only resets the combo if one a normal ball that you fire touches another ball on the curve, which never happens).

Of course to get these it's highly dependent on luck; you have to rely on fruit appearing faster than usual and balls appearing in a favorable position. Attempting these scores alone has zeroed my coin balance many times over, and put high coin costs on other players (I think it took someone many attempts and around 30 million coins to achieve the first 29m score).

I didn't record any replays after the Shamrock board since high scores were determined by abusing this system, and the score difference between this and any other combination was so high that it defeated the entire purpose of figuring out optimal strategies for each week's board.

(A direct color conversion of the Spirit Turtle makes it look janky in some areas and will be redesigned. Expect an updated image in the next few days... or not.)

Tuesday, March 26, 2013

Some days I see the situation on the levee get out of hand. Used to be just ordinary trash, there was a broken down shopping cart and maybe a keyboard at one point. Now it's this - several sofas (can't salvage) and a wooden door. I wonder who picks up these things...

Reminds me of those 'random events' that I see in various RPGs - most of the time a certain area is normal, and only in rare occurrences there's something different.

Sunday, March 24, 2013

Americana Dawn: The Menu Screen

Mock up of of the menu screen where it displays your party. Less elegant with the font until I can find the exact font that KY was using for her menu mockups. (I was only given two character windows to test out the menu screen and such.) Although designed for 640x480, it automatically centers and adjusts itself for higher resolutions.

Up to three characters can be controlled at once on the battle screen, the fourth character slot was just in case the game needed one for some reason (like plot events where you temporarily gain a party member) but they won't be participating in battles.

Current Flowchart:

  • ITEM displays all the items that you have on hand. May contain separate tabs for consumables, equippables, and key items, and you can select a character to use it on from there. Might be renamed to 'Supplies' later.
  • JOURNAL lists all of the journal entries you have unlocked so far. This includes help for the game in general.
  • OPTIONS allows you to change a variety of settings and end game. Note: There is no ability to save from menu, you'll need a separate item (like a camp) to do that, and you'll be presented with an option to save upon using it. It's just to prevent save scumming.
  • Selecting a CHARACTER allows you to see that person's stats and mastery levels, equip items (you'll be shown if what you equip is better or worse, and won't show it if equipping different weapons), and manage their skillpoints.

Thursday, March 21, 2013

Bead Sprite: T.O.P (Crab Hat)

This is what results when attempting to beadsprite an image from a (friend of a friend's) tumblr and not doing the research beforehand. Yes, TOP as in the entertainer, not an actual top (which would be trivial to sprite). Originally I saw it as complete OC but later found out this was more in the fanart category - I decided to commit anyways since it was half done by the time I found out. I did not know who BigBang / T.O.P were prior to spriting this, and this will have a limited release on FB because it could cause an unintended bias.*

A second section, which would otherwise make this sprite project called 'TopBom (Tv Version)' was not implemented at this time due to limited resources (both in beads and grids). The skin here was colored with a Tan color because I didn't have a supply of Sand colored beads available - color replacement will be done as soon as I get a few bags.

Link to original image for the interested. I didn't receive the best of approvals when using a mention on FB to show it to the original artist, so future bead sprites will not explicitly bring it to the original artist's attention if they are known personally.

Tuesday, March 19, 2013

Programming Keyboard Movement

After days of figuring out the logic behind mapping key presses to moving backgrounds and sprites, I have a somewhat functional copy of the game engine - so called Banana Slug*. Characters can run using the shift key, although how many characters have running animations is strictly based on budget.

This code is so complex - maybe 150 lines to control basic map and character drawing functions. And we still have a variety of sprite overlays to draw as well as anything menu and dialogue related, as well as reading scripts from an external file. Lots of math involved in manually calculating the draw positions and figuring out an equation for this. Good thing I took those applied math courses.

Keyboard Movement Code

This modifies the dxinput.cpp and dxinput.h file found in the book Beginning Game Programming, 2nd Edition by doing the following:

  • Assigns key_lock[256] as a bool array.
  • Modify Poll_Keyboard() to be the following:
    
    void Poll_Keyboard()
    {
     if (dikeyboard != NULL)
     {
      HRESULT result; 
      result = dikeyboard->GetDeviceState(sizeof(keys), (LPVOID)&keys);
      if(FAILED(result))
      {
       if ((result == DIERR_INPUTLOST) || (result == DIERR_NOTACQUIRED))
       dikeyboard->Acquire();
      }
      else 
      {
       for (int i = 0; i < 256; i++)
       {
        if(!(keys[i] & 0x80) && (key_lock[i]))
         key_lock[i] = false;
       }
      }
     }
    
    }
    
  • Added a Key_Down_Once function:
    bool Key_Down_Once(int key)
    {
     if ((keys[key] & 0x80) && (key_lock[key] == false))
     {key_lock[key] = true; 
     return true;}
     else return false;
    }
    
  • Adding the function prototypes in the header file

When the keyboard is polled, it will check to see if the keyboard is acquired (via GetDeviceState) and if it isn't it will attempt to reacquire it. The keyboard is automatically unacquired when the program loses focus and without this addition, the program will no longer receive input from the keyboard. (Code regarding reacquiring input devices aren't covered in the 2nd edition in the Game Programming book, and although a similar function appears in the code on the CD in the 3rd edition, it isn't explained anywhere in the book.)

If the keyboard is already acquired it will check the state of the keyboard and will disengage the key_lock if it was set and the key was released.

Key_Down_Once will set the respective key to its locked state and register the button press, it will not register that key press again until the key is released. This was needed since the original Key_Down function will keep registering a button press as long as the key is held down (as in triggering it as fast as the program allows) - it doesn't register key presses in the same way or at the same speed as holding down a key on the keyboard (where there is a delay before key presses are repeated). Useful when you have keys toggle certain things.

Friday, March 15, 2013

Starcraft 2: Heart of the Swarm - Speedrun Version

An attempt at completing each mission as fast as possible on Normal Difficulty. Unlike Wings of Liberty, there isn't an achievement for doing a speedrun of the campaign. (Although there are more achievements for completing certain levels under a certain timeframe, listed under the 'Mastery' category, they won't be covered here.) Too many people were doing playthroughs on Hard / Brutal and I wanted to try a different approach.

Replays will be published somewhere between now and by the end of the month, and this page will be updated / links will be posted as they are uploaded.

Notes:

  • All of the maps are played using Master Archives game mode, since it allows me to configure units to work the best for specific maps without the need for multiple playthroughs, and some levels are difficult or impossible to speedrun otherwise before that point.
  • Demos were made on WinXP, the sound quality is reduced a bit. There's also a performance hit on some maps especially with a large amount of units onscreen, but it shouldn't matter much (I have a GTX 670 and i7 2600K, so it isn't the card...)
  • I tend to go for econ over rushing as it tends to help in the long run in most cases.
  • Evolution missions are not counted.
  • Maps with no links to videos are ones which I am attempting a faster run at.
  • I will attempt Brutal difficulty speedruns of this campaign at a later date.

Other Thoughts:

  • The new settings with the expansion has 'select neutral or enemy units' toggled OFF by default. If it's on, it will explicitly tell you that you can't control the unit when you select it (which is kinda annoying, since you probably knew this beforehand). I find it helpful to check stats of enemy units and such.
  • I don't need tips from Izsha reminding me to get anti-air, telling me I don't have three drones on a extractor, etc.
  • Some game elements were changed only for the campaign without too much explanation. None of your units except Spore colonies have detectors, but it's not like you need them since enemies don't cloak and nukes aren't fired using ghosts.
  • The infestor's neural parasite is equivalent to a DA's Mind Control only in the campaign. Combine that with Consume and it can control a lot of the enemy army quickly.
  • Some other key units like Nydus Worms are unavailable, transports can't be made to ferry units around, the only upgrades you can research in-game are weapon/armor upgrades, and the cap for larva at a Hatchery is much higher, making this a non-representative multiplayer SC experience.

Individual Level Notes:

Lab Rat

  • Fairly standard build, though a large enough force was needed to go through w/o reinforcements.

Back in the Saddle (around 17 mins)

  • The map was fairly linear here, so there's not much to optimize in this level.

Rendezvous (15:59)

  • Note that this mission has a fixed timer - you are forced to wait for reinforcements to arrive before you can attack the main base since the bridge isn't lowered before then. The best you can do is to destroy every building on your side (doing this on Hard gives you an achievement) and camp at the other end of the bridge.

Domination (3:37)

  • Kerrigan's Dash move works well in collecting those eggs at the start, and she's healed to full after collecting them. Note all the units you have control over is guaranteed to cause lag.

Fire in the Sky (7:52)

  • Although tumors were used to expand and such, having a drone to build a Hatchery near each nest that doesn't have creep and then using a Queen to put a tumor in place is much faster than spreading creep slowly towards the nests. Although it seems nice to activate all the nests at once, there's a delay between the time one battlecruiser gets destroyed and another one pops out.

Old Soldiers (8:29)

  • After several runs through the map it was concluded that Swarm Hosts work the best, since the locusts also draw fire from the base defenses. The drones that get dropped when you defeat the base with Rich Mineral Fields doesn't matter much.

Harvest of Screams (4:46)

  • If you have the Zergling speed and Raptor upgrade, it becomes possible to destroy all three spires before the first flash freeze passes, Kerrigan destroying one single handedly with Banelings (the ones that she summons do 160 damage each with the right upgrades).

Shoot the Messenger (3:24)

  • Note that Kerrigan's Leap ability will work leaping on cliff edges IF you have vision, so an overload was used for a spotter. Summoned banelings have a 90 second lifetime, the cd to summon is 30, and you need a bit more than 6 to destroy a bay, so two summons were used for each bay. The last bay was a one summon + damage from Kerrigan for the win. Note that harder difficulties places additional units near the bays and you can't use a cheese strat on one of them since they will kill most of the banelings before they can explode.

Enemy Within (11:24)

  • The level is fairly linear and you'll have to kill everything here (some areas release units on a fixed timer) so there's not much to optimize for the map, other than decreasing the time it takes to destroy some generators using some increased speed Zerglings.

Waking the Ancient (7:27)

  • The enemy only sends out units to attack the first drone that started harvesting, so you can safely harvest a few of them in the same area without worrying about drones being killed. After that (when the other locations are revealed, or the 3:40 mark, whichever comes first) the computer only specifically sends a wave of units after harvesting a specific location, and two mutas + guardian on the others. The ETA that enemies get to them is at the 40 second mark, so you could be defending other locations when harvesting starts. Destroying them allows you to safely move on; while the drone is unprotected there usually won't be more forces coming after it.

    It's similar to the SC2 Map 'Welcome to the Jungle' except the boss at the end.

The Crucible (around 26 min)

  • This level also has a fixed time limit so there's not much in terms of speedrunning this map.

Supreme (7:01)

  • The reinforcements that you pick up are automatically teleported to you when boss battles start and Kerrigan is healed to full when the boss battle starts and ends so there's no sense fighting between bosses.

Infested (7:57)

  • Infestors work well on this map. Ignore the first virophage being attacked, it's not necessary to win.

Hand of Darkness (19:09)

  • No comments yet.

Phantoms of the Void (13:12)

  • No comments yet.

With Friends Like These (10:13)

  • No comments yet. I've heard of a 8 min completion time so this is definitely not the fastest.

Conviction (7:47)

  • The first half requires that certain or all units must be destroyed in an area in order to advance, so there wasn't much in time optimizations here. Other than that I had units pick up the pace by constantly attack moving.

Planetfall

  • This is actually a scripted mission based on the timer, so a speedrun can't be done on this map.

Death From Above (7:41)

  • Dehaka can rush directly into the generator and destroy it without being killed, saving some time in the opening. Near the Psi Destroyer, if you have enough infestors you can mind control every strong unit defending it and take it down before the field powers up. (Normal mode has 1500 HP, Hard and Brutal have 2500)

The Reckoning (13:43)

  • The quickest solution to winning was to pump out Infestors as fast as possible and neural parasite (mind control) every unit in range. Problem was the energy cost (125). Consume worked to a certain extent, but left units injured. The best solution was to MC medics, consume hp from other infestors and convert them to energy and work on mc'ing other units while the medics heal them.

Thursday, March 14, 2013

Relay For Life

This was on a friend's Relay for Life donation page where the reason why to donate and Relay isn't taken very seriously. Guess she wasn't a fan of copypasta. Hand her the money to donate? Seems legit.

Things would get very interesting if it was a guy who wrote this but sadly this isn't the case - it's just a cute girl who doesn't like dresses and high heels.

I'm actually overdue on a new profile picture and I'll need one for AD anyways so I'll probably stick to Anthyvy for the donations.

Monday, March 11, 2013

Stockton Chinese New Year 2013

Stockton's Chinese New Year Parade this year occurred around a week ago and was similar to that of last year, although I noticed a few changes. They moved the grandstand over to next to the Civic Auditorium and there were considerably less people watching the parade, not sure why. This was the first time that MCHS Key Club ceased to exist in the parade - in past years, there was a group of around 40-50 people showing spirit, in red t-shirts and such with a huge banner, but it's not the case anymore - instead they were wearing blue shirts (D27 North) and they weren't holding anything.

Though the performances were great as last year, some creative booths were left out that were present last year. For one, the knitting and RC displays weren't there - they were probably a few of the better ones in my opinion.


No longer are there knitted dragons like there were last year.

Like three years ago, I once again find another person I now knew that I didn't know at the time of last year's parade. There's always a few surprises because when I'm taking pictures, I'm not looking at surroundings and such.


David making a cameo appearance on the sidelines during the 2012 Parade.

Tuesday, March 5, 2013

Tryouts: David's Sushi (California Roll)

"This lone computer science gentleman is a sushi chef by day, video game programmer by night." - description for David on Americana Dawn Kickstarter

Work continues even during Spring Break - professors are more than happy to hand out assignments during this weeklong break. This game is no exception when there's a deadline to meet. One of our teammates made a California Roll. Given that he's the sushi chef at the UC, where hundreds of students are eating his stuff*, it's got to be good, right? Exactly. No avocado here (wouldn't this be the distinguishing feature of a California Roll?), but I can check off a subgoal here.

No longer would I have to go for Ngannu Rolls (UCD CKI specialties, named in a picture caption in the Ramble Apartments - which I know a friend makes) in order to reliably complete the goal - I know there's lots of sushi places around, but finding a friend that makes them that is close enough to sample is an extreme rarity. Prior to David, I only knew three others who did this (and the other two are in SF).

Day 1001 Project Goal #30b: Eat one of a friend's sushi dishes, if one is available. (Completed: 3/5/13 - David Ngo's California Roll)

Saturday, March 2, 2013

Americana Dawn: Mapping it on the Big Screen


Part of the New York map in Americana Dawn rendered at 1280x720, without any upscaling.

Knowing the scale of the game itself, the thought arose about 'what would it look like when seen in high def?' I presented it and the team was distracted for a while scrolling around at its epicness, and that's just on one section. With the game music playing.

While playing it on a huge screen might be nice, it might pose some difficulty for screens with fixed backgrounds, such as battle screens and whatnot. So we have two options here:

  • Upscale graphics - they will look lower res and not be widescreen, but it won't cost additional to get the backgrounds and stuff redrawn to fit larger screens. Or
  • Resize everything and design it for high definition screens - for the more 'epic' feel. Higher quality assets = more costs.

Either way, it's going to cost a lot more to get the game going, especially with more people joining the team (currently at 11, compared to 9 or so when the project was first started). The $4.7k that was raised last year will simply not be enough to cover everything (the original creator was already a few macbooks in debt, and might owe a few more due to giving us programmers actual macbooks in order to port the game over to the Mac OSX and mobile devices in the future.) Time to add some stretch goals?