Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411522 Posts in 69377 Topics- by 58431 Members - Latest Member: Bohdan_Zoshchenko

April 28, 2024, 12:29:05 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsThe Excavator 2010
Pages: 1 ... 5 6 [7] 8 9
Print
Author Topic: The Excavator 2010  (Read 32446 times)
BadgerManufactureInc
Guest
« Reply #120 on: October 25, 2009, 10:12:34 PM »

                                                                      Vector pixel art by Bones


Those new sprites look awesome, Bones! Nice Hand Pencil Can't wait to make a routine for the boss moving apart like a transformer.. Also more bullet spawning routines to compliment your other sprites.  Then.. level 2.

Im really pleased with the way things are shaping up. After a very good day, and the start of a productive collaboration, things are certainly looking good.

I think we're approaching the pixel/bullet hell I was hoping for at last. Here is the demo in full stress-test mode:

« Last Edit: October 27, 2009, 05:06:50 PM by BadgerManufactureInc » Logged
BadgerManufactureInc
Guest
« Reply #121 on: October 26, 2009, 09:17:42 AM »

I am going to calm down the stress tests that I have done now, and make the bullet spawning less frequent.  I'd also like to achieve 60 frames/second in the final build.

Next up some more code.. Bullets again.

It's funny, I never found maths dull at school; the appliance of logic to fields such as problem solving, and the philosophy of thinking logically and efficiently within always appealled to me on the creative level too.

So you know, I actually find these code posts just as much fun as talking about the game itself, as the two processes of code and design are inseperable in some engines.

Ok here is my code that generates bullets atm..

Code:
// ENEMY BULLET SPAWN 
 if(bullettimesinceshot[mvctr]==bulletfrequency[mvctr])  //time to shoot
 {
   if(bulletsfired[mvctr]<100)
   {
    // enemy type 1 fires 1 bullet at a time
    bulletsfired[mvctr]+=1;
    bullettimesinceshot[mvctr] = 0;
    bullet_xco_array[mvctr][bulletsfired[mvctr]] = tempObject.x;
    bullet_yco_array[mvctr][bulletsfired[mvctr]] = tempObject.y;   
    var xdiff:Number = tempObject.x-charObj.x;
    var ydiff:Number = tempObject.y-charObj.y;
    xdiff=(xdiff/1000)/ydiff; ydiff=(ydiff/1000)/ydiff;
    if((charObj.x>tempObject.x) && xdiff<0) { xdiff*=-1;}
    if((charObj.y<tempObject.y) && ydiff>0) { ydiff*=-1;}
    bullet_xv_array[mvctr][bulletsfired[mvctr]] = bulletspeed[mvctr]*xdiff*1000;
    bullet_yv_array[mvctr][bulletsfired[mvctr]] = bulletspeed[mvctr]*ydiff*1000;
    albullpoint.x=bullet_xco_array[mvctr][1];
    albullpoint.y=bullet_yco_array[mvctr][1];    
   }
  }

I need to start defining new bullet spawn code for each alien type, ok here goes.. I want to start making code that spawns 8-way firing, each bullet going out at 45°.  We have already designed a rudimentary bullet spawn for the first alien type.  Now for the second alien type.

Earlier in my program I have made use of cached circular velocities, one dx and dy pair for each angle (360° all in), as such:

Code:
// CACHED ANGULAR MOVEMENT VALUES
function createRotationArray():void
 {
   alienAnimationArrayLength=360;
   var rotation:int=0;
   for (var ctr:int=0;ctr<alienAnimationArrayLength;ctr++)
   {
    var tempObject:Object={};
    tempObject.dx=Math.cos(2.0*Math.PI*(rotation-90)/360.0);
    tempObject.dy=Math.sin(2.0*Math.PI*(rotation-90)/360.0);
    aRotation.push(tempObject);
    rotation+=1;
   }
}

Later we make use of these stored values (where temp is the angle):

dx=(aRotation[temp].dx); dy=(aRotation[temp].dy); 

engine source material: 8bitrocket.com

Now these rotation velocities stored in this rotation array can be re-used for the bullets (normally Ive been using them for moving the actual aliens themselves).  Here goes:

Code:
//REM 8-WAY!! We'll need 8 lots of 45° angles.
if (enemytype==2)
{
 for(var eightwaycount:int=1; eightwaycount<9; eightwaycount++)
 {
  var angle:int = eightwaycount*45;
  if(eightwaycount!=5) // <- no need to draw a bullet center of alien
  {
   bulletsfired[mvctr]+=1;
   bullettimesinceshot[mvctr] = 0;
   dx=(aRotation[angle].dx); dy=(aRotation[angle].dy); 
   bullet_xv_array[mvctr][bulletsfired[mvctr]] = dx;
   bullet_yv_array[mvctr][bulletsfired[mvctr]] = dy;      
  }
 }
}


Code:
//CREATE 'LAZER2' OBJECT
var lazer2:Lazer2;
var lazer2Holder:MovieClip;
var lazer2Animation:Array=[];

var lazer2BD:BitmapData = new lazer2(1, 1);

// CACHE ANGLED LAZER BULLETS
function cacheBullets(e:TimerEvent):void
{
var lazer2Bitmap:BitmapData=new BitmapData 2,10,true,0x00000000);
lazer2Bitmap.draw(lazer2Holder,new Matrix());
lazer2Animation.push(lazer2Bitmap);
animationCounter++;
lazer2.rotation+=1;
}


// Need a new array for bullet type

canvasBD.copyPixels(lazer2Animation[bulletworldangle],lazer2.rect,lazer2point,null,null,true);



Shouldn't be too much harder than that, at least I hope so anyway. There, that was fun, right? lol  Smiley I should have noticed the rapidly diminishing audience once I got to line one, when I mentioned 'CODE'!!!

 Corny Laugh
« Last Edit: October 26, 2009, 11:02:49 AM by BadgerManufactureInc » Logged
BadgerManufactureInc
Guest
« Reply #122 on: October 27, 2009, 03:17:26 PM »

8-way firing is coming along well.  As another bonus, it can be extended later for spiralling bullets etc.  I havn't yet drawn them as lazers, coming soon though.

Logged
BadgerManufactureInc
Guest
« Reply #123 on: October 27, 2009, 04:20:33 PM »

8-way is almost ready....

« Last Edit: October 27, 2009, 05:17:14 PM by BadgerManufactureInc » Logged
BadgerManufactureInc
Guest
« Reply #124 on: October 27, 2009, 05:41:36 PM »

I'm still working on the bullet spawning code.  I've really locked the frame rate down to a smooth 50 frames a second now, as far as I can tell it's a lot smoother, but whether there'll be that many bullets I don't think there will.

I want to have some get smaller as they move outwards, and others rotate around or even morph.

There is a bit of an issue with trying to keep track of them all now, and sometimes they seem to be disappearing before exiting stage.  At least things are moving on, and I'm trying to remain optimistic.

I'll put a new demo up soon.

« Last Edit: October 27, 2009, 06:32:43 PM by BadgerManufactureInc » Logged
BadgerManufactureInc
Guest
« Reply #125 on: October 27, 2009, 09:09:04 PM »

I've given a 3rd enemy an attack pattern.  I am going to make some of the bullets rotate as they spiral outwards next.  Until I have that done, I'm not moving onto anything else, though I have got an amazing idea from Bones to try out as soon as that is done.

We have a new designer on board, who has come up with an interesting way to tie the concept of Excavation into some awesome gameplay.  More to follow.



Solid fill aliens:

« Last Edit: October 27, 2009, 10:37:23 PM by BadgerManufactureInc » Logged
Bones
Level 10
*****


3 Months Sober


View Profile WWW
« Reply #126 on: October 27, 2009, 09:34:48 PM »

BRICKS!


SHIPS!
Logged

Sit down and relax,
Keeping focus on your breath,
This may take a while.

BadgerManufactureInc
Guest
« Reply #127 on: October 27, 2009, 10:57:10 PM »

And here's Bones' lazer art so far:

Logged
BadgerManufactureInc
Guest
« Reply #128 on: October 28, 2009, 08:16:38 AM »

Ok, I think I overdid it a bit yesterday, not sleeping as much as I should be but loving this development so far.

BRICKS are going in later, as per Bones' idea (our new gameplay designer) now that I feel ok enough, I was so tired yesterday that I went on auto-pilot.

 :D

How about a creature that walks left and right on top of the bricks, jumping to safer columns as they are destoyed mid fall? lol, lets just get the bricks in fisrt though haha.

« Last Edit: October 28, 2009, 11:59:00 AM by BadgerManufactureInc » Logged
Bones
Level 10
*****


3 Months Sober


View Profile WWW
« Reply #129 on: October 28, 2009, 08:54:34 AM »

I'm skeptical about adding white to objects... But I think it could work out for effects, I think im going to change the missiles and make them just green with no white.


« Last Edit: October 28, 2009, 10:35:36 AM by Bones » Logged

Sit down and relax,
Keeping focus on your breath,
This may take a while.

BadgerManufactureInc
Guest
« Reply #130 on: October 28, 2009, 11:56:17 AM »

Bones, the sight of your artwork almost brings a tear to my eye  Tears of Joy I mean, eye candy to greet me from returning after shopping!!

No seriously, things are moving on at an astonishing rate, I'm really feeling the flow of creativity too man, and bricks are coming this way very soon Smiley

Just been getting i the mood as I get ready to start coding up some more alien dat.  Here is a shot from the C64 game NARZOD, a vector classic from the vaults with awesome soundtrack:



Gone, but never forgotten...

Okay, I am reasonably rested; everything that I need to do in the immediate future has been done, so time to get coding once again!!

I'm working on adding bricks.

I'm defining them as a special kind of enemy that has unique moving and spawning code, to allow for finer adjustments when we get past the simplicity that I plan on first time around.

Should be fun to start blasting 'em!  Especially with those nice new lazers.   Pixel heaven!

« Last Edit: October 28, 2009, 12:05:57 PM by BadgerManufactureInc » Logged
BadgerManufactureInc
Guest
« Reply #131 on: October 28, 2009, 12:38:07 PM »

Been checking out some more gameplay ideas, here's another from C64:


Moon Shuttle
Logged
BadgerManufactureInc
Guest
« Reply #132 on: October 28, 2009, 02:17:18 PM »

Bricks are in!! Im totally with you on this great idea Bones.. cant wait for you to try it. It feels really claustraphobic under the falling tiles!!



I also found time to put some of the new gfx in too.  All is coming together now.

« Last Edit: October 28, 2009, 02:22:12 PM by BadgerManufactureInc » Logged
BadgerManufactureInc
Guest
« Reply #133 on: October 28, 2009, 02:40:54 PM »

I have made the new features playable on this mini-demo:

http://www.badgermanufacture.com/The_Excavator_091029.html
Logged
Bones
Level 10
*****


3 Months Sober


View Profile WWW
« Reply #134 on: October 28, 2009, 02:42:35 PM »

Okay, by the looks of it your cube placement is a little off.
It seems like are re-using the top section for each cube though I could be wrong.

Your example kind of looks like flat shields that you are breaking through as supposed to cubes.
I hope my example can help clarify how I meant to stack the boxes.
Floating boxes are fine, as the platform idea came to be this morning, it's just an idea for some scenery.

But none the less, I look forward to more as breaking just that small wall was fun.
Though the sound effect for the wall break seems a bit off its fun to smash the wall, I noticed you cant shoot, the side boxes.

Also, one of the enemies bullets are backwards, and it looks funny.
It's the bullet that is in the new screen shot you posted.

« Last Edit: October 28, 2009, 02:47:35 PM by Bones » Logged

Sit down and relax,
Keeping focus on your breath,
This may take a while.

BadgerManufactureInc
Guest
« Reply #135 on: October 28, 2009, 05:36:27 PM »

http://www.badgermanufacture.com/The_Excavator_091029.html
« Last Edit: October 28, 2009, 06:57:53 PM by BadgerManufactureInc » Logged
mokesmoe
Level 10
*****



View Profile WWW
« Reply #136 on: October 28, 2009, 07:51:06 PM »

When you destroy the front block, you don't see the fronts of the blocks behind it.
Logged
Bones
Level 10
*****


3 Months Sober


View Profile WWW
« Reply #137 on: October 28, 2009, 09:55:59 PM »

Yea, I established that issue with him already.
Apparently the cube idea is lagging the engine. Sad


So, bigger tiles are apparently the solution.
Logged

Sit down and relax,
Keeping focus on your breath,
This may take a while.

mokesmoe
Level 10
*****



View Profile WWW
« Reply #138 on: October 28, 2009, 10:28:49 PM »

You can't just have overlapping tiles?
Logged
Bones
Level 10
*****


3 Months Sober


View Profile WWW
« Reply #139 on: October 28, 2009, 10:44:46 PM »

It should be possible, I think Badger was confused about the overlapping objects.
As they aren't "tiles" they are sprites, with actions there for an object.

I tried to explain it to him, I hope he figures it out I have faith.

In the meantime some ideas I've been trying to play with the "cube" wall.
I picture a snake to be in a box, and when shot it is released.
Also not sure if I like the revision I hav done to the mini-boss, I may have lost coherency in the style.
Logged

Sit down and relax,
Keeping focus on your breath,
This may take a while.

Pages: 1 ... 5 6 [7] 8 9
Print
Jump to:  

Theme orange-lt created by panic