Sign in to follow this  
  • entries
    271
  • comments
    969
  • views
    189144

I'm Back!!!!

Sign in to follow this  
Sir Sapo

127 views

I'm back all my loyal fans, stop your mourning.

How is everyone? I've caught up on my journal reading and it seems like everyone's doing well (except for Pouya who obviously hates his job almost as much as his boss's hate him). Anyways, in my computerless solitude, I had nothing to do gameprogramming-wise but write down ideas in my notebook. I initially wrote down some stuff about A20, and fleshed out the story but I soon became bored with that, so I built a model. Anways , while I was building my my awesome wood model of a P40 fighter, I started thinking about the 4E4. I had considered doing an entry for the contest earlier when it was announced, but I decided not to so that I could focus my efforts on Angels 20. But while I was building my model , ideas kept popping into my head, and I decided that since I could see the end of the tunnel with Angels 20, I should enter the 4E4 with a simple little game that I could use to learn some more OpenGL and lay down a framework for the next game we make in the A20 universe.

So I began to write down ideas, a storyline, and I drew a guy with a gun(WEEE!!!). The next day, both of my parents went to work for a while and I couldn't stand just writing abstract ideas down on paper, so I started programming a little. I initially just wanted the game to be a simple little topdown shoot'em up where the player is in the middle of the screen and enemies come from offscreen and you shoot them endlessy. I started coding some classes I would need later such as a Player class, Enemy class, etc, then I realized that I didn't know how to make the world continuous (you could move the player around, and the screen moved with you, but I wanted no noticeable boundaries). In order to combat this, I started coding a tile engine, during which I had even grander ideas. Anyways, about an hour later, I had a pretty good length design document and a story to go along with it. Below are the current features for the engine so far:

-large tile-based maps (done)
-Lots of enemies with support for cool abilities, like stealth(done)
-Switches that can change a certain tile to a different type, (i.e a wall tile to a floor tile).
-Monster Generators that spawn plenty of bad guys (~50% done)
-Dynamic AI that changes from a modified A* to my custom AI depending on the situation (done, I think, haven't tested the A* yet)
-Tiles have special attributes such as damage if the player touches them(ie.lava).(done)
-Support for plenty of weapons with differing attributes(ie. poisoning , splash damage, accuracy, range) (done-ish)
-"Pain in the ass to draw"(read artists log below) animation scheme that uses 1 texture for animation.(done)

I'm very happy with how the project is coming along, and I have decided to name the game Mojave(who can guess the reference, its not that hard). The story deals with intrigue, betrayal, love(kidding), but will really only be visible during world transitions, the beginning ,and end of the game; any other time its just shoot shoot shoot run run run. I have come up with a story that includes all 4 elements into the game , and adds some more (why aren't aliens on the list?).

The A* Algorithm has been giving me the most trouble so far as it is the most advanced AI technique I have tried to use so far. I decided to not use a full-up A* algorthm for pathinding, but instead use my own half assed version which you can see below. It doesn't find a full path, it only takes an educated guess at what tile to move to next. If anyone(that means you NickGeorgia) has anything to say(constructive, I know its not the best idea ever) or suggest about this scheme, please let me know.


typedef struct
{
int x;
int y;
int type;
int cost;
int manhattencost;
int totalcost;

}AStarNode;

AStarNode destination;



void AStar(int tiletypes[100][100] , double targetx , double targety)
{
AStarNode adjacentnodes[8];
AStarNode currentnode;
int lowestcost;
int goodnode;

currentnode.x = (int)(xpos/2);
currentnode.y = (int)(ypos /2);
currentnode.type = 1;
currentnode.cost = 1;

adjacentnodes[0].x = currentnode.x -1;
adjacentnodes[0].y = currentnode.y -1;
adjacentnodes[0].type = tiletypes[adjacentnodes[0].x][adjacentnodes[0].y];
adjacentnodes[0].cost = 14;

adjacentnodes[1].x = currentnode.x ;
adjacentnodes[1].y = currentnode.y -1;
adjacentnodes[1].type = tiletypes[adjacentnodes[1].x][adjacentnodes[1].y];
adjacentnodes[1].cost = 10;

adjacentnodes[2].x = currentnode.x +1;
adjacentnodes[2].y = currentnode.y -1;
adjacentnodes[2].type = tiletypes[adjacentnodes[2].x][adjacentnodes[2].y];
adjacentnodes[2].cost = 14;

adjacentnodes[3].x = currentnode.x +1;
adjacentnodes[3].y = currentnode.y;
adjacentnodes[3].type = tiletypes[adjacentnodes[3].x][adjacentnodes[3].y];
adjacentnodes[3].cost = 10;

adjacentnodes[4].x = currentnode.x +1;
adjacentnodes[4].y = currentnode.y +1;
adjacentnodes[4].type = tiletypes[adjacentnodes[4].x][adjacentnodes[4].y];
adjacentnodes[4].cost = 14;

adjacentnodes[5].x = currentnode.x ;
adjacentnodes[5].y = currentnode.y +1;
adjacentnodes[5].type = tiletypes[adjacentnodes[5].x][adjacentnodes[5].y];
adjacentnodes[5].cost = 10;

adjacentnodes[6].x = currentnode.x -1;
adjacentnodes[6].y = currentnode.y +1;
adjacentnodes[6].type = tiletypes[adjacentnodes[6].x][adjacentnodes[6].y];
adjacentnodes[6].cost = 14;

adjacentnodes[7].x = currentnode.x -1;
adjacentnodes[7].y = currentnode.y ;
adjacentnodes[7].type = tiletypes[adjacentnodes[7].x][adjacentnodes[7].y];
adjacentnodes[7].cost = 10;

for(int i = 0 ; i < 8; i ++)
{
if(adjacentnodes.type < 5)//any tiles > 5 are unwalkable
{

adjacentnodes.manhattencost = abs(10*(((int)targetx-currentnode.x) +((int)targety-currentnode.y)));
adjacentnodes.totalcost = adjacentnodes.manhattencost + adjacentnodes.cost;

if(adjacentnodes.totalcost < lowestcost)
{
lowestcost = adjacentnodes.totalcost;
goodnode = i;
}




}
}

destination.x = adjacentnodes[goodnode].x;
destination.y = adjacentnodes[goodnode].y;



}





Anyways, thats really all I have been up to, and you can expect more details in my next entry. Until then , you guys can occupy yourselves with this. It's a little tool I made to help Mark the artist see what his sprites would look like when animated in game, and now it's available for all to see, use , and laugh at (sorry, its hosted from geocities, I cant FTP to my server right now). The animation may look jerky, and thats because... it is, and I drew the weightlifter man. From a top view, 3 frames of animation should be fine, because all that really changes is the feet of the character.

Mark drew up the logo for our little team (S-Cubed Studios), as you can see below, along with his artist log entry.



Sorry, its also on geocities.

Without further ado, here is the (as always... *sigh*) unedited artist log from Mark teh 133t artist[/sarcasm].

Hey, it's me, the unstoppable Mark the Artist. Today Thomas actually requested I right
this update, probably because his part of the post is going to suck because he's going to
spend most of it whining about how he missed his computer. So I'll try to compensate
with my immense personal charm, like I usually do. Nothing too exciting this week
except I made a new S3 symbol, for the uninitiated S3 is the name of our software
company (it's short for S.S.S., which itself is short for... well read the darn thing).
I preserved the basic original color scheme to the extent I could, the original used Sapo's
favorite color scheme, default MS Paint red with default MS Paint green (see why I'm the
artist?). It looks Ok for now but I still need to mess with is, messing with the S's and
possibly changing the colors.
I really haven't been able to work a lot, because I'm now taking Driver's Ed (it's not
offered at my school during regular times anymore) in the afternoon, which Leaves me
three less hours a day to help the starving quadriplegic Somalian orphans with Aids that I
usually dedicate my afternoons to. And Angels 20, less time for that, too. I plan to spend
the spare times in class sketching maps for the multiplayer portion of A20.
By the way, Sapo's extremely short attention span has yet again taken over his decision
making, because he is planning another game. It's a top down shooter which he has
probably described in excruciatingly minute detail somewhere in this journal entry. My
only worries for are that the 256 by 256 tiles are going to be a bitch to draw, given that I
had a hard enough time making the jungle tileset for A20( which are 40 by 40). Maybe
drawing floors will open my eyes to a whole new world of mind-numbery, or it could be
fun (but probably not). It will be fun trying to set up the story and characters, though.
Reanimated Nazi Pirate Cyborgs will be fun to draw in any case

[/artist crap]

Well, I think I have fulfilled my promise a a large post on my return, and I will see you guys later, its time for me to get on Xbox Live for some Hal... voice conferencing with the artist.

BTW if anyone who reads this wants to play Halo 2 or something, my gamertag is Sir Sapo. Just send me friends request saying you're from GameDev.
Sign in to follow this  


2 Comments


Recommended Comments

I'll be pretty busy at work Sapster this coming week and tomorrow so I don't think I will be able to do any more tutorials till then. If you can hold on that long I will try... unless of course more difficult tasks falls from the heavens. For now, read this. Anyway glad to have ya back.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now