Wednesday, May 30, 2007

Change of focus, bigger screen size, reached end marker, and dying

So the most important thing I've coded today is the change of focus. This is used a lot to give some visual cues to the player. For example when he throws an arrow, the focus is now on the arrow (until the player decides to moves or the arrow strikes something). It is also used when he activates some lift and we want to show him what he activated. It will later be used when he clicks on the minimap and when we want to show the players the waypoints.

Another important thing is the concept of dying. Well the player doesn't really die. We just reset him to the start position. The player dies when he falls at a certains speed, or (when we have health and damage implemented) when health reaches 0.

I've also increased the screen size to 640 x 480.
And I've made a "very good" sign to appear on the avatars' icon that reach the exit point.
Also I've added the ping that is automatically sent every 10seconds and displayed under the respective avatar. Give's an indication of how much the latency is ;)

Tuesday, May 29, 2007

Mantis bug tracker installed

I needed a central place where to put the number of features being proposed and also the number of bugs that crop up ;). So I've installed Mantis... it's open source and free plus easy to use and installs within a couple of minutes.

I will later give access to anyone who takes part in the development ;)

Fixed some bugs and new help screen

Today I didn't do much as regards to new features. However, I've fixed the following bugs:
- arrow falling from help sign (this was actually funny)
- character not having right characteristics (was using a static variable pfff)
- tile glitch fixing (was moving the tiles with floating point and so some seams where appearing)
- initial speed of projectiles
- no aim for the runner (doesn't need it)
- some minor code cleanup

I've also tried out Sven's idea for zooming out. Ofcourse it was very crude... I just modified _xscale and _yscale of the _root movie, but still got an idea if it would be useful. Let's say that i need to feel it in a bigger level before I take out the guts of the level class to cater properly for this feature. The effect looks pretty cool though ;)

I also created a new help screen. Hopefully it gives a better idea of what keys are to be used and the characteristisc of each player.

Coming up next is the notion of having a focus point for the level. So I can follow an arrow, another player, or show the players where they need to go before they start playing.

Monday, May 28, 2007

ActionScript3, Proxy Servers and Binary Sockets

I tried to show the prototype to a friend of mine, but he cannot do a direct connections. In fact he uses a proxy server for browsing too.

I made a quick search and apparently there are some hints that ActionScript3 supports the CONNECT method which basically uses HTTP to tunnel a connection. Although I'm not really sure how to do this.

Another interesting thing I've learnt is that now in AS3 there are Binary Sockets... (rather than using XMLSocket)

I've also found this blog entry (which is almost 1yr old) of this guy who seems to work @ adobe who has done some class that uses the CONNECT method. Will look into it sometime later on.

If anyone has ever used these or would like to dig deeper on how we can use it for the prototype, leave a comment or send me an email ;)

Exit pointer

I've just implemented an exit indicator which is shown when the exit area is not on screen. It renders itself near the edges of the screen and it also displays the distance the player is from the exit area. Nothing special but gives some bearings to the players ;)

Attachmovie and Graphic type

Be ware when you're using attachMovie(). Make sure that the type of the object you want to attach is actually a Movie type and not a Graphic. Else you will be manipulating _level0 without knowing!

Game sessions,minimap and in-game chat

I have finally updated the server code so proper game sessions are held. Basically when you're playing you don't receive lobby related commands, and when u're in the game you will only broadcast game related messages to your level players only.

Also I have implemented the minimap. It will show the other players' positions with small colored pins. Your pin will be white. For now it is not clickable. However in the future I will make it clickable so the view will jump to where you clicked.

I've also placed the avatars' faces at the top. And whenever someone chats, a speech bubble is displayed under the avatar which talked. Cool :D

Sucky flash comboboxes

I wanted to use combo boxes (aka dropdowns) for when editing a help sign to make it easier to show what the user is selecting (rather than entering 1 for the shooter actor).

The first problem I encountered was the depth of the rendered list when you click on the arrow to the discover the list. It doesn't use the depth of the combobox itself. It somehow uses it own shitty depth which would render behind the tiles in the level. (So that is why I'm pushing them to the side of the help sign so that the lists are visible at least).
Update: this problem has been temporarily solved by swapping the depths of the related tile when entering edit mode, so that it is not hidden under some other tile.

Secondly if I set the selectedindex while i'm loading the level (using a class file and not in a frame coz in a frame it works fine), the selectedindex is set alright, HOWEVER the combobox is not rendered right... it is just blank. WTF!!! So I had to save the selected index value in a temp variable, and when we switch to the editor mode, I set the selectedindex to the temp variable value.

If anyone has some idea why this happens and any solution for this... leave a comment or email me. Don't have time to waste on such stupid things...
on to the next thing...

Saturday, May 26, 2007

HUD mockup

I just made a HUD (heads-up display) mockup. Comments from the artists please ;)

It's shows a chat msg in action.
The minimap area is reserved as well.
The player icon will be marked with some overlay icon when he reaches the exit area.
There will be the names of the players underneath the respective player icon (not shown in mockup).

Sven's zoom in/out idea

Hey Nev,

Have you thought about the possibility of a zoom? This game almost cries out to be able to zoom in and out smoothly according to what u do, like smooth out when you run/walk, and zoom in when u interact with things.

I love this idea... especially for the runner. Since he is much faster, the player needs to view more in order to control the player better. I will keep this in mind for later. But definitely a very good idea.

Help sign

Today i've done the help sign which will be used in the tutorial levels to give hints of what needs to be done.
Basically each help sign has three parts of information:
  1. Actor... who should be doing what
  2. Action... what needs to be done
  3. Where... an arrow points to where the action needs to be done.
I still need to enhance the language that can be described by the signs, but the main idea is there ;)

Friday, May 25, 2007

Not much work today...but some ideas

Today I was busy to finish up some work not related with this prototype :(
The only thing I did for the prototype is to edit a bit the level so it can be played more effectively somehow (i.e. you cannot fall in any abyss :) ... unless you encounter a bug)

But I got some ideas for a better user experience.
  1. Help items. I've noticed that when I show the game to my friends they are like "ok what do I do now?" So I thought of help signs near the level objectives that explain using icons what needs to be done, e.g. icon of exploder, grenade and down-arrow showing where it needs to be placed. When the player moves the avatar near the help sign, a text blob together with bigger icons will be displayed and also what key needs to be pressed.
  2. Improved in-game chat. Somewhere on the screen there will be overlayed the faces of the characters being controlled. When someone types something in the chat field, a text bubble is shown near the face of whoever talked and will fade out after a while. This will save some space hopefully for not having a chat window always being displayed. Ofcourse there will be a history button to see what was said if you missed some speed while doing some action.
  3. Objectives shown at start of level. When the level is loaded, the level is panned smoothly over each objective and in the order in which they need to be done. And finally it will pan to the exit area and after a while it will pan back to the start of the level. This should give a good idea of what needs to be done in this level. Ofcourse this should be done only for the initial levels. As the game will progress, the players will need to discover by themselves what needs to be done.

Thursday, May 24, 2007

Lobby system partially done

Today I worked mostly on the lobby system.
So far 3 users can select with what character they want to play and when the 3 slots are filled, the game is launched.
However for now there is no distinction between the game sessions on the server side when the players are actually playing. I will be doing this hopefully tomorrow before I release the updated prototype.

I've got some bugs in the editor which I want to iron out as well.
Looking forward to show you what I've done this week ;)

Wednesday, May 23, 2007

Started coding the lobby

I've started coding the lobby, but before that I started cleaning up a bit the UI for the login and do some checks server side (like checking if the username is already taken).

So the lobby will basically be a list of what i call game sessions. Each game session will group together 3 players to play in a level. The user will click on the preferred character type he wishes to play with. When the 3 slots of a game session have been taken, the players will be launched into the level.

So far I've only worked a bit on the UI and put on paper the logic and server protocol. Tomorrow it will be implementation day :)

Different characters, arrows, grenades and parachuting

I've just introduced the different character abalities. Each player will choose the player he wants to play with, but for now for debugging purposes I can just switch between them by pressing 1,2 and 3. :)

