-
Can you tell us a bit about your isometric scrolling engine ?
Here are some more details about the engine: it is a really
difficult exercise as the engine is quite packed with functions,
and is a lot Object oriented, so it is difficult to explain it an
"organized" way - However here it is:
class.hero
Holds inventory (that basically holds all stats for the player)
Holds the reaction timer for the player ( it was planned first to
adapt the player speed to the terrain )
The movement is handled this way :
AC_Hero.prototype.Movement = function()
{
if(Key.isDown(Key.UP))
{
this.moveLegal( 0,-1,2);//see comment
this.anim.play();
this.direction="attackup";
this.gotoAndStop("UP");
}
(...)
};
where moveLegal(); checks the state of the next tile :
AC_Hero.prototype.moveLegal = function(x,y,o)
{
if(this.world.getTileWalk(this.set.x+x,this.set.y+y))//see comment
{
this.world.setTileLibre(this.set.x,this.set.y,true);//see comment
this.isoPlace(this.set.x+x,this.set.y+y,o);
this.set.x += x;
this.set.y += y;
this.world.setTileLibre(this.set.x,this.set.y,false);//see comment
if(o == 2) {this.world.scroll(x,y);} //see comment
}
};
Where getTileWalk must be to true, then setTilewalk will set the previous
tile as walkable ( so that enemies can include it in their pathfinding
) and will set the newly occupied tile as False - then the map will
scroll :
TBW.prototype.scroll = function(x,y){
this.settings.majorx += x;
this.settings.majory += y;
if(x>0){
this.screen.tiles._x -= this.settings.twidth*x;
this.screen.tiles._y -= (this.settings.theight>>1)*x;
this.remCol(this.settings.majorx-1,this.settings.majory);//see comment
this.addCol(this.settings.majorx+this.settings.vwidth-1,
this.settings.majory);//see comment
}
(...)
};
where remCol and addCol (and their counterpart remRow & addRow)
will remove the last column (or row) of the opposite direction the
player is taking ...
- Did you use any particular "optimization tricks"
in the engine ?
The isometric engine has been written by Ed Mack: an open source
version exists on his site and is ready to be dowloaded. Basically,
it stores all the components in a 30*30 array, then shifts rows
and columns to bring the 10*10 area on screen. This allows the engine
to work fast, and gives the player the feeling of 'discovering'
the map as he walks.
- Did you develop special tools for map editing ?
Well, in fact I'm using a slightly edited version of Klas
Kroon's tilemap editor : most of the code was already there,
so I didn't have to work a lot to adapt it to the game, and, I wanted
to spend most of the time on the game, not on the editor.
Eventually, I'm thinking about publishing a more advanced editor
online. It would allow players to publish their own maps and scenarios
on the web, in order to have other players play them. I'm not totally
sure about the future of this : are players ready to become involved
in supporting a Flash game the same way they do with other games
? How can quality map design and gameplay be guarenteed? should
Two Kingdoms' graphics be editable too ? There are a lot of questions
...
- How did you manage the level data ? Do you use a server
side database ?
Level data is stored in XML files: map geography, exits, enemies
locations and stats, objects, etc .
Two Kingdoms uses a database only to store players' profiles (stats,
questbook, location and inventory) and savegames (the game allows
you to save your progression at specific savepoints).
It was a concern, in the event of heavy traffic, to limit the database
interaction as much as possible.
- What about sound fx and music? Did you use sound libraries
or did you also produce some of the fx/music ?
I used various libraries for the sounds effects, but I'm aware
that the game is still somewhat low on sound fx design. I will correct
this for the second book.
The music has been made by an incredibly talented artist: Justin
R.Durban (www.edgen.com).
The music wasn't specifically composed for Two Kingdoms, but as
soon as I heard it, I knew it captured the mood I was looking for.
Justin has recently granted me access to more songs that are excellent
and that will be featured in the cutscenes and the second 'book'
of Two Kingdoms, around Summer 2004. I think that for an RPG, music
is extremely important, as it contributes to creating a climate
for the game.
- Which were the games that most influenced "Two Kingdoms"
?
The reference to Warcraft II is quite obvious, Two Kingdom's name
might as well be "adventures of a Footman in Azeroth"
!
I'm a big fan of the Warcraft series.
Of course, I played a lot of 'Diablo II' and 'Baldur's Gate' as
well to get ideas on what was cool about an RPG.
Finally, I play the GameBoy Advance, 'Lord of the Rings: the Two
Towers' game extensively and Isurely got a lot of inspiration from
that too.
Movies like the LOTR trilogy have also been a great inspiration
source for visual elements: I am planning a 'Minas Tirith invasion'-like
scene in the second book of Two Kingdoms !
- What were the difficulties (if any) that you had to overcome
during the development ?
The lack of a single coder who followed the creation of the entire
game was the biggest difficulty. I'm not good enough in AS to find
my way alone on the most difficult questions. Actually, a lot of
gameplay elements (magic, an advanced fight system, some character-to-tiles
interaction ...) are waiting to be developed in the second book
of Two Kingdoms -- not even talking about some multi-player elements
;)
Staying focused on the project was also difficult. This year a
lot of great quality games/engines have been released in Flash and
I was still working on my 'old' project while a lot of exciting
things where happening all around me. I think that doing, and finishing,
an RPG in Flash makes one become a bit monomaniac !
- Do you have any wishlist for improvements in the next
version of Flash ?
For coding, Well, a debugger, I mean, a real one, would be great
!
For animation, I wish that Macromedia would find a way to integrate
Bones structures ( for now, animating sections of a character is
soooo painful ! )
And, of course, more speed, less resource for the player, and maybe,
let's dream, some 3D support.
|