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

Author Topic: operation bloodshed - (WIP)  (Read 18523 times)

0 Members and 1 Guest are viewing this topic.

SuperV1234

  • SFML Team
  • Full Member
  • *****
  • Posts: 188
    • View Profile
operation bloodshed - (WIP)
« on: September 26, 2013, 03:46:39 pm »


operation bloodshed

GitHub: https://github.com/SuperV1234/SSVBloodshed
Main devlog: http://forums.tigsource.com/index.php?topic=36131.0



what
This is my attempt at the creation of a spiritual successor to Operation Carnage, one of my favorite childhood games.
Operation Carnage is a 1996 abandonware arcade game with a very simple but addicting and fun gameplay. It has a very interesting shooting/strafing mechanic that is easy to learn but hard to master.
Unfortunately, it also has some design flaws that I'll try to solve in my game.

why
I'll attempt creating this game for various reasons:
1) I feel that Operation Carnage has never got the attention it deserved. Even if it's not a very innovative game, it's certainly a very fun 90's arcade experience, that has some interesting ideas which can be improved.
2) A `clone` of the game, Hyper Princess Pitch, was created by Daniel Remar. It is awesome and you should play it, but, in my opinion, it doesn't solve the design issues the original game had.
3) I haven't done much work since LD27 and I want a project to work on.

how
My language of choice is C++11.
I'll use QTCreator and Sublime Text as my coding tools.
PyxelEdit will be used for graphics.
I will use my own framework, the SSV Framework, and SFML2.1.
As my previous projects, the end result will be free, open-source and cross-platform.





Devlog (audio-commented) videos:
Code: [Select]
devlog #16 - http://www.youtube.com/watch?v=JG960pauKVs
(GUI, force fields, bullet boosters)

devlog #15 - http://www.youtube.com/watch?v=RHwQIXKO1n4
(on-off pressure plates, explosives, new elements/tweaks)

devlog #14 - http://www.youtube.com/watch?v=1iPkM9olna0
(new elements, multi-level sectors)

devlog #13 - http://www.youtube.com/watch?v=pIcEywsZ5eE
(many new elements)

devlog #12 - http://www.youtube.com/watch?v=hV5kkPBYfXI
(fully working level editor)

devlog #11 - http://www.youtube.com/watch?v=43gyuU-FdCY
(particle blendmodes, ai changes, wip editor)

devlog #10 - http://www.youtube.com/watch?v=blq33UhomBE
(wall autotiling, charge particles, raycasting, new gfx)

devlog #9 - http://www.youtube.com/watch?v=8GT8zbgt0ow
(turrets, new enemies, bar hp counter)

devlog #8 - http://www.youtube.com/watch?v=Za2w-nNwe0g
(all enemies can now have weapons)

devlog #7 - http://www.youtube.com/watch?v=5JmZmp_x5Uc
(major progress: ai, gfx, etc...)

devlog #6 - http://www.youtube.com/watch?v=_y_xcvS_aIk
(possible enemy types demonstration)

devlog #5 - http://www.youtube.com/watch?v=wkPzUk5oSMA
(testing enemies that shoot)

devlog #4 - http://www.youtube.com/watch?v=mcRPckkV1XM
(test particles redux)

devlog #3 - http://www.youtube.com/watch?v=KW-cqoaXmVk
(test particles)

devlog #2 - http://www.youtube.com/watch?v=DaIqr5thCQ0
(shooting test, enemy test)

devlog #1 - http://www.youtube.com/watch?v=0KVp2j5hbxI
(new possible project)
« Last Edit: November 23, 2013, 12:37:50 pm by SuperV1234 »

SuperV1234

  • SFML Team
  • Full Member
  • *****
  • Posts: 188
    • View Profile
Re: operation bloodshed - (WIP)
« Reply #1 on: September 26, 2013, 03:47:05 pm »
new video - (wall autotiling, charge particles, raycasting, new gfx)


This video shows:
* wall autotiling: the walls now look "joined"
* charge particles: when an enemy is about to shoot or perform an action, "inverse" charging particles are displayed
* raycasting tests: instead of mindlessly shooting, enemies draw their gun only if they can "see" the player (the player can hide behind walls)
* gfx changes: new font made from scratch and turret has a new tile

G.

  • Hero Member
  • *****
  • Posts: 1592
    • View Profile
Re: operation bloodshed - (WIP)
« Reply #2 on: September 26, 2013, 07:13:28 pm »
What are the design flaws and issues that were in the original game?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10818
    • View Profile
    • development blog
    • Email
AW: operation bloodshed - (WIP)
« Reply #3 on: September 26, 2013, 07:36:12 pm »
As said before, it looks awesome and I'm amazed at your daily progress! :)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

