Friday, January 29, 2010

Zombie employee

0 commenti
A zombie employee wants to escape from a bad boss and cumbersome and tedious tasks. Do you wanna to help him?

Following this tutorial from Drazzke (thanks man!) i was able to build a little platformer with Flashpunk.
My idea is to follow my online-design experiment and give some feedback from my readers!
Just click on image to try it!





It's a just a demo, like TonyPa Platformer with Java or Flashpunk Hello World Shooter (, but is fun see things moving on screen quickly!
And with Gimp it's easy and free draw a little sprite of a strange zombie-like employee jumping around :D

What do you think of it?

To get source code, clik here:

Thursday, January 28, 2010

Call of Duty - Modern Warfare 2

0 commenti
"At the end of Call of Duty 4 you forget about the politics, you forget about whatever it's all about: It's just two guys on a bridge trying to kill each other." And ultimately, that might be the story's greatest success: In a game filled with tanks, choppers and nuclear warheads, it's still the characters that have the biggest impact.

What do you think?
MW2 is a great, successful, funny game, but in the end player moves many characters and what Escapist says is not so right, IMHO: what player do is more important, not Npcs.. Otherwise, I'm watching a film

Tuesday, January 26, 2010

Escape from colors - screenshots (again!)

0 commenti
In past article i've post some screenshot of a little videogame "Escape From Colors".



Concept is simple: player moves a black square in a two-dimensional world. Other non-black square are trying to touch player and player must escape from colors :D



I was thinking to end this game for Game Jolt Rouge Contest but too-short deadline force me to build something that is not so cool to play.




But i have this game in mind (code too), just have some time to finish it and find a way to make it fun

Tuesday, January 19, 2010

FlashPunk Hello World (Shooter)

0 commenti
Last post was about FlashPunk framework for Flash (Actionscript 3) games.
I wrote about pro and cons of framework and reading punk's code was really interesting. Following good-written basic tutorial i was able to build a little piece of code (after so many critics, try a framework is key factor to understand something), you can found here:


click on image to play

