SFML community forums

General => SFML projects => Topic started by: Sub on December 08, 2016, 03:08:03 am

Title: 9001
Post by: Sub on December 08, 2016, 03:08:03 am
I've been playing around with the idea of creating a (very simple) 2D action game inspired by dbz.  I've got three small prototypes that I've built to that end

Admittedly, #1 was made with Love2D, and #3 was something that I made back in 2012.  I'm not sure how much further i'm going to go with this, but I wanted to throw it out there and get a few opinions

Title: Re: Three Prototypes
Post by: AFS on December 10, 2016, 05:25:17 am
I remember having a DBZ game on the SNES when I was a kid. Gameplay wise, it sucked; it was very clunky and didn't stand a chance against games like Street Fighter II or Killer Instinct, but the music was catchy, the characters were faithful to the TV series and it really captured the spirit of what DBZ was all about: throwing energy balls at the opponent while yelling your attacks.

The terrain prototype is intriguing. I can imagine it being really awesome to see how the the terrain changes during the fight. The only downside I can see is that it would make the hand-to-hand combat really difficult, due to changes in height. That could be avoided if the game is strictly about throwing energy balls, no punching and kicking allowed, considering that you said that the game would be very simple.

Here's an idea for a fourth prototype: the camera split. I remember that in those games, if the characters are too far away from each other, the camera would split in half, still showing both fighters, and allowing to still throw energy balls at each other. I know it's possible to make a split-screen using two sf::Views and changing the viewports, but I don't if it's possible to split it diagonally without using some trickery. That would be a good exercise.
Title: Re: Three Prototypes
Post by: Sub on March 13, 2017, 12:31:51 am
Apologies for not replying sooner, but thank you for the reply!   

I still am thinking about this idea and how to wrap all of these concepts up into one package.  To that end I spent last night creating a particle engine, and ended up creating another weird prototype in which I suppose you control the disembodied spirit of red particles, and are able to recruit white particles to your essence.  WASD moves around, but at the cost of 'killing' some of your red particles.  This was all made last night.

Brief disclaimer -- I had to record this one on my phone.  I had some glitches when I tried recording on my PC.

Title: Re: Three Prototypes
Post by: AFS on March 15, 2017, 08:20:04 pm
Great looking effect!

If you still have the idea of the DBZ-like fighting game, you could use those particles when the character is "charging up" an energy ball, or someting like that.
Title: Re: Three Prototypes
Post by: Sub on March 16, 2017, 03:09:32 am

Yeah, that was my intended goal in creating a particle system.  I initially thought it'd be cool if energy attacks were similar to a fluid, where they'd react similarly to a ball of liquid when hitting another object.  The idea was to use a library like Liquid Fun (http://google.github.io/liquidfun/) for energy attacks, or some other solution for soft body physics. 

I then got the idea to have energy attacks be made up of a few thousand particles.  You can mimic the liquid effect with this system, but more work needs to be done to make it actually happen.  I'm not really sure how it'll actually turn out.  We'll see I suppose, but it's going to be slow going, because I'm only working on this idea for a few hours each month.
Title: Re: Acrobat
Post by: Sub on November 20, 2017, 06:13:03 am
Here's a video in which I control a very tiny and nimble square. It can fly / teleport and (not implemented but eventually) shoot energy beams / energy balls / lazers.

I'm the yellow dude. The circle around me is how much energy I have. Flying and teleporting drains energy. Energy automatically regenerates after not using any for a short period of time. Energy regenerates 3 times faster if you're completely stationary.

If you fly into the opponent square, a melee collision happens, and the loser gets damaged and knocked back. The winner is determined by whoever was moving faster in the opponents direction. It's all about momentum.


On the list of things I've done since recording this video
-  Added a somewhat reasonable camera instead of the stationary one shown in the video
-  Improved AI's use of teleports so as to not unproductively zig-zag around

 On the list of things I think would be cool to do
- Improved collision detection / melee resolution. It's a bit janky in the video, but I know what I should do to improve this.
- Add malleable / destructable terrain (basically integrate the code from the second part of the video in the first post)
- Add energy attacks
- Make it look pretty

On the more unreasonable end of things I'd like to do
- World generation. Instead of the level taking place on a flat surface like in the video, it'd be cool if it took place on a rather large circular world populated with enemies. Gravity would point towards the center of this circle.
- Add rpg elements, where your character can level up to learn new attacks / gain more energy / speed.
- Add rogue-lite elements, so that when your character dies, you start over with a new character on a newly generated world.
- Going hand in hand with the above point, it'd be cool if there were a handful (not that i'm trying to stick with the dbz theme but 7 would honestly be a good number) of scattered items for you to collect on each world. After collecting all of them, you'd be able to select from a list of bonuses to choose from. One of these being immortality aka respawn.


