Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1292736 Posts in 57379 Topics- by 48430 Members - Latest Member: _PixelABCD

April 29, 2017, 01:24:20 am

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsFeedbackDevLogsMystic Melee - Trailer and Greenlighting!
Pages: [1]
Print
Author Topic: Mystic Melee - Trailer and Greenlighting!  (Read 626 times)
castled
Level 0
**



View Profile
« on: December 05, 2015, 02:05:13 pm »


Mystic Melee is a platforming combat game where teams of Warwizards battle to control powerful artifacts and arcane knowledge. The game's main feature is online multiplayer, but local multi and solo/co-op challenges are also in the game.

Check out the Greenlight page!

... or, just the



---

You can jump off walls.

Along with casting spells, you can strike opponents or dodge attacks with a dash that functions like a double-jump.

Here's some more screens:
https://i.imgur.com/ZZkvbkn.png
https://i.imgur.com/vJzB3aO.png
https://i.imgur.com/lEN1Oru.png
https://i.imgur.com/c6PKdGP.png

The game's website is MysticMelee.com. You can also follow on twitter.

----

Dev summary so far:

So I've been working on this game for a while now and it's about time I started a devlog. I'm planning to launch a Greenlight campaign soon, so I'm hoping to raise some awareness and get more feedback on the game. I'm doing the programming and art myself, and a friend is working on the music. I suppose I'm also the sound designer, but the sfx are just lightly modified royalty-free samples I've bought so far.

The game is being built in C++ with core libraries of SFML + Box2D + RakNet.
SFML = windowing, display, audio, and input
Box2D = physics
RakNet = networking (most importantly, as a UDP reliability layer)

The hardest part of development was getting online play to work smoothly, especially with lots of physics objects bouncing around. Another (more fun) challenge was getting solid platformer controls working nicely with Box2D. I'll definitely write up more detailed posts here covering these challenges and my solutions at some point.

I haven't been sure how exactly to explain the genre of the game, and what other games exactly to compare it to. It's team-based multiplayer at the core, and the primary gametypes are objective-based instead of just killing each other. This leaves room for the platforming aspect to be pretty important. It's somewhat similar to a platform-fighter when it comes to battling, but the fighting moveset is less complex than in a SSB game. When the first trailer is finished, I hope people can get a better sense of the gameplay.

I'd love some specific feedback on this image as my Greenlight cover shot:

Mainly, it kinda bothers my OCD that the dudes aren't centered at the start of the frame. But it's neccessary to catch the end of the action. Do you think it would bother people, and do you think it's attention-grabbing enough in general?
« Last Edit: December 15, 2015, 01:25:51 pm by castled » Logged

castled
Level 0
**



View Profile
« Reply #1 on: December 14, 2015, 08:16:33 pm »

Platformer physics with Box2D

pt. 1/2

I decided to use the somewhat ubiquitous Box2D physics engine for Mystic Melee's physics. As common as Box2D is, I've seen advice against using it for platformer games. In fact, the first thing Google comes up with for "box2d platformer" is Why Using A Physics Engine For A 2D Platformer Is A Terrible Idea. It definitely takes some wrangling -- the rigid-body physics simulation of Box2D doesn't lend itself to classically (and unrealistically) tight platformer controls. However, if you want your game to have robust and realistic physics interactions beyond your platforming character, getting Box2D to work for your player character is worth it.

My goal was to enable level designs with surfaces at any angle, including surfaces that rotate or move. The player should transition seamlessly from walking on flatter surfaces to sliding on inclines. The characters should be able to crouch and slide with a smaller hitbox. The movement for the character should feel tight and responsive, and not like you're just sliding a box around. I'll go through how Mystic Melee solves these platformer problems with Box2D.

The excellent iforce2d tutorials are recommended as a starting point for working with Box2D. If you don't know Box2D's terminology of bodies, fixtures, sensors, etc., learn about them there!

The player character Body



The Box2D Body for the player character is made of the 5 fixtures above.

Hitbox

The hitbox fixture is a rectangle that's slightly smaller than the player sprite. This fixture is used to physically interact with the world by colliding with the ground, solid objects, or spells. Usually, this fixture is set to have fixed rotation so the player stays upright, although this is turned off if you've been frozen solid or reduced to a decapitated head.

This fixture is replaced by ones of different sizes if you're crouching or sliding, allowing you to get through tight spaces or avoid enemy attacks.


(weird colors courtesy of licecap)

The most important property of the hitbox fixture is the friction, and it's modified constantly. If the player is not trying to move left or right, the friction with the ground is set very high so the player stops moving fairly quickly. When trying to move or trying to slide, friction with the ground is very low. This allows the player to keep their momentum if sliding and allows the force generated from walking to push you along the ground. I use this change in friction alone to keep the movement responsive. Some suggest using opposing forces to slow down the character if no buttons are being pressed, but I don't see this as neccessary unless you want your character to stop while airborne.

