Wednesday, January 30, 2013

Space Chickens VS Angry Zombies is done!

My first entry for the #1GAM challenge this year is now done.

I am currently doing distribution builds for Indie City and iOS Submissions.

Here's a couple of screenshots to enjoy for now:



Monday, January 28, 2013

App Icon for Space Chickens VS Angry Zombies

Okay so the game is coming along very well. It appears some how I will indeed make the deadline for my #1GAM month 1 challenge!  Wewt!

Here's the icon for the App I just made within the last 30 minutes:


I took the character sprite frame 1 from within Adobe Illustrator and then used a PhotoShop icon template I have.

It wasn't quite right so ...


Wednesday, January 23, 2013

8 Days on #1GAM left, am I clucking insane?

So there are only 8 days left in the first Month #1GAM challenge and I joined 12 days late.

So I basically committed to doing my first game in a year long challenge in only 19 days?!?!  Am I mother clucking insane?!



The current state of the game is barely playable right now.

 I guess I say "barely" because I have high standards.  Technically speaking the only things missing are the following:


Sunday, January 20, 2013

physics collision via raycast completed

So for my #1GAM challenge I decided to use Physics Ray Cast to detect collisions.

Originally I imagined using a "corner point" system thinking to myself this would detect anything right as I hit it.

Indeed this worked very well as long as the player was not jumping!

The player sprite is 128x128 pixels and the world blocks are 64x64 pixels.

So in scenario 1 you see if the player walked into an object of any kind there would be two collisions (noted by the red lines for the physics ray cast).

However I started noticing odd behavior when I jumped.  Sometimes I would jump and the middle of my player would hit against something ; and nothing would happen.

So we see in scenario 2 as soon as the jumping is in play this set of ray cast points was in fact insufficient. As the visual portrays what happens sometimes during a jump the sideways stack of blocks can hit between ray cast points.

So finally I came up with the system in scenario 3.

There is no gap on the player large enough to slip through and this has the benefit of detecting if you hit something from any angle on left edge, right edge, or center (for any side).

And per the spacing I made (perhaps not 100% accurate on the mock up here) there is no room for 64x block to slip through undetected.

I'm glad I spent some time testing this in game otherwise this might have slipped through and presented some possible exploits, and game bugs for Space Chickens vs Angry Zombies.

- punch out

Thursday, January 17, 2013

menu art for space chickens vs angry zombies

Did a nice menu screen for my upcoming platformer Space Chickens vs Angry Zombies for this months #1GAM challenge.


Not settled on it but its pretty nice at the moment.

It's one of those things I might have been inclined to tweak for a long time; but if I'm going to do 1 title a month I need to be fast, productive and move on when its 'good enough'.  So other than possibly adding level shots to the transparent areas or changing fonts (got a license inquiry out on one of them) I think this is going to work!

- punchy out


Tuesday, January 15, 2013

platformer updates for Jan 15th

Continuing my work on my #1GAM Platformer : Space Chickens vs Angry Zombies I have completed the following the last day or two:


  • When saving levels in the editor you can type in the level number for the save file
  • When loading levels in the editor  you can specify which level to load.
  • Created new pulsing heart sprite (for health pickups)
  • Added  Stars & Hearts to the level file format for both saving and loading.
  • Health bar added to GUI
  • Health system implemented
Keeping the entry short today in interest of more programming! 

 - punchy out

Monday, January 14, 2013

free star sprite

So I finally learned both Silo 2 and Blender enough to make my first sprite a couple of days ago!

I like it a lot; I was able to get a very nice reflection going on it! I did add a black outline in Photoshop to help it punch against certain backgrounds.


So to celebrate I am giving this out for royalty free use with the following conditions:

1: You may not sell the sprite itself
2: If you have a 'credits' portion give me credit (Carl Kidwell)  (if however your product lacks a credit section then feel free to leave me out)
3: I'd appreciate a link to whatever product you use it in (not required but nice).

Enjoy!

- punchy out


Sunday, January 13, 2013

Platformer Alpha video 1

Space Chickens vs Angry Zombies is my upcoming platformer for iOS and my first title of the year as part of my #onegameamonth or #1GAM challenge.

This video features use of the level editor, and shows off the new star and heart sprite.


The star will be the equivalent of 'coins' ; its your primary collectible item.
The heart of course is your health meter refreshment option.
The level editor shows off a few items in this video:
- its ability to be tabbed in out while playing
- its ability to pan around the screen
- the ability to choose and lay down sprites

Note: The level editor is not intended to ship to the end product just showing off my in-house tools :-)

Saturday, January 12, 2013

new avatar for Google+

Created this awesome new avatar for myself for Google+ which I just activated today finally:


Just can't express how much I love this thing.

- punchy out

I'm entering in the One Game a Month 2013 challenge!

As a goal for this year I knew I wanted to complete more games this year than last year, but it was a little tough to decide what I should aim for?

So I started off by recapping my accomplishment 's for last  year - technically speaking I made 3 games last year:

1:  Pirates Treasure in DBPro - completed but did not commercially release.
2:  Pirates Jewels for iPhone, iPad and PC on Indie City
3:  Holiday Cheer for iPhone, iPad, and PC on WildTangent

So that's pretty good honestly. I learned to program last year starting in February no less!  Getting 3 games finished is awesome.

So I figured - why  not double the goal?  That's fairly reasonable and I should be able to get it done?

Well I am part of the Meetup.com's Sacramento Game Development Meetup Group but most of their meetup's are day-long or weekend-long GameJam's (which is very cool) but as a 40+ year old married guy with kids I can't abandon my family for that long (or don't want to - take your pic).

But I am a member and therefore read the news and posts and our Organizer +Joseph Burchett mentioned and recommended that we should think about participating in One Game a Month's challenge  to create one video game per month in 2013.

But that's pretty huge ..

Tuesday, January 8, 2013

further optimized saving and loading + bugfixes

I was able to further optimize my saving and loading routines for my platformer engine I'm working on.


In particular I made it so every time you save the following takes place:


  1. The array that holds the current level structure is bubble sorted to move all the 'deleted' items to the top
  2. The save routine skips over the deleted elements
  3. The save routine re-numbers the items as they are saved out to have a new in-order numeral  (this is important because I am limiting my levels to 20,000 sprites at the moment, therefore I need to make sure there are not gaps in the order, nor a jump in numbers)
  4. Once saved out the current level is deleted from memory and the screen.
  5. The array that holds the level is zeroed out
  6. The save routine calls the load routine to load the freshly saved , newly ordered level into memory.
There were a few bugs , such as when I was deleting sprites manually I was not zeroing the array # that held the sprite; therefore I had 'magic' blocks that would come back all by themselves! 

That was a fun one to figure out!

Also because I was bubble sorting, the zeroed out "empty' blocks were getting bubble sorted to the top of the array ( position 0,1,2,3 if there were 4 0's for example) and I had to do a function to count how many zeroes there actually were and subtract that from the total before saving. 

- punchy out

Monday, January 7, 2013

Platformer: saving and loading now works!


I was able to get the file loading and saving working using the structure I described in my previous post.

It works extremely well so far!

I did find a few bugs I need to fix:

1: Saving a file I do a getSpriteExists; if it fails then I write that particular block to be 0's. This later causes "empty" blocks in my structure so I need to do some sort of bubble sort on it.

2: The variable I use to determine what sprite # I'm on needs to be reset when I do a load.  For example if I put down 50 sprites and load the level it resets the sprite count back to 1 and each sprite I put down thereafter effectively deletes one of the loaded ones until I surpass the loaded sprite count (super easy to fix but just sharing what I saw).

Also I want to add some additional functionality such as loading/saving by name instead of hard coding it but I want to iron out the bugs before doing so.

But for my first 'level file format' I am jazzed at how well this is working!  Some times its great when you do some planning ahead of time and everything works out!

Sunday, January 6, 2013

file format research for my platformer


Okay did some research on a file format .. not done but the main consideration is storing all the sprite locations and what image number and if its a physics sprite or not.


Using a 1024x768 screen

My sprites are all 64x64

1024 / 64 = 16
768 / 64 = 12

the 1024 row can hold 16 sprites at 64 pixels
the 768 row can hold 12 sprites at 64 pixels

16 * 12 = 192 possible sprites per screen

192 * 10 screens = 1920 
192 * 20 screens = 3840
192 * 100 screens = 19200 .. round off to 20,000

Obviously I am never going to fill an entire screen with sprites so this calculation is extremely conservative. Most screens will comprise of about 80% of the screen being 'air' so practically we are talking about the possibility of level being more like 500 screens if i limit it to 20,000 as I'm presuming here.

if an int is 32 bits (depends on system ) 100 screens of 20,000 int's is 640000 bits or .076 MB's of memory

so if we had to hold 20,000 ints for the x,y, levelSprite and image number and the physics flag thats 5 * .076 or .38 MB


So using this type of structure


+ Code Snippet
struct level_Format
{
int levelSprite;    // levelSprite is just the sprite number variable
int imageNumber;    // imageNumber is the image number that will be used to load the sprite
int x;              // x location of the sprite
int y;              // y location of the sprite
short physicsFlag;  // flag if the sprite will be physics or not (some sprites are for decoration, some for collision)
} levelblocks[20000];


If I write out 21,000 lines of this in a text file it is 489kb.

The reason I'm going with 21,000 is because I will need some header info and I don't know everything about that yet, and Ill also need entity info but that should be considerably less than the level architecture.

So my calculation is if I use this type of format for a level most level data file's will be about 150kb or less because I can't see myself doing levels that comprise of more than 50 screens of 1024x768 width .. that might actually be too big ; play testing will show this out eventually.


Saturday, January 5, 2013

starting a new platformer game for 2013

So as one of my goals for the new year I am starting my next game.

My 3 year old has found that platformer games are his favorite on our iPad and has been having tons of fun on them, so I decided I would make a platformer myself.

The AppGameKit that I have been using to develop has been fairly successful for me so far so I have decided to continue forward with that for this project - although as a side note I am determined to teach myself  Java and make a native android app this year as well.

I'm not fully clear on what my full goal set is for this platformer?  It is my first one ; and I have not been playing them a lot lately. I used to love Super Mario Brothers as a child .. and Super Mario Brothers 3 was probably my favorite .. but the genre has changed a lot.

My son's favorite one's on the iPad are

Lep's World HD
Muffin Knight
Mikey  Shorts

They are all fairly easy to play (even for a 3 year old) and have a lot of fun game play.

I'm not sure that I want my platformer to look just like any of those so I will have to see what happens as my engine matures!

I hope to make something that has the following though:


  • a flavor that is all my own
  • art that is thematic
  • something that tells an interesting story (not just level after level)
  • levels that have a vertical as well as horizontal elements
  • 'boss fights'  - I've noticed some platformers seem to skip these
  • physics puzzles
  • a built in level editor  - I quickly realized that hand coding every block will kill me time-wise!



I've only been working on this since the beginning of the year, but already I have a basic structure in place and the editor already started!

The level editor is extremely alpha but I'm loving it so far, I am going to put a lot of work  in to this. What I've done in it already has been so valuable I immediately realized this was a huge idea that will be critical to making successful levels.