I've changed the name of the topic to Acrobat, but I'm not really in love with the name.  If anyone has a suggestion for a better one, I'm all ears.
Title: Re: untitled
Post by: Sub on February 10, 2018, 07:33:22 am
Finally got around to implementing deformable terrain for this.  I'm honestly amazed that it works as well as it does. 


The video would be longer but I ran out of disk space while recording.  Also, the long black screen in the beginning is OBS, for some reason it takes a while to start capturing frames when I switch to fullscreen.

Anyway, for a repeat explanation on what it is, it's loosely based on the combat in DBZ. You control a very tiny and fast square. It can fly / teleport and shoot energy attacks.

I'm the yellow dude in this video. The circle around me is how much energy I have. Flying, teleporting, and energy attacks drain energy. Energy automatically regenerates after not using any for a short period of time. Energy regenerates 2 times faster if you're (more or less) stationary.

If you fly into the opponent square, a melee collision happens, and the loser gets damaged and knocked back. The winner is determined by whoever was moving faster in the opponents direction. It's all about momentum.

If anyone has any ideas on a name for this thing, I'm all ears.
Title: Re: untitled
Post by: Sub on February 24, 2018, 05:46:29 pm
I'm playing around with what to do for the background. This geometry wars style grid is one of the experiments. I don't know if I'm going to keep it in as it makes it pretty hard to read the screen



It looks like I made a lighting system

Title: Re: untitled
Post by: Sub on March 28, 2018, 08:37:26 am
I replaced the rectangles representing the player with an active ragdoll.  This is a super early first pass, and honesly just about everything in this video needs multiple additional passes.  For the ragdolls specifically, right now they're ingame and reacting to the flight physics of the player.  They also orient themselves to the terrain if they detect they're going to collide soon. 

I need to animate them for charging energy attacks, melee (winning and losing), landing on the ground, and some flailing for when they're being knocked back.  I've been reading and playing around with forward and inverse kinematics, I'm thinking I should be able to come up with something decent.  It helps that the characters are super small and move very quickly, so you're less likely to notice imperfections. 

Title: Re: untitled
Post by: Elias Daler on March 29, 2018, 09:33:33 am
Looks awesome! With the right graphics it will truly be amazing. :D
Title: Re: 9001
Post by: Sub on April 03, 2019, 08:14:13 am
Thanks Elias :).  Apologies for the 1 year + late reply, I have no excuse.

Latest video I recorded is a few months old, but I'm still working on this thing.


Since the video was recorded I've added some sounds + music, procedural level generation, and have played around with the terrain physics some more.  I'm not very happy at all with this iteration of the terrain, I think it definitely needs a rework.  Still have a lot more to do (energy attack system, character leveling system, I think with the right shaders it could look a lot better, etc). 

I think I'm going to take a small break from working on this and spend more time working on the other project I'm working on, It Usually Ends In Nuclear War (https://en.sfml-dev.org/forums/index.php?topic=13782.0).  Should give me some time to rethink the terrain
Title: Re: 9001
Post by: Hapax on April 03, 2019, 10:40:56 am
These mechanics look really rather interesting.

The smoke-like effect looks quite beautiful.

Nice work.
Title: Re: 9001
Post by: Sub on April 03, 2019, 05:09:45 pm
Thanks Hapax. 

I'm pretty happy with how the smoke-like effect turned out, as well as with the main mechanic of trying to outmaneuver the opponent while not running out of energy (because at that point you'll be immobilized and will probably get hit yourself).

Main problem at the moment for the smoke-like effect is that it's too dark and hard to see on some monitors, but if I make it any brighter then it becomes too bright on everything else.  I think I'm going to have to implement one of those sliders where you choose the brightness at the start of the game.

The main mechanic is an evolution of something that came from a half-life 1 mod I used to play called ESF (https://youtu.be/I5IxTotjrL0?t=26).  I made changes to make it work in 2D + make it easier to grasp/play, because that game was absurdly hard, to the point where the video I just linked to i'm sure is completely nonsensical unless you've played it.