Note that to ensure the friction is set properly between the player and a floor, it needs to be set in every PreSolve collision callback between the hitbox and a floor fixture. If you only modify the hitbox fixture's friction, the collision may use an outdated friction coefficient (e.g. if you were not walking when you landed on the floor, and then start walking without recontacting it).


Foot sensor

I should note that all floors/walls/platforms in Mystic Melee are made of b2EdgeShapes. These edges are connected using "ghost verticies" as described here. This is an important part of level building because otherwise the player's hitbox will occasionally "catch" where one edge meets another, slowing you down and popping you into the air inexplicably.

The foot sensor uses BeginContact and EndContact collision callbacks to keep a list of the floors you're standing on. When the edge shapes are loaded into the level, their UserData stores the angle of the edge. This allows the foot fixture of the player to quickly determine what you're standing on. If you're standing on multiple edges, it resolves to the flatter one. On opposing edges, it resolves you to be standing on flat ground so you can stand at the top of steep peaks or bottom of wells.



Past a certain angle, you will slide down slopes like the ones above. At that point, they are treated like walls, although the angle you jump off from is more forgiving.

Getting this system to work with moving platforms is pretty simple. The game just has to calculate the angle of the edge on the fly if it is rotating.



While determining the angles of moving/rotating platforms was simple, making the movement and animations work nicely on these platforms took a little more work. If the player is standing on a moving platform, their global velocity won't be correct for the purposes of running speed and whether they should have the running animation displayed. We'll need to get the player's velocity in reference to the point on the platform where they are standing. I use the following code to account for the platform's linear and angular velocity to get the player's final correct velocity used to determine running capabilities and animations.

b2Vec2 velocity = m_unit->m_physics->Body().GetLinearVelocity();
if (m_movingPlatform)
{
   velocity -= m_movingPlatform->GetLinearVelocity();
   if (m_movingPlatform->GetAngularVelocity() != 0)
   {
      b2Vec2 contactVector = m_movingContactPoint - m_movingPlatform->GetPosition();
      b2Vec2 contactAngularVelocity = b2Vec2(-1 * m_movingPlatform->GetAngularVelocity() * contactVector.y, m_movingPlatform->GetAngularVelocity() * contactVector.x);
      velocity -= contactAngularVelocity;
   }
}



Left, Right and Head sensors

These sensors are simpler. The wall sensors determine (through Begin and EndContact collision callbacks) if you are touching a wall. When touching a wall and no floors, the player can walljump or hold against the wall to slow their fall.

The head sensor is used when jumping to stop upward force from the jump. I've implemented jumps in the traditional Mario style -- when the player holds the jump button, the player continues to create upward force for a number of frames after leaving the ground. This makes for an easy way to control your jump height. However, if the character's head hits a ceiling, we should cut off additional jump forces, otherwise the player could stick to ceilings for a few frames.

---

I think that'll wrap up part 1 of this post on Mystic Melee's platforming physics in Box2D. I'll leave the specifics of movement and some extra tricks for smooth movement for part 2. Hope this is helpful to someone else interested in making platformers with Box2D!
Logged

castled
Level 0
**



View Profile
« Reply #2 on: December 15, 2015, 01:28:47 pm »

I'm launching the game's Greenlight page today!

Would love to hear any comments on the trailer or tips for the campaign!
Logged

Jalapenosbud
Level 1
*


View Profile Email
« Reply #3 on: December 15, 2015, 03:14:08 pm »

Hey interesting game and concept. I LOVED playing little fighter 2 when growing up, to sit in a room with friends and play co-op on one machine, having 4 hands on the keyboard (yes 4 different players xD).

I know this probably will be different, but a 2d platformer game co-op where you have to destroy enemies and stuff sounds awesome Smiley

Also i liked the greenlight trailer. It looks good and polished. I cant help you on tips for the campaign as i havent launched anything myself (yet)  Ninja

And the read about implementing Box2D into your game was also very interesting Smiley
Logged

stringkiller
Level 1
*


Fat Pixel


View Profile
« Reply #4 on: December 19, 2015, 05:46:59 am »

This game looks very interesting! I like the simplistic yet very effective particle effects you used and the fights in the trailer looks pretty great. Will you use different attacks or moveset for the different character?

Also, great job on that devlog! we use a very similar approach to physics in Trashomancer (using box2D sensors for collision and edgeshapes) and I can guarantee that this is very useful to those who are trying to achieve this kind of results. Box2D can be very powerful when tweaked right.
Logged

< check out the devlog! or Twitter!
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic