Saturday, October 23, 2010

The generator is now DIAMONDS

I'm improving my generator to do the following:

-Circular earth
-Other Shapes
-Be able to spawn any hole at any point
-Create any shape on the plane

I want this to be versatile as possible!

So far I got this:
Each one of those is a tile, this is all generated, it's pretty but no where near done.

Tuesday, October 19, 2010

Updates to come!

I'll put a + with what has been done and is still broken and a minus what needs to be done/bugs, * will indicate what I will add in.

Red is done.

+ Mechs have individual:
++ HP is your own character and armor on mechs are seperate
++ New UI for mechs
++ Jump will use fuel
++ Moving will use fuel
++ Flamer will use fuel
++ Mech run faster than people
++ Mech Jets are better
++ Mech Armor ranges from 1-1500
++ Mech Fuel ranges from 0-5000
++ Mech Ammo ranges from 0-500

++ Digger will use ammo
(Need to link the new stats to the code)
** Each ore you collect adds: **
*** Dirt gives: 10 ammo and 10 Fuel
*** Tin gives: 50 Fuel ***
*** Gold gives: 250 Fuel ***
*** Diamond gives: 500 Fuel ***
*This is temporarily until I have a crafting system

++Slowed peoples jetpacks
++Slowed peoples runs speed

++Updated Help

// Todo List
++ Getting hit will deduct armor, not HP
++ Mechinegun will use ammo

- Mechs still stay
- Jump is broken

- Baddies still bugged
- You can smash down water
- Sun and moon needs a little bit of an offset
- Underwater breath is still broken
--If you run out of air you slowly loose health, not armor
- More optimizeation
- Mechs need particles for boosting

*Game overlay and menu system
*Placeable Lights!
*Mech upgrades!
*Baddie levels
*Baddie stats!
*Baddies hit you for a random number and you can miss
(-10 - 0 = miss) (BaseDMG * BaddieLVL * RNGfactor)
*When it rains to fill up water
*Working on better ART!
*Builder mechbro that farms and collects and builds for you
*HP Bar not numbers
*Have a use for coal and ore to refuel your mech/repair/upgrade

Not releasing another release unless people really WANT it, or I do a majority of these.
Download v0.0.0.21
(Press V to enter a mech!)

Saturday, October 16, 2010

Updated Lighting

+Gets Darker at about 8pm
+Gets Lighter at about 6am
+Still gets darker as you go underground
+(+)Key speed up the time (to 0)
+(-)Key slows down the time (to 100)
+Press 'V' to get out of your mech (guns disabled) and V again to hop in (guns enabled)
+You can collect ORE again!
+You can place ore again with the 1~5 keys
+You can only get in mech that you are on top of
+Leaving a mech will add it to the world
+5000 tiles DOWN ;D

-WATER code is fixed, water 'flows', but needs more tint and what not.
-Baddies are bugged, no AI code yet
Get the 200,000 tile DEEP version.
Get the 50,000 tile DEEP version.

Update 15:
Somehow I optimized it so well, 50,000 tiles deep won't lag you, 200,000 is VERY performance intensive, i'm trying to make it quicker!

Update 14:
The reason you can do 5000 tiles down now is the stupid thing was calculating THE ENTIRE HEIGHT of the map instead of doing what it's width does, and calculate till off screen, And anything off screen just ignore it and don't draw.

Wednesday, October 13, 2010

Update! Lighting bug is fixed!

1000 tiles deep and it gets darker and darker! :D 30 fps in my dev environment, it might be sunny up the top but as you enter and you go deep underground it starts to get darker!

It takes Roughly 4 mins and 30 seconds, to go down 1000 tiles, imagine if I made it so you needed to refuel it would take so much LONGER, I want an actual bar for your fuel which i'll put in right after I make it so you can collect ore again, after some more optimization, I hope to make it take 30mins to 1 hour to hit the end of the level, When I add baddies in I'm not going to tell those that are reading this :D.

Tuesday, October 12, 2010

God said let there be LIGHT!

I was looking around for a lighting effect and then i came across :D, why reinvent the wheel, this lighting source is AWESOME!!.

It makes the background have a shadow effect too, so everything looks kinda 3dish. But it broke my camera following so i'll fix it up, also CLOUDS and RAIN, both effects done by me.

Monday, October 11, 2010

Just how good is the new tile system?

At first when I was 'testing' I got 1000tiles and 30 fps.

Some optimization done and now i'm at 2000 tiles and 30 fps, :D.

2000 tiles down, 100 tiles across, this is in a dev environment too, I get +10 fps with it out of the dev environment.

I though this would get it's own special post, to those that are tracking this blog.

For those of you that don't know, I had the sprites in a separate file, all the tiles, now I use a sprite sheet, I disabled my water physics, not that it ran slow, it's just because I broke it while updating.

Thursday, October 7, 2010

Game Updates!

UPDATE: 11/10/2010:
Redesigning how my tiles work, with a sprite sheet, yes, I wasn't using one, right now with the code in my dev area I went from 33 fps to 60, :D, it's so much better, should be done the end of this week!

Unless it's a huge update I will update the game here for people to download, starting off with update 1! Rather than make 400 posts!


Water tile system tutorial, displayed in 1 pic! (Update 3 will have it in my game)
Developed by me!

Wednesday, October 6, 2010

Toggle Inventory system and UI!

Not bad for a first try, going to add a sky, maybe draw clouds instead of having them float, the ammo/fuel only stays on top of the character when you shoot/jump.

All I did was bind a key and allow the sprite to draw for the inventory, and just have the UI on at all times draw with the score/level .etc. Going to add health in with a bar. But first the background THEN a proper inventory system with pictures because everyone loves them :D.


The top is a picture that is followed around the screen and with the camera off set it boosts up when you go underground, the underground colour is just the graphics driver background :D.

Get it from Here! (Update 1)

Tuesday, October 5, 2010

Want to try it out?

Yeah it's an installer so you can uninstall once you're done, let me know if anything goes wrong!

You don't need XNA installed to play!

If you want tutorials...

If you want me to write up tutorials please leave a message at the bottom! I'm pretty good on different things, If you need to know something let me know! I'll have one done the next day, why look else where :), it'll help me understand what else you guys need!

Monday, October 4, 2010

Game no longer freezes!

On my collect tile method I added:

        // Tile adding calculation
        public void CollectTile(int x, int y)
            // If we're in bounds
            if (x >= 0 && x < Game_Main.Xmax)
                // Compare the texture if it's dirt then run this routine
                if (Level.tiles[x, y].Texture == Level.tiles[0, 0].Texture)
                    GlobalVaribles.Cash += 1;
                if (Level.tiles[x, y].Texture == Level.tiles[1, 0].Texture)
                    GlobalVaribles.Cash += 3;
                if (Level.tiles[x, y].Texture == Level.tiles[2, 0].Texture)
                    GlobalVaribles.Cash += 5;
                if (Level.tiles[x, y].Texture == Level.tiles[3, 0].Texture)
                    GlobalVaribles.Cash += 10;
                if (Level.tiles[x, y].Texture == Level.tiles[4, 0].Texture)

                // Remove the tile
                Level.tiles[x, y].Texture = null;
                // Set it as passable
                Level.tiles[x, y].Collision = TileCollision.Passable;

So the it no longer checks for tiles OUT SIDE the bounds of the map, Game_Main.Xmax, is where I have the MAX LENGTH of my random level generator, and I just used that to get the bounds, Not too shabby! Now when I resize the map it'll go with it :).

Also, subscribe to this or reply to the posts so I know people are taking an interest!

You can collect now

I was thinking of making it so the tiles are in another array but I don't want to clog stuff up!

Instead everytime you destroy a tile it runs this bit of code:

        public void CollectTile(int x, int y)
            if (Level.tiles[x, y].Texture == Level.tiles[0, 0].Texture)
                GlobalVaribles.Cash += 1;
            if (Level.tiles[x, y].Texture == Level.tiles[1, 0].Texture)
                GlobalVaribles.Cash += 3;
            if (Level.tiles[x, y].Texture == Level.tiles[2, 0].Texture)
                GlobalVaribles.Cash += 5;
            if (Level.tiles[x, y].Texture == Level.tiles[3, 0].Texture)
                GlobalVaribles.Cash += 10;
            if (Level.tiles[x, y].Texture == Level.tiles[4, 0].Texture)

What it does, Is compare the tile to 0,0 if it is the same on what's about to be destroyed run a code, if not then don't, i'm going to have to hide the tile's i'm using some how, maybe off screen but then my scrolling camera would pick it up.

Also in other news I made it so when you build it takes it from the ore you have so no replacing spots or anything, now I need an out of bounds check! I should add that in now :).

Impressive sexy particles!

Scrolling background is fixed

Took me about 5 minutes, also, BLUE FIRE! :D

Here's how I did it:

In the UpdateExplosions I added a camera offset, Which I should of done instead of creating a new sprite engine, oh well I like this one better, it's a lot more sexier.

Here's the code:

        private void UpdateExplosions(float dt)
            KeyboardState keyboardState = Keyboard.GetState();
            timeTillExplosion -= dt;

            float ExplosionX = Game_Player.position.X;
            float ExplosionY = Game_Player.position.Y - 26.0f;
            // Set the location of the gun
            if (GlobalVaribles.BuildDirection == "Left")
                ExplosionX -= 46.0f;

            // If we hit the Z key (Add "if (timeTillExplosion < 0 && keyboardState.IsKeyDown(Keys.Z))" if you want a timer)
            if (keyboardState.IsKeyDown(Keys.Z))
                Vector2 ExplosionLOC = new Vector2(ExplosionX, ExplosionY);
                ExplosionLOC.X -= level.cameraPositionXAxis;
                ExplosionLOC.Y -= level.cameraPositionYAxis;
                // the overall explosion effect is actually comprised of two particle
                // systems: the fiery bit, and the smoke behind it. add particles to
                // both of those systems.

                // reset the timer.
                //timeTillExplosion = TimeBetweenExplosions;

I off set by ExplosionLOC.X -= level.cameraPositionXAxis; the camera value is a FLOAT so if you wanted to do it for a tile you would have to divide by your tile size, as with everything that you want to run with your tile system.

Sunday, October 3, 2010

New particle system is in...

New particle system is in and it's GLORIOUS!

Still we have that camera problem, this particle system was taken from the XNA particle system tutorial, I added the flame thrower myself.

Going to fix this tomorrow, and ass fire to the trees I think, i'll see if I can demolish from the sprites it doesn't look that hard, I need another layer with the items I want to collect so it's like you're mining gems, also the random level generator creates 'caves'.

That's all I can think about posting! More tomorrow!