He jumps high enough to reach a 2 block high platform
He has a bit more acceleration and more speed
No projectiles

He has a medium jump
Medium acceleration and speed
Fires arrows

Explosives guy
He practically doesn't have a jump, but when he's falling he has a parachute so he can reach places where others would die if they try to.
He's a bit slow
Fires grenades

I've improved a bit the graphics for the grenade (including a timer) and also the graphics for the arrow. I've also pasted the static concept art we have for the avatars. They look cool even if they aren't animated yet ;)

I'm going to start working on the lobby system. Need to think a bit before starting coding.

Tuesday, May 22, 2007

Targets and some code tweaks

Today I've put in place targets which when hit with an arrow will operate a tile (like a gate or lift).

I've also tweaked a bit the level class so that I can distinguish easier between tiles that are collidable, targetable, destructable, static, etc

I will be working on different character classes next ;)
Can't wait to get these done, so I can start working on the lobby system which will be a bit of a headache but fun and educational (unless I encounter some other flash bug or undocumented feature)

Monday, May 21, 2007

What's next

Got some feedback from some of you... (i fixed that ladder bug Sven ;) ).
Any feedback is always welcome...

So what's next?
Here are some features that I will be implementing next
- Targets that can be shot with arrows (And which trigger some action, like opening a gate)
- 3 Different character types (one which handles explosives, the runner/jumper, the projectile guy)
- Bigger tutorial level with help blobs
- Smooth movement multiplayer code (to eliminate as much as possible the glitches due to latency)
- Lobby system (where people can match up and play a level together)
- Some minor fixes to the scrolling (need to add the concept of overlays, i.e. not just 1 layer of tiles)

Thursday, May 17, 2007

Prototype testing

So before you visit the link here is what the prototype is about.
- It shows a working scrolling platform level
- Editor mode (but please don't save anything for now ;) )
- Very rough multiplayer server without any smoothing, so you will see some jerking for now.
- Chat client (duuh)

The aim of the mini-level is for the players to reach the exit point (it's just a graphic though... no game-complete check for now). The players right now all have the same abilities, plus just for testing purposes you can keep on jumping as if you're flying... so you can browse through the level at your own pleasure hehe.
To reach the lifts switches, you need to destroy the cracked tiles in the beginning of the level. Switch the weapon to grenades (LSHIFT), and then aim with A and Z and hold and release space. To activate switches press (LCTRL).

Run the prototype...
(If it tells you connection failed, it's probably coz my PC restarted ;) )

Coming up:
- Smooth multiplayer movements
- Mouse scrolling to see the level
- Mini-map
- Different character capabilities.
- Match making

Feather/Hay Particle system

I'm working on a simple game for someone, and I needed to create a particle system for hay / feathers... you know you fall on a stack of hay and puffffffffffffff <atchoooo hayfever hehe>.The particles gravity decreases as time goes by, until they reach a certain speed when falling, and then they start swaying... like feathers do. Pretty cool ;)

Needless to say, I can reuse this code in some other game :D

Also yesterday I tested the prototype with Sven and Alex and there were some glitches but it looks promising. Today I will be working on the prototype so I will send all of you the link for testing as promised.

Wednesday, May 16, 2007

Almost there...

I'm almost there to send you a link to a playable prototype.
I've got lifts activation working over the server and also changing of weapons.

So now I just need to fix some minor bugs and implement the exit point, and then we can meet online to discuss the game when you see it in action :D.

I hope MS kills Flash

Ah man flash is so fucked up.
I have a users list component... and this component doesn't have a removeItem()... but only removeItemAt(index). So I decided to link an array using the dataProvider property. So when I added an item to the array, the list is automatically updated. Then i used splice() to remove items from the array AND SURPRISE SURPRISE, the list component is not updated.
I call this CFUASS - "classical fucked up actionscript shit"... yeah i'm pissed off coz i wasted 30min on something stupid as updating a boring list.

Tuesday, May 15, 2007

Tidying up code

I decided to tidy up a bit the code (but not too much for now :) )...
Basically I moved the server code into a class which extends Flash XMLSocket class and moved the player code into a class which extends MovieClip.

This is the first step so that if someone would want to help in the coding part, he can just use the ActionScript files and I would up them on a CVS server ;)

Tonight I will try to continue on completing the server protocol so all the game language is there (activating lifts, ladder climbin, destruction of tiles etc)

Monday, May 14, 2007

CPU busted... no work today :(

My hard-working Athlon XP 2100+ CPU decided to die on me. Was gonna upgrade to a dual-core but Alex saved me lots of bucks coz i'm now using his retired Sempron. Don't need much CPU power especially since if I'd get more CPU power, that means I can play more games, which in turn means less work :)

No update on the prototype today, however I heard about Microsoft's Flash-killer... Silverlight. Still a long way to kill Flash but it may have potential.

Also I found these tiles at Lost Garden which I will try to temporarily use later on for the prototype.

Saturday, May 12, 2007

Server code update started

I've started working on the update for the java server code.
So far I only added jumping and projectiles support.
Will need to support lifts (activating, hooking), destructable grounds and ladders.

At the end of next week I should be able to send you a link to test it out together. So the week will be a race to elimanate bugs and polish some usability stuff ;)

Thursday, May 10, 2007

Created first level... almost

I didn't work a lot on the prototype today coz of some other work.
So tonight i just wanted to create a dummy level which would use the different stuff i had in mind and when everything is up and running it would be playable cooperatively too.

As I was using the editor I spotted some bugs and fixed them and also started inserting some usability tweaks to make it less frustrating to use :).
One thing that I must implement is selecting of multiple tiles and moving them around.
Another important thing is a mini-map (even for during the game, and not just while editing).