SuperV1234

  • SFML Team
  • Full Member
  • *****
  • Posts: 188
    • View Profile
Re: operation bloodshed - (WIP)
« Reply #4 on: September 26, 2013, 08:00:23 pm »
What are the design flaws and issues that were in the original game?

I talked about them in the main devlog:

Quote
design thoughts
The following thoughts apply both to Operation Carnage and Hyper Princess Pitch.
The main problem I have with the original game is that it is very luck based.
Getting a random powerup drop could mean the difference between clearing a room or losing a life.
How to preserve the fun "overpowered" powerup mechanics while preventing luck based gameplay?
Maybe, instead of random drops, have enemies drop money (or any other resource) that can be spent to buy powerups? Or just place powerups manually in the levels?

Also, constantly getting flamethrower ammunition would give an advantage, since flames stop bullets.
And this is my second complaint: the flamethrower is overpowered.
The bullet-blocking flamethrower is the "iconic" weapon of Operation Carnage. How can it be balanced?
Maybe have very limited and expensive ammunition. Maybe have some kind of enemy projectiles that cannot be blocked by the flamethrower at all.
Or maybe add an overheating mechanic, so that the player cannot be constantly shielded by the flamethrower but has to time its usage.

Another major complaint: the "I fucked up early, let's restart" syndrome.
In arcade games like Operation Carnage, where you have a limited amount of lives, dying on the first or second level usually means a restart, as you need the extra lives for later levels. This is incredibly annoying. You have to play those levels perfectly or else you have to restart.
The same problem applies to games like Touhou, for example.
How to preserve unforgiving game difficulty while solving the early-restart problem?
Maybe, the player could have a limited amount of lives per level, that gets refilled on every level. It's basically saying "You're allowed to fuck up twice per level", and levels obviously become harder over time.
Actually, I think I like this solution.

pro modes
The original game offers 4 difficulty modes, that increase enemy speed/health and decrease player health.
I'm planning to have the following modes:
Easy mode: for newcomers - enemy damage output decreased, more lives per level, etc.
Official mode: the regular gameplay mode. Easy in the early levels, incredibly hard in the later levels. Comes with a built-in speedrun timer.
Mayhem mode: the ħardcore gameplay mode. Same parameters as Official Mode. 1-hit kill. 1 life. Comes with a built-in speedrun timer.
Sandbox mode: the user can choose starting levels, mess around with game parameters, etc. Useful for practice and fun to play around with.



As said before, it looks awesome and I'm amazed at your daily progress! :)

Thank you! :D

G.

  • Hero Member
  • *****
  • Posts: 1592
    • View Profile
Re: operation bloodshed - (WIP)
« Reply #5 on: September 26, 2013, 08:14:56 pm »
Sorry I didn't see that link to tigsource!  :-X
Anyway, it looks good! I don't know Operation Carnage, but I loved Smash TV. ^^

SuperV1234

  • SFML Team
  • Full Member
  • *****
  • Posts: 188
    • View Profile
Re: operation bloodshed - (WIP)
« Reply #6 on: September 27, 2013, 05:32:14 pm »
Sorry I didn't see that link to tigsource!  :-X
Anyway, it looks good! I don't know Operation Carnage, but I loved Smash TV. ^^

Try it! It's abandonware (free) and a lot of fun. :)
http://www.midnightsynergy.com/ancient.htm

---

Today I spent all day on a weapon system.
It sucks, it introduces unnecessary complexity and makes heavy use of capturing lambdas... but:

* Creating new weapons is very easy
* Weapons have a lot of flexibility (it's not a bunch of parameters, it's a lambda that can do anything)
* Thanks to value semantics, I can have copies of weapons with slight variations
* I can easily give an enemy, the player or a turret a certain weapon both at compile-time and run-time and it will work

Example code explained:


1. Notice the return type, `OBWpn`. It's not a reference or a pointer, it's a copy. This allows, for example, to have an enemy use a special version of an existing weapon.
2. For simple weapons, such as the first one (`EPlasmaBulletGun`), the `onShoot` delegate does not capture anything. Non-capturing lambdas with Don Clugston's fast delegates get inlined by clang++ as a normal function call. Yes. (g++ does a worse job, but it's still faster than capturing lambdas).
3. Every projectile the weapon creates goes through `mWpn.shotProjectile`, which fires a callback other entities can attach to. So I could have a "piercing bullets power-up", that, when active, attaches to `OBWpn::onShotProjectile(OBCProjectile&)` delegate, and sets every spawned projectile as piercing.
4. In case of a power-up that modifies the way the weapon shoots, and not projectile parameters, there is a similar delegate in `OBCWpnController`, a component attached to entities with guns that controls fire delay and contains a `OBWpn` object.

