Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411421 Posts in 69363 Topics- by 58416 Members - Latest Member: timothy feriandy

April 18, 2024, 01:32:58 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsBLOCPK: Competitive Hoarding: Pickup Artists
Pages: 1 ... 4 5 [6] 7 8 ... 21
Print
Author Topic: BLOCPK: Competitive Hoarding: Pickup Artists  (Read 48722 times)
Rat Casket
Level 10
*****


i can do what i want


View Profile WWW
« Reply #100 on: May 19, 2013, 02:42:47 PM »

I like how it sets a certain pace for the gameplay that isn't executed in a castlevania-styled long animation. Very nidhoggy; how do you intend to design stages?

Well the final game is going to be about capturing the block, so the levels will be built around pushing the block from its spawn point (top or center of the stage) down to your capture point. There will also be jump pads that can throw players/the block.

One level has you pushing the block towards your enemies spawn point in order to throw the block across an impassable barrier on your side.

I also want to make it so if you fall off the bottom, you come out of the top. Maybe even on the sides. Same with the block itself. Like maybe you have to push it off the bottom, to capture it at the top.

Also points of the stage where you cant be seen really well. Some walls you can run behind, etc.

Lots of ideas!
Logged

Rat Casket
Level 10
*****


i can do what i want


View Profile WWW
« Reply #101 on: May 20, 2013, 05:02:19 AM »

The more I think about it, the less I want to implement something like Jac suggested. I'd like to keep the experience as pure as possible without any guess work (like the angle of your shot). However, I may allow a hip shot or shooting while in the air that will not be so accurate?

What I will do is add some frames to the aiming/crouching. Only once you have fully aimed/crouched will you be able to shoot. This was in an earlier gif I had posted somewhere, but I had since taken it out because I couldn't get it to work right. I know how to make it work this time. :p
Logged

Blambo
Guest
« Reply #102 on: May 20, 2013, 05:19:44 PM »

My only criticism is that the fact that you have to aim when shooting at head height seems a bit clunky. It took a while to adjust to pressing W then E, rather than just E.
Logged
Rat Casket
Level 10
*****


i can do what i want


View Profile WWW
« Reply #103 on: May 22, 2013, 05:52:35 AM »

A lot more people have played the game so far than I anticipated. I've gotten a lot of great feed back from it and I really appreciate it all.

On of the biggest criticisms is the derpy collision. Last night I rebuilt the collision code, gravity, added acceleration and friction back into the game, and rebuilt the entire state machine for the player. This has not only fixed some goofy collision issues, it has also fixed all of the animation bugs I was having.

I was also able to separate the collision code into its own script so I can drop it on any object.

Now I just need to figure out how gm studios dumb ass sound works...
Logged

Belimoth
Level 10
*****


high-heeled cyberbully


View Profile
« Reply #104 on: May 24, 2013, 12:29:11 PM »

Looking good!
Logged

Rat Casket
Level 10
*****


i can do what i want


View Profile WWW
« Reply #105 on: May 24, 2013, 05:41:52 PM »

Here is an updated file, no installer!
https://www.dropbox.com/s/7949uhpfxcu855o/BLOPCK%20rebuilt.exe

Controls have been changed. Collision rebuilt, state machine rebuilt, some simple "particles" and some other basic stuff. Still sort of buggy. If you push the block onto the blue player without moving him after the round starts, it will crash. :/

Player 1
WASD GH

Player 2
Arrows NM
Logged

Sam B
Level 1
*



View Profile WWW
« Reply #106 on: May 24, 2013, 05:48:54 PM »

I still can't get over how cool that dying animation is. Keep it up, man!
Logged
Rat Casket
Level 10
*****


i can do what i want


View Profile WWW
« Reply #107 on: May 25, 2013, 07:03:43 PM »

Guh. I'm having trouble coming up with a way to capture the block. Right now its just push it through the gate but thats just sort of meh. Maybe push it into a cart or something.
Logged

laxwolf
Level 2
**



View Profile WWW
« Reply #108 on: May 25, 2013, 08:45:36 PM »