As you can see there are many "basic" piece for a game:
- multiple sprite loading (embedded into final swf),
- player movements using arrows,
- player shoot with Z key (that create terrible "plasma" shot),
- basic collision detection (working with one line!) and basic response (plasma shot will be destroyed after hit an enemy),
- moving enemy (not so interesting, but helpful for newbie, I'll hope),
- very basic GUI,

So, after playing with it, what are judgment?
Very good, so easy to build a flash game with (see my last article) FlashDevelop: it's so surprising that I've done source zip of my example. You can download and use freely, just see License.txt (I'll redistribute it with same license of Flashpunk)

Some hint about source code (I'll reefer to Flashpunk terminology, see my last post about it), all into it.randomtower.flashPunkHelloWorld package
- Main.as : load main "world" (or state) is HelloWorld,
- HelloWorld.as : load resources and embed them into final swf, add "actors" to "world", draw gui,
- Player.as : render player to screen, move it and let it shoot (creating new instances of Rocket.as),
- Enemy.as : render a static or moving enemy (moving = true by constructor)
- Explosion.as : render an explosion with using animation,

Some hint:
- disable Flashpunk splash logo changing in Main. as from:

public function Main()
{
super(400, 300, 60, 2, HelloWorld, false, true);
}


to

public function Main()
{
super(400, 300, 60, 2, HelloWorld, false, false);
}

- watch out for FP static class usage: it's interesting use of this utility class to access to all world-entities related stuff,
- into example's Actors code, you can see this line:

setCollisionType("test");


is a good choice to divide entities into group so for example colliding enemies doesn't explode or something like that,
- in Rocket.as see this code:

if (collide("enemy", x, y)) {
trace("collision");
FP.world.remove(this);
}

collision detection in one line! This is a good point to flashPunk: developer doesn't have to care of it so much. Sure, need of more testing with many, many entities, but is surely interesting, right?

This is all for now, here
you can find source code of this example, let me know if for you is interesting!

Wednesday, January 13, 2010

Flashpunk

6 commenti



FlashPunk seems to be a young good framework to build game with ActionScript 3. I've read first tutorial and is clear for all that have seen ActionScript 3 like me (see ninja experiment).
First tutorial is short, good and clear: all things that i really desire in this kind of thing.
Reading source code, I've some rapid observation about it: i think that everyone have ever coded a videogame with AS3 can share some thoughts about it (as always IMHO):

- good use of classes, finally: i really don't like AS2, I'm old Object Oriented programmer, welcome Chevy Ray Johnston to this side of programming (dark side?)

- no release notes: this is bad. FlashPunk is young, but without a little help how can someone decide what version is better? How much change from version 0.x to 0.y ? How much to experiment with?

- no bug tracker: only forum. I don't like forum for this, but seems that for someone is working well ( Slick too). A good bug tracker (like Track (used at work in really no-videogame-life)) can help to keep things organized, setting priorities and favorite new developers into young projects,

- Core.as with:
Basic overridable method of update, render and addAlarm (all in AS3 in based on events, keep it in mind): this is good, because force developers to keep logic separated from display things (like in Slick ). Don't waste your time think about it, is ALWAYS a good choice, remember KISS principle?
I don't understand why have here drawSprite, drawRectangle and drawLine in this class: maybe an external class can help?
Note: Core.as depends from only core packages, no external library, this is good

- Entity.as is as creator have define it "Basic game object which can be added to Worlds. They have an x/y position and functions for collision.", with:
x,y in the world (see below), depth of painting on screen.. basic stuff, but wait! There is collision stuff: some brute force method (check against all entities in the world), but also grid approach (see Anotherearlymorning example): this is really good for performance, maybe some test can help to explain power of this approach.
An interesting thing to mention is search-type for collision: coder behind FlashPunk think that search collision with only certain type (player vs enemies, not enemies vs enemies, for example), can help. Good point!
Another good point is Collision Mask support, good to see it!
This class have good idea, but i don't like idea to mix basic information about an entity with collision detection: maybe a different class?

- Actor.as is "A game Entity able to display and switch between animated sprites.", so a little more than an entity that support animated sprite: maybe an Animation class (like in Slick) can help coders, but i like idea to give to everyone a tool to use, without force to use it. Do you want to code your animation framework, lets do it! I see SpriteMap.as that seems to be a sort of Spritesheet support :D
A small bad thing is that i've found into package two Actor.as class file: a bugfix can help :D

- World.as is "A Playing stage that game Entities can be added to. Used for organization, example worlds: "Menu", "Level1", etc.": game state support, with some good ideas: adding a vector to a particular entity, perform a Function to all Entity of a particular Class (Actor for example), get mouseCoordinate. World have is own update and render thing, so all within it is updated and rendered. World.as is a strange object: seems to be a bottle where all entities can go, but have some manipulation methods. I don't like this idea, is not so MVC (that is one of the main pattern for AS3 itself): is better to keep separated bottle from tools, so coders can use any of them.. and this can reduce confusion,

- Acrobat.as is an Actor class with advanced draw capabilities: alpha, scaling, rotating and so on. I don't like this approach: again mixing together render with update. Why not add some Transformation classes with special effects that actor can use?

- TileMap.as is an embrional classes to give support to tilemap. Not linked with any particular format, is just a class to support this kind of things: maybe can be mixed to Grid.as to give a sort of TileMap + Grid collision things? Maybe with quadtree? Ok, it's only an idea :D

- Grid.as: remember collision stuff? Here you have Grid collision support: i like this idea!

- In general comments are enough to understand all, and this is a really good point! Otherwise, there aren't so much logging info about what is going on and no game console (like in Flixel): in this area FlashPunk can do really much more.

I think that FlashPunk is not ready yet to be THE AS3 framework for videogames (not on version 0_73), but is intersting: interestings, good points. Always the same. But much important, documentations!!

First tutorial explain all in a clear way: this can be right start.

VVVVVV

0 commenti


If you are online in this last months sure have read about VVVVVV, a little, incredible game now with a demo .
The idea is simple: player control a man, in a sort of platformer: but unlike Mario or Sonic, you cannot jump. You can "only" reverse "man" relative gravity, let him walk on floor or ceiling.

Terry Cavanagh make a really good job, demo is short to play, challenging player to focus in play, only play: seems to be that there is a story, with some dialogue, but for me is not importa in this kind of game. What i like of VVVVVV is that graphics is simple, music is good, gameplay is well balanced: two level demo can either satisfy you?