So, let's analyze `createEPlasmaGun(int mFanCount)`.

The first instruction creates a `OBWpn` object called result, with parameters:
* Shoot delay: 75.f
* Projectile damage: 1.f
* Projectile speed: 260.f
* Sound ID: "Sounds/machineGun.wav"

The second instruction subscribes (`+=`) a capturing lambda to the weapon's `onShoot` delegate. Inside the lambda we tell the weapon to create `PJStarPlasma` projectiles and fire them in a fan-like formation. When the shots have been fired, we adjust their speed so that "outer" shoots are slower.

Then we return the weapon to the caller.



It works, but it's very messy. Does anyone have any suggestion on how to improve it?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: operation bloodshed - (WIP)
« Reply #7 on: September 27, 2013, 07:15:54 pm »
It doesn't look very messy, what exactly do you have in mind? If different projectiles can be created with a position and angle, you could directly call a function with 3 parameters: Type of projectile, position, angle. So you can get rid of the indirection through MGame.getFactory().createXY(), at least in calling code. Maybe you're overengineering a bit here; do the factories and all the separate classes give you a real advantage? You should also consider an enum (struct) for the sound, or you'll have to adapt paths in multiple place and risk typos.

Furthermore, you should avoid premature optimization. It's good to think about efficiency, but some parts would be simpler and with high probability still efficient enough. Examples: inline, passing vectors by const reference, fast delegates, worries about lambda captures.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

SuperV1234

  • SFML Team
  • Full Member
  • *****
  • Posts: 188
    • View Profile
Re: operation bloodshed - (WIP)
« Reply #8 on: September 28, 2013, 04:34:04 pm »
new video - particle blendmodes, ai changes, plasma bombs, wip level editor


In the video:
* Particle systems now can have a specific blendmode: addition works great for plasma effects!
* Minor ai changes: when an enemy doesn't see you, he moves around to find a trajectory
* Plasma bombs: new projectile type that explodes into plasma bolts
* wip level editor: just started creating a level editor that saves/loads from JSON

SuperV1234

  • SFML Team
  • Full Member
  • *****
  • Posts: 188
    • View Profile
Re: operation bloodshed - (WIP)
« Reply #9 on: September 29, 2013, 04:05:54 pm »
new video - fully working level editor


In the video:
* Level saving/loading: levels created in the editor are now playable
* Simple editor mouse controls: mousewheel + modifiers to change brush size, rotation and tile types
* Construction and gameplay of two example levels

SuperV1234

  • SFML Team
  • Full Member
  • *****
  • Posts: 188
    • View Profile
Re: operation bloodshed - (WIP)
« Reply #10 on: September 30, 2013, 04:05:54 pm »
new videos - many new elements / example room



In the videos:
* New element: destructible wall
* New elements: doors and pressure plates
* New elements: laser beam turret, plasma cannon turret
* New enemy type: enforcer (shoulder-mounted plasma cannon)
* Many new editor features

SuperV1234

  • SFML Team
  • Full Member
  • *****
  • Posts: 188
    • View Profile
Re: operation bloodshed - (WIP)
« Reply #11 on: October 08, 2013, 11:45:38 am »
new video - new elements, multi-level sectors


In the video:
* Editing 32x speed timelapse
* Playthrough of a multi-level sector
* New elements (green/red doors, trapdoors, enemy spawners)
* More aggressive enemies (tweaked bouncing)
* Energy shard collection

Also...

« Last Edit: October 08, 2013, 12:25:21 pm by SuperV1234 »

Sub

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Re: operation bloodshed - (WIP)
« Reply #12 on: October 08, 2013, 08:56:52 pm »
I don't know if you're intending to do this, but it might be cool if the levels could be randomly generated, sort of like the binding of isaac.  Regardless, it's looking good, keep it up  :)

SuperV1234

  • SFML Team
  • Full Member
  • *****
  • Posts: 188
    • View Profile
Re: operation bloodshed - (WIP)
« Reply #13 on: October 22, 2013, 10:37:23 am »
new video - vending machines, on/off pressure plates, explosives, ...


In the video:
* Healing vending machine
* New pressure plate type
* More elements have IDs that can be bound to pressure plates
* Explosive crates!
* New trapdoor type
* Weapon sprite changes

Not in the video:
* Major refactoring and performance improvements

Probably in next video:
* Switches (alternative to pressure plates)
* Sensors (alternative to pressure plates that bullets can trigger)

foobarbaz

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Re: operation bloodshed - (WIP)
« Reply #14 on: October 22, 2013, 02:18:14 pm »
This just continues to get more epic. Keep up the awesome work, man!