Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    271
  • comments
    969
  • views
    189641

The Promised Entry....

Sign in to follow this  
Sir Sapo

121 views

Hey everyone, I'm here to deliver the in-depth post I promised earlier today.

As always, here's the updated Angels 20 Worklist:

Angels 20 Feature WorkList
-An Actual Front-End Menu
-A Map of the Level on the HUD
-Good MIG AI
-Destructable Tiles
-A checklist of enemies on the level
-Repair Trucks that actually have to stop to repair stuff
-Ground Vehicles that can shoot at you
-More weapons (ie. Napalm, Cluster Bombs, etc)
-Fully Automatic Gun
-Forward Supply Bases
-More mission parameters (ie. timelimits , targets , etc)

As you can see, I've scratched out two new items, the destructable tiles one, and the enemy checklist one.

I'll go over the checklist one first (because it's boring and pretty much useless). Well, I made some functions in my level class that count the number of each type of enemy, and then it finds out how many are left and displays it like so:

[Light Flak Image] 0/2
[Medium Flak Image] 1/3
[Heavy Flak Image] 0/0
[SAM Site Image] 3/3
[JEEP Image] 2/4
[Tank Image] 0/0
[Control Tower Image] 0/0

It's kind of cool i guess, but I will probably only use it in the pause screen, so you can see what's left.

Anyways, I'm too lazy to take a screenshot of that, but you can imagine what it looks like right?


Now onto more exciting and cool stuff, mainly, destructable tiles. In the first version of Angels 20, when a tile was destroyed, it was switched to a crater-type tile and it's image and collision height were changed. That was okay looking until buildings started blowing up, and all that's left is a hole in the ground. So I came up with a genius solution to the problem, which was explained in this journal entry. Essentially, the tile texture is split into two parts, one for good tiles, and the other for destroyed ones. Then, if the tile is destroyed, the destroyed texture is shown, not the good one. Anyways, Mark pumped out replacement textures for the entire Tropical Tileset, and I plopped them into the game, rewrote some stuff, and after a few problems with texture borders, BAM!!! stuff could be destroyed rightly. The effect is pretty cool looking, as you can see in the before and after screens below. Note: I used the games native 1024x768 resolution so you could soak it all up in high resolution, but if it annoys you guys, I'll put them as hyperlinks.


Generic Cuban Town #1 Before Bombing


Generic Cuban Town #1 After Bombing


Look at the devastation... it makes me want to throw up...[grin]

Mark came up with the idea that we could add multiple levels of damage, so that you could slowly wittle a building down to it's foundation, and I'm willing to program that if he want's to do the extra art. Anyways, tell us what you think of the effect.

In other news, I finalized the story for the game today while I was at work. While I don't want to give anything away, the game takes place in ~2010, and there's lots of political intrigue going on that you can catch in the cutscenes if you're sharp.

Speaking of cutscenes, I'm not sure how I'm going to do those. I'm sort of leaning towards making a type of script file that the game can read, where you define entity images, sound files to be played, etc. It would also allow other users to make their own custom cutscenes which I think would be pretty cool. Either way, I'll have cutscenes in the game, even if I have to hardcode them all in by hand[grin].

I don't think adding firing vehicles into the game will be very hard, I'm pretty much just taking the firing code from the Flak class and strapping it onto the Repair Truck code. The flak firing code is actually very simple (things tend to get better after you rewrite them 4 times:D). It is all self-contained, so you only have to add one more function call to get it to damage the player and whatnot. It consists of a struct called Bullet that looks like this:


typedef struct{
double x;
double y;
double speed;
double angle;
bool active;
}bullet;






Then, I add this bit of code to the objects Update function.


double prange = (xpos - playerx)*(xpos -playerx) + (ypos - playery)*(ypos -playery);
prange = sqrt(prange);

if(prange < range && !bullets[0].active)
{
bullets[0].angle = (atan2(playery - ypos , playerx -xpos ));
bullets[0].speed = bulletspeed;
bullets[0].x = xpos;
bullets[0].y = ypos;
bullets[0].active = true;

}







Then all I have to do is call a function called didBulletCollide(double playerx , double playery) that returns 0 if the bullet didn't hit, or it returns the damage value if it did. It may sound complicated, but it's very simple.

Adding more weapons is going to be a bit more complicated, but I'll talk about that tomorrow. Hope you enjoyed the post!!

Dont Forget To Try Out The New Version Of Angels 20

Sign in to follow this  


1 Comment


Recommended Comments

Mi Dios... la 7-11... porque... porque?!!!

Anyway, The destructible tiles look great in-game, although, Sapo,
you need to use the "empty lot" texture I made (I'm not sure I made a destroyed version, though). I also need to make the basic ground
tile more destroyed- it looks like the grass just turns brown, not bringing the full effect of getting the crap blown out of it. Good
thing I made those craters, then.
Also- does anyone know if "7-11" uses a masculine or feminine article in Spanish?
Have a nice dia, or something.

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
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!