You could have it drop into a slot, could even act as circuit connector. Lots of crazy spark effects and maybe it could even affect the other player. Idea: the player is controlled by a computer in their base, dropping in the circuit slowly fries the other player's computer. Once you do it enough times, their base explodes and they explode. Some ideas, just make it do something fun.
Logged

Solo artist, modeler, designer, and programmer.
Ticebilla
Level 0
***


Do Stuff


View Profile WWW
« Reply #109 on: May 26, 2013, 01:19:57 AM »

You could have it drop into a slot, could even act as circuit connector. Lots of crazy spark effects and maybe it could even affect the other player. Idea: the player is controlled by a computer in their base, dropping in the circuit slowly fries the other player's computer. Once you do it enough times, their base explodes and they explode. Some ideas, just make it do something fun.


This is genius, and wjould be a really cool way of going about things, evven if just for one level.
Logged

Rat Casket
Level 10
*****


i can do what i want


View Profile WWW
« Reply #110 on: May 26, 2013, 08:44:35 AM »

I may not even add the block. Honestly, the game is 100% more fun without it. I could just set it up as a deathmatch game, or various other game types.
Logged

Belimoth
Level 10
*****


high-heeled cyberbully


View Profile
« Reply #111 on: May 26, 2013, 10:20:19 PM »



I am filled with schadenfreude.
Logged

thekill473
Level 1
*


View Profile
« Reply #112 on: May 27, 2013, 02:28:20 AM »

Create a rectangle for each side of the tile.
Code:
public class Tile
    {
        #region Fields

        public Vector2 position;
        public Vector2 tilesetPosition;
        public string texture;

        #endregion

        #region Properties

        public Rectangle top
        {
            get { return new Rectangle((int)position.X * Utils.tileWidth + 2, (int)position.Y * Utils.tileHeight, Utils.tileWidth - 4, 2); }
        }

        public Rectangle right
        {
            get { return new Rectangle((int)position.X * Utils.tileWidth + Utils.tileWidth - 2, (int)position.Y * Utils.tileHeight + 2, 2, Utils.tileHeight -4); }
        }

        public Rectangle bottom
        {
            get { return new Rectangle((int)position.X * Utils.tileWidth + 2, (int)position.Y * Utils.tileHeight + Utils.tileHeight - 2, Utils.tileWidth - 4, 2); }
        }

        public Rectangle left
        {
            get { return new Rectangle((int)position.X * Utils.tileWidth, (int)position.Y * Utils.tileHeight + 2, 2, Utils.tileHeight - 4); }
        }

        #endregion

Then the collision code:
Code:
if (effectedByGravity)
                entity.velocity += MapManager.loadedMap.gravity; // Gravity

            if (touchingFloor && entity.velocity.Y > 0)
                entity.velocity.Y = 0;

            #region Max Min

            int minCheckX = (int)entity.position.X / Utils.tileWidth - 3;
            minCheckX = (int)MathHelper.Clamp(minCheckX, 0, MapManager.loadedMap.width);

            int minCheckY = (int)entity.position.Y / Utils.tileHeight - 3;
            minCheckY = (int)MathHelper.Clamp(minCheckY, 0, MapManager.loadedMap.height);

            int maxCheckX = (int)entity.position.X / Utils.tileWidth + 3;
            maxCheckX = (int)MathHelper.Clamp(maxCheckX, 0, MapManager.loadedMap.width);

            int maxCheckY = (int)entity.position.Y / Utils.tileHeight + 3;
            maxCheckY = (int)MathHelper.Clamp(maxCheckY, 0, MapManager.loadedMap.width);

            #endregion

            List<Tile> tilesToCheck = new List<Tile>();

            for (int x = minCheckX; x < maxCheckX; x++)
                for (int y = minCheckY; y < maxCheckY; y++)
                    if (MapManager.loadedMap.collisionLayer.tiles[x, y])
                        tilesToCheck.Add(MapManager.loadedMap.layers[0].tiles[x, y]);

            // Reset
            touchingFloor = false;

            foreach (Tile tile in tilesToCheck)
            {
                Rectangle entityRect = new Rectangle((int)entity.position.X, (int)entity.position.Y, (int)entity.collisionSize.X, (int)entity.collisionSize.Y);

                if (tile.top.Intersects(entityRect))
                {
                    if (entityRect.Bottom > tile.top.Top)
                    {
                        entity.position.Y = tile.top.Top - entityRect.Height;
                        entity.velocity.Y = 0;
                        controller.jumping = false;
                        controller.jumpVelocity = 0;
                    }
                }

                if (tile.bottom.Intersects(entityRect))
                {
                    if (entityRect.Y < tile.bottom.Bottom)
                    {
                        entity.position.Y = tile.bottom.Bottom;
                        PlatformerController controller = (PlatformerController)entity.GetComponent(typeof(PlatformerController));
                        controller.jumpVelocity = 0;
                    }
                }

                if (tile.left.Intersects(entityRect))
                {
                    if (entityRect.Right > tile.left.X)
                    {
                        entity.position.X = tile.left.Left - entityRect.Width;
                        entity.velocity.X = 0;
                    }
                }

                if (tile.right.Intersects(entityRect))
                {
                    if (entityRect.Left < tile.right.Right)
                    {
                        entity.position.X = tile.right.Right;
                        entity.velocity.X = 0;
                    }
                }

                // Check if the player is not touching the floor by checking 1 pixel under the player.
                entityRect.Y += 1;

                if (entityRect.Intersects(tile.top))
                    touchingFloor = true;

                if (touchingFloor)
                    effectedByGravity = false;
                else
                    effectedByGravity = true;

                if (entity.velocity.Y > 0)
                    fallTime += gameTime.ElapsedGameTime;
                else
                    fallTime = TimeSpan.Zero;
            }

Works like a charm.
Logged
Rat Casket
Level 10
*****


i can do what i want


View Profile WWW
« Reply #113 on: May 27, 2013, 07:04:21 AM »

I uh...

Have no idea what that says. ):
Logged

