tatoswest

http://otomotiffres.blogspot.com/

Tile-Engine Rebirth




It's highly enjoyable remaking old classics of your childhood. but it sure is time-consuming. I'm embaressed to say how long it took to make some of the backgrounds alone. Today I got quite a lot done though.

Check out the Nexus link for some new updates.

You can press Q to punch, and if you're in the elevator room, you can see the doors open too when you press it. I haven't as yet implemented a proper elevator system as of yet(that's probably next) but if you tap Space bar it flips arrays and you can see the next level when you leave the screen.

CODING
First, I got around to rewriting the art/tile based hybrid engine. If you check the Nexus l*ink you can see the little beauty in action.
It wasn't much of a hurdle to code- in fact, I'll post the code here for the newbs.

tile_width=60;
tile_y=50;

myMap = [5, 4, 6, 4, 3, 2, 1, 2, 0];

//myMap is the array for the background. The numbers refer to the corresponding movies. Ah, you'll get what I mean in a minute..It'll probably end up as a 2d array (to deal with levels) but I'm just keeping things simple for now.

myMiddleMap = [[0,10,0,0,0,0,0,1,1,0],
[0,1,0,0,0,0,0,0,0,0],
[0,0,0,0,2,0,0,0,0,0],
[0,1,0,3,0,0,1,1,1,0],
[0,0,0,1,1,1,0,0,0,0],
[0,0,0,0,0,0,1,0,0,0],
[0,0,0,0,0,0,0,0,10,0]];

//myMiddleMap is a double-array that contains references to objects held in movies that combine to create the middle tile layer.

this.createEmptyMovieClip("background", this.getNextHighestDepth());

background.attachMovie("cavetile_" + myMap[current], "cave", background.getNextHighestDepth());

//In the library, my backgrounds are all named like "cavetile_1" "cavetile_10" etc, so all the above line does is check the myMap array to see which one is up, then attaches it to an empty movieclip called background.


for(var i=0;i < style="font-style: italic;">current is a referer to which screen you are actually in.
First we check to make sure the array reference isn't 0. If it is, that means there's nothing to plot, so we do nothing except go to the next tile, 60 pixels further to the right. If we do have a tile that needs to be placed, we give it a name "Midtile" with a number from 1-9. and we position it appropriately by setting its x co-ords to i*the set tile width.

Later on I make sure to replace 'cave' with the new backgrounds at screen change, and remove the previous one when it's out of view, along with all the tiles that are attached to it.

I quite like my little tile engine because it's fairly flexible. Though the mid-tiles have to retain a set width, their height is dependant upon you. Further more, since they're all movies, they can be animated and code put on them.

For example, an invisible wall tile is pretty easy to implement.
When the character runs, before incrementing or decrementing his x position, we check to see if a collision flag has been raised. If so, we disallow any changes. The collision flag check is performed within the tile movie itself. You run a hitTest to see if the _root.hero has collided with it, and if so it returns true and our character stops moving towards it. With most tile-engines, you have to check every frame for a collision, but because the code is inside the tile and not on the main program, it's that little bit faster as it only runs tests after it has been created.

I'm either really smart, or my code is pants and I'm just too dumb to recognise it.
-----------------------------------------------------------------------------------------------
I was thinking about whos faces to use for the undercover agents. In the original, the faces were digitized and probably mates of the programmers, but I figure "Why not just go the whole hog?" and put my favourite actors in there instead. So look forward to seeing Christian Bale, Al Pacino, Di Caprio (haha, just kidding), Christopher Walken, and plenty of others make an appearance. I figure I'm never going to get sued since the game is being made basically just for my entertainment, and if any Ebaum or wherever steals it without my permission for their site then they'll likely be the ones getting the finger pointed at instead. Hell, I'd find it hilarious if I was a famous moviestar and some cheeky Brit used my face for a crappy game.

Well, it'll be a laugh getting to that, but first and foremost I need to get the levels working properly and a tracking system up and running. Did I mention I welcome volunteers? Sigh.This is going to take forever...

Labours of love.
Bollucks. The worst thing that can happen to any programmer happened to me. I know, you're thinking "Your doctor told you you've got 6 months to live". Nope. Worse.

My laptop died. I know, shocking news. What makes it even worse is that it was smack-bang after I had just finished coding a sweet little tiling engine that worked exactly in the way I described in the below post. Oh man, it was so perfect. There I was, rubbing my hands in glee and self-congratulation, and was 5 seconds from saving when I knocked a bottle of wine over the soddin' keyboard. Instant frizz-out. I'm now writing from our new nifty 80 gigabyte 1.6 mhz Dynabook, so, some good things can come from bad.

Oh but Nexus. Shite. I lost all my Poser animation files. The actionscript. Everything I worked for. And none of it was backed-up because, hey, who ever imagines your PC is gonna fry? I mean, maybe your flash memory stick or CD drive but the whole thing. Let's just say I will learn from my mistakes. It takes the piss that I will now have to use a decompiler, and try to salvage whatever crap I can from it. I'm pretty hopeful I'll get the code back, but all the graphics...unlikely.

All for now, folks. Will update you tomorrow on the how's-it-goes.

Yakuza Tattoos

It's usual within yakuza circuits to tattoo themselves, usually is it their clan's badges that they have all over their body. The origin of the yakuza tattoo comes from the Bakuto. They usually tattooed a black ring around the arm for each crime they committed. Finally it became a symbol of strength. It can take over 100 hours to do an entire back tattoo. The tattoo was to illustrate you were unwilling to accommodate yourself to societies rules and norms. Now is it to illustrate your clan affiliations.







Yakuza Tattoos

It's usual within yakuza circuits to tattoo themselves, usually is it their clan's badges that they have all over their body. The origin of the yakuza tattoo comes from the Bakuto. They usually tattooed a black ring around the arm for each crime they committed. Finally it became a symbol of strength. It can take over 100 hours to do an entire back tattoo. The tattoo was to illustrate you were unwilling to accommodate yourself to societies rules and norms. Now is it to illustrate your clan affiliations.







Yakuza Tattoos

It's usual within yakuza circuits to tattoo themselves, usually is it their clan's badges that they have all over their body. The origin of the yakuza tattoo comes from the Bakuto. They usually tattooed a black ring around the arm for each crime they committed. Finally it became a symbol of strength. It can take over 100 hours to do an entire back tattoo. The tattoo was to illustrate you were unwilling to accommodate yourself to societies rules and norms. Now is it to illustrate your clan affiliations.







Yakuza Tattoos

It's usual within yakuza circuits to tattoo themselves, usually is it their clan's badges that they have all over their body. The origin of the yakuza tattoo comes from the Bakuto. They usually tattooed a black ring around the arm for each crime they committed. Finally it became a symbol of strength. It can take over 100 hours to do an entire back tattoo. The tattoo was to illustrate you were unwilling to accommodate yourself to societies rules and norms. Now is it to illustrate your clan affiliations.







Yakuza Tattoos

It's usual within yakuza circuits to tattoo themselves, usually is it their clan's badges that they have all over their body. The origin of the yakuza tattoo comes from the Bakuto. They usually tattooed a black ring around the arm for each crime they committed. Finally it became a symbol of strength. It can take over 100 hours to do an entire back tattoo. The tattoo was to illustrate you were unwilling to accommodate yourself to societies rules and norms. Now is it to illustrate your clan affiliations.







Yakuza Tattoos

It's usual within yakuza circuits to tattoo themselves, usually is it their clan's badges that they have all over their body. The origin of the yakuza tattoo comes from the Bakuto. They usually tattooed a black ring around the arm for each crime they committed. Finally it became a symbol of strength. It can take over 100 hours to do an entire back tattoo. The tattoo was to illustrate you were unwilling to accommodate yourself to societies rules and norms. Now is it to illustrate your clan affiliations.