Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411424 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 19, 2024, 07:56:25 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsDiggin' N' Buildin'
Pages: [1] 2
Print
Author Topic: Diggin' N' Buildin'  (Read 4625 times)
Eendhoorn
Level 6
*

Quak


View Profile
« on: March 26, 2015, 06:31:43 PM »

Looks like I'm starting a collection of unfinished devlogs  Shrug
I'm trying to keep this one small in scope.

THE GAME

1 - 4 players
Reach the sky

Gameplay



Try not to be amazed by this drawing.

Each player starts at the bottom and digs their way up. The level will consist of different types of tiles.
Dug tiles will be stored in the player's inventory.
The camera slowly scrolls upwards so players should have a tiny bit of a hurry. If you are outside of the camera bounds you die.

Once at the surface, you need to build up a tower of tiles to reach a certain height to win the game. Each tile has different properties and need to be placed strategically.

I'm not sure if other players can wreck the other guys towers yet. I think they will, it will make the hunt for strong tiles during the digging segment more fun.

Abilities
- Dig left,right,up down
- Jump
- Double jump
- Climb short distances
- (upgrades? rope 'n shit)

Art

I'm using the NES palette and lightly holding to the colour restrictions per sprite.

I've just finished the base tile-set and character sprites.


The girl already has all of her animations. I'm not satisfied with the horizontal drill though.
Epileptic
Logged

phyerboss
Level 0
***



View Profile WWW
« Reply #1 on: March 26, 2015, 06:44:46 PM »

Solid so far! And dont sweat the drawing. "It all starts from something". But sweet pixel work!

A little inspiration from Mr. Driller?
Logged

Beta Coming Soon!
Fayer
Level 0
**



View Profile WWW
« Reply #2 on: March 26, 2015, 09:53:59 PM »

Interesting concept,cute art.
Logged

Eendhoorn
Level 6
*

Quak


View Profile
« Reply #3 on: March 27, 2015, 07:01:00 AM »

Solid so far! And dont sweat the drawing. "It all starts from something". But sweet pixel work!

A little inspiration from Mr. Driller?
Thanks! I have never played Mr. Driller, or even Dig Dug for that matter. I will have to check em out.
Any other refernce games are welcome too.

I actually got this idea after watching Gurenn Lagann.

Logged

phyerboss
Level 0
***



View Profile WWW
« Reply #4 on: March 27, 2015, 07:30:58 AM »

Ah, I see! Well, heres a vid of Mr. Driller on the Sega Dreamcast




What platforms are you looking at? What language/tools are you using?
Logged

Beta Coming Soon!
Eendhoorn
Level 6
*

Quak


View Profile
« Reply #5 on: March 28, 2015, 01:24:19 PM »

Ah, I see! Well, heres a vid of Mr. Driller on the Sega Dreamcast




What platforms are you looking at? What language/tools are you using?
Oh that looks pretty cool, thanks.

I'm just aiming for a windows/mac/linux build atm. With local multiplayer only. I'm thinking about online, if I only keep the interaction between players and tiles it should be fairly easy to synchronize the games. But I have to see where I end up with player interaction.

I'm Using Unity3D with C#, and I already have my own tile-editor laying around from a previous project.
For the tileset graphics I used Pyxel Edit (a blessing if you need to make seamless tiles), and graphicsgale for all the misc pixel art.
Logged

Eendhoorn
Level 6
*

Quak


View Profile
« Reply #6 on: March 28, 2015, 07:21:41 PM »

I've imported the animations and stuff so I've been adding those.
Looked at some of the new Unity5 stuff regarding state machines. You can now use state-machines outside of animation.
So I've made a state-machine that handles the character's state.





You can now add scripts to the states, so I've added a little script that plays a certain animation when it enters the states.
More complex chains of animations are handled in their own statemachine. The character-statemachine wouldn't care whether you're jumping or double jumping, so it's better to handle the cosmetics in their own place.



So now I could add a script where I disable drilling whilst airborne or whatever. And the animation statemachine also gets less of a complicated mess  Coffee

I've also added the basic movement. Decided not to think "I'll tidy this shit up later" and just do it immediatly.
Think it looks a lot better with the squishy shader and effects.



Logged

Slader16
Level 8
***



View Profile
« Reply #7 on: March 28, 2015, 07:34:00 PM »

This looks ridiculously amazing, posting to follow Grin
Logged

i2nQuinn
Level 0
**


View Profile WWW
« Reply #8 on: March 29, 2015, 07:27:50 AM »

Nice idea, I'm always keen on local multiplayer games (there never seems to be enough of them)! How much player interaction you choose to go with will be interesting considering you haven't ruled out online play - it's always a conundrum choosing which direction to take. If you go with online, good luck! Smiley
Logged

Fayer
Level 0
**



View Profile WWW
« Reply #9 on: March 29, 2015, 07:43:51 PM »

Are you basing your character controller on another code or coded all yourself? The movement looks really tight.
Logged

Eendhoorn
Level 6
*

Quak


View Profile
« Reply #10 on: March 31, 2015, 07:06:35 PM »

Are you basing your character controller on another code or coded all yourself? The movement looks really tight.
Just my own code, it's nothing special at all. I think the squishy shader is what makes it look smooth.

Code:
public virtual void OnMoveRight ( bool strafe = false)
{
if( strafe == false && strafing == false )tf.localScale = new Vector2(1, tf.localScale.y );
if( movementEnabled == false ) return;

if(walking == false ) manim.SetBool( AnimConstants.walking , true );
walking = true;

if( jumpC == null || jumpC.grounded) {

if( runEffect != null && effectTimer.playing == false ) effectTimer.start();
if( rb2D.velocity.x + (acceleration.x * airAccelarationModifier) > maxSpeed.x ){
rb2D.velocity = new Vector2(maxSpeed.x, rb2D.velocity.y );
}else
{
rb2D.velocity += new Vector2( acceleration.x , 0 );
}

}else
{
if( customAirAcceleration )
{
if( rb2D.velocity.x + airAcceleration.x > maxSpeed.x ){
rb2D.velocity = new Vector2(maxSpeed.x, rb2D.velocity.y );
}else
{
rb2D.velocity += new Vector2( airAcceleration.x, 0 );
}
}
else
{
if( rb2D.velocity.x + acceleration.x > maxSpeed.x ){
rb2D.velocity = new Vector2(maxSpeed.x, rb2D.velocity.y );
}else
{
rb2D.velocity += new Vector2( acceleration.x * airAccelarationModifier, 0 );
}
}
}
}

Not the cleanest code I've written, but there's a bit of necessary customization for the aerial movement. You might wait to use the ground movement speed * air-modifier, or use a completely different value at times.

Code:
void OnImpulseJump ( )
{
//print ("impulse jump");

if( grounded == true )
{
spawnGroundEffect( jumpEfect );

manim.SetTrigger( AnimConstants.jump );
rb2D.velocity += new Vector2(0, jumpPower );
jumpTimer = maxJumpTimer;

dispatchMessage(M_JUMPED, gameObject, this );
//audio.PlayOneShot( jumpSound );
}
else if( doubleJumpCount < maxDoubleJump )
{
spawnGroundEffect( jumpEfect );

rb2D.velocity = new Vector2(rb2D.velocity.x, doubleJumpPower );
//rb2D.velocity += new Vector2(0, doubleJumpPower );
doubleJumpCount++;
manim.SetTrigger( AnimConstants.double_jump );

jumpTimer = maxDoubleJumpTimer;
dispatchMessage(M_JUMPED, gameObject, this );
//audio.PlayOneShot( jumpSound );
}
}

void JumpSustain()
{
if( grounded == true || jumpTimer <= 0) return;
//anim.SetBool (M_JUMP, true);

rb2D.velocity += new Vector2(0, jumpSustain * Time.deltaTime );

float maxJump = this.maxJump;
if( doubleJumpCount > 0 ) maxJump += doubleJumpPower;

if( prevVelocityY <= maxJump && rb2D.velocity.y > maxJump ) {
rb2D.velocity = new Vector2( rb2D.velocity.x, maxJump );
}
//print ("prev: " + prevVelocityY + " , cur: " + rb2D.velocity.y );

if(jetpack == false ) jumpTimer -= Time.deltaTime;
}

Jumping is based on an impulse and sustained jump. The sustained jump runs on a timer, so you can jump higher while holding the button.

Pretty standard stuff.
Logged

Eendhoorn
Level 6
*

Quak


View Profile
« Reply #11 on: April 01, 2015, 05:15:24 PM »

Today is my birthday, hurray.
I've thrown in the tilemap I had from a different project, I had to make some changes as it didn't support some stuff I need.



I've had a real fight with unity. Their serialization does not support inheritance. If I would create a DestructableTile class and put it in a List<Tile>, unity would just build that into a regular Tile object.
Monobehaviour's support inherritance, but I'm not going to use something as heavy as that for a tile, which will have many instances.

Here's the setup of the tilesystem; (smallified so you guys don't have to look at a big ass screenshot)