ink.inc
Guest
« Reply #114 on: May 27, 2013, 07:25:15 AM »

http://forums.tigsource.com/index.php?topic=5790.0
Logged
Rat Casket
Level 10
*****


i can do what i want


View Profile WWW
« Reply #115 on: May 27, 2013, 07:49:29 AM »

Ive poked around with that engine before. Its very nice and I learned a lot.

Not enough, it would seem.
Logged

siskavard
Guest
« Reply #116 on: May 27, 2013, 07:40:34 PM »

This guy might help you with those corner collizz's
http://m.youtube.com/watch?feature=g-high-u&v=lc3yAla0tL8
Logged
Rat Casket
Level 10
*****


i can do what i want


View Profile WWW
« Reply #117 on: May 27, 2013, 07:45:30 PM »

That guy is pretty good. I've watched most of his videos. This is where I got my initial collision code. He even mentions that there will be a bug exactly like I'm experiencing but never goes on to correct it. Some day. Giggle
*watches video*
*head on desk real hard forever*

I was actually able to solve it today by rearranging some stuff. I felt pretty stupid.

Then I immediately turn around and find yet another collision bug. I think the problems are coming from my sprite masks changing when an image is flipped. Just to test it I rebuilt the collision with the simplest possible sprites, a couple of squares, and I had no such issues.

I'll test the mask theory once I know more about them. Otherwise I may just need to slap in some code to push the player OUT of an object if hes intersecting it.  
« Last Edit: May 27, 2013, 07:56:25 PM by Rabbit » Logged

ink.inc
Guest
« Reply #118 on: May 27, 2013, 07:56:33 PM »

or just keep the player mask a single sprite instead of setting it to the current sprite index (there should be a tab in the object menu that lets u set this)
Logged
Rat Casket
Level 10
*****


i can do what i want


View Profile WWW
« Reply #119 on: May 27, 2013, 08:18:15 PM »

So I just made a new mask and everything is fixed.

Somebody shoot me in the head. Beg
Logged

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

Theme orange-lt created by panic