Bugs i need to fix:
- falling at high speeds can miss a collision with a tile
- big with climbing down a ladder that touches the ground (continues to go through the ground :) )

Wednesday, May 9, 2007

Aiming and some bug fixes

I've implemented aiming and strength.
The player can now aim where to throw projectiles (arrows and grenades) by pressing A and Z, and when he's ready to shoot he presses the spacebar to start charging the throw and on release, the projectile will be fired according to the strength given.

I've also done some minor bug fixes, minute details like I forgot to move the projectiles in the scene if I panned the level, destructed tiles where been selected wrongly (was destructing the undestructables ones hehe).

I've also started working on some graphics for the tiles coz I got bored looking at spheres, rectangles and triangles :). I stuck in an avatar from maple story MMO (not animated ofcourse for now). Yesterday night I tried firing up MAX to start working on a chibi character until Ganni makes a cool character, but damn it I forgot everything in MAX argh. I'm happy using the current avatar for the time being rather than waste hours to do something really ugly in 3d :)

Above is the first screenshot with pre-alpha graphics, everything is temporary.
Below is the game in level editor mode.

You can barely see the cross hatches to highlight the corners of the tiles. To the right you have the currently available tiles and you simply select the tile you want to place and just click where you want it to be.

Coming up next is a semi-decent playable level, then I will re-visit a bit the server code and then I can post the link here for you to see the prototype in action.

Tuesday, May 8, 2007

Ladders, projectiles and destructable tiles (with grenades)

It was a very productive day today...
I've implemented ladders, and projectiles (arrows and grenades), together with destructable ground (i.e. tiles).
Started to subclass the MovieClip class for the projectiles. Should make the code much more maintainable. I'll probably port the avatar code to use the same technique rather than code placed in frames blehhhh.

Will start coding the controls for firing a grenade/arrow :D

Level scrolling, edit mode, collision detection, lifts

It's been a while from my last post. I was busy perfecting the scrolling and going round the stupid bugs found in actionscript (besides other things like meetings with companies). I really got frustrated when i found missing important documentation to be found in some forum or when the native methods don't behave as they should.

Anyways, now I have level scrolling in place and also moved the editor inside the game, so the user can switch to edit mode while playing and add/change tiles on the fly and see how the level will feel. Pretty cool :D

The avatar is currently only a sphere graphically :$ but you can move him around and jump around. Collision detection with tiles have been put in place. I've also created a lift which is activated by a switch.

Coming up are ladders, projectiles and destructable tiles (with grenades)