I decided I should not fight with unity, but embrace it's love for components.  Wizard
I put all the stuff I need to customize in a function, and override them, so I can add the stuff I want.



Yeah, the tiles and colliders are seperate things. The tiles are not seperate gameobjects, but they're all in one big mesh, for performance reasons.
So now my chunks can add information to the tiles, and the colliders can also have info so I can detect whenever the player digs in them and stuff.



I promised I wouldn't think "I'll do this later" so now I'm going to polish the digging so it looks nice.
I'm not sure if I want to have gravity underground, I'd like to change up the gameplay a bit between digging and building.

Logged

Eendhoorn
Level 6
*

Quak


View Profile
« Reply #12 on: April 02, 2015, 07:06:40 PM »

Done some polish on the digging. Created a particle system that can use gameObjects, a lot heavier than unity's particle system, but it gives me a bit more freedom.



I want to make a more exaggerated effect of the drill hitting the tile, and I need to make a cracking animation that I can overlay on the tile.

What do you guys thinks? I've been looking at this way too long.
Logged

Fayer
Level 0
**



View Profile WWW
« Reply #13 on: April 02, 2015, 08:51:25 PM »

Are you basing your character controller on another code or coded all yourself? The movement looks really tight.
Just my own code, it's nothing special at all. I think the squishy shader is what makes it look smooth.

Jumping is based on an impulse and sustained jump. The sustained jump runs on a timer, so you can jump higher while holding the button.

Pretty standard stuff.

Awesome! Thanks for the insight. I want to make my own platformer engine inside Unity and this has helped me. I'm still deciding between physics or ray cast. Probably going to choose ray cast because I love the old NES/SNES platformers and how they feel.

Kudos on the Unity + Sublime Text Smiley
Logged

Eendhoorn
Level 6
*

Quak


View Profile
« Reply #14 on: April 03, 2015, 06:18:05 AM »

Are you basing your character controller on another code or coded all yourself? The movement looks really tight.
Just my own code, it's nothing special at all. I think the squishy shader is what makes it look smooth.

Jumping is based on an impulse and sustained jump. The sustained jump runs on a timer, so you can jump higher while holding the button.

Pretty standard stuff.

Awesome! Thanks for the insight. I want to make my own platformer engine inside Unity and this has helped me. I'm still deciding between physics or ray cast. Probably going to choose ray cast because I love the old NES/SNES platformers and how they feel.

Kudos on the Unity + Sublime Text Smiley
I would just go for physics,  there's lots of people making cool snes-like games with box2D.
You just need to analyze what gives a game a retro feel.
In my case i found these factors to be important;
- instant acceleration to max speed when moving
- very high friction (almost instant stop)
- unity's gravity feels strange,  just apply a value to y velocity every frame yourself

I'm directly modifying the velocity vectors instead of using addForce,  as that also felt too realistic.
And be sure to set max speeds for moving/feeling/jumping and stuff.

Just play around with it,  using raycasts for your own makeshift physics will just end up costing more time and problems at the end of the road.

Logged

Fayer
Level 0
**



View Profile WWW
« Reply #15 on: April 03, 2015, 07:24:33 AM »

Not quoting anymore because it's getting messy. Thanks for the advice.
Logged

metlslime
Level 0
***


View Profile
« Reply #16 on: April 03, 2015, 08:05:08 AM »

Not serious comment:

- how does the grass grow so quickly into newly-drilled caves?

Serious comments:

- what i like about this game is the idea of two phases, where player choices during phase 1 affects what they can do in phase 2.  Seems like interesting things can happen such as players racing to drill a valuable tile.

- idea for a tower construction piece -- a bomb tile that when placed, destroys all other tiles on the same horizontal row (thereby shortening the opponents towers if they are taller than yours)

- from your animated gif it seems like the most important activity of your game, drilling upwards, is impossible.  Unless you can jump up and then drill while in mid-air, how can you go up more than 1 tile from the starting point?  Are there going to be a ton of air pockets to make it possible?
Logged

Eendhoorn
Level 6
*

Quak


View Profile
« Reply #17 on: April 06, 2015, 07:26:15 AM »

Not serious comment:

- how does the grass grow so quickly into newly-drilled caves?

Yeah it looks kind of silly, but it's either no grass at all, or grass everywhere. I could do some silly raycast to check if there are any tiles above it, but I think this is fine  Shrug

Serious comments:

- what i like about this game is the idea of two phases, where player choices during phase 1 affects what they can do in phase 2.  Seems like interesting things can happen such as players racing to drill a valuable tile.

- idea for a tower construction piece -- a bomb tile that when placed, destroys all other tiles on the same horizontal row (thereby shortening the opponents towers if they are taller than yours)
Yeah the bomb sounds like a nice idea, I wanted to place some other things players can dig up, besides just the tiles.

- from your animated gif it seems like the most important activity of your game, drilling upwards, is impossible.  Unless you can jump up and then drill while in mid-air, how can you go up more than 1 tile from the starting point?  Are there going to be a ton of air pockets to make it possible?
This is why I'm thinking of disabling the gravity underground, it would be annoying to jump and dig.
But the player will also be able to grab unto a tile, and climb very small distances. So I'll see how that works out first. Jumping, holding on to the tile higher up, and then digging might work.


Logged

Eendhoorn
Level 6
*

Quak


View Profile
« Reply #18 on: April 07, 2015, 11:04:33 AM »



I've done some work on layers for my tilegrid, so now destroying blocks looks a bit better.
Also added climbing, you can hold on to a vertical wall and dig. There's a tiny amount of space to move for micro adjusting.

I didn't want to add wall-jumping because it would allow the player to just build one massive straight tower up. but removing the jump after climbing feels strange. Not quite sure how I should solve that.

There's still some missing animations, but I want to implement the building-mechanic first so I can playtest the climbing, and make decisions on the climbing mechanics.
Logged

Eendhoorn
Level 6
*

Quak


View Profile
« Reply #19 on: May 08, 2015, 04:42:17 PM »

Been a while, but gave myself some time to work on this.
Improved climbing at bit more, I wanted to give players a visual indication of how far they can climb.


You can also switch between horizontal/vertical climbing when you're in a corner. And upon destroying tiles you still hang on if there is another nearby ledge, sweet.
There will be powerups throughout the level which will increase your climbing range and speed.

I also added a limit of 1 climb each jump, you cannot climb again until you have landed. Otherwise you could just keep walljumping and climb up endlessly.
I don't know how I should visualize this though.
Logged

Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic