Jump to content

Photo

No Name Yet -- CD'awgs Non-ZC Temporary Dev Log

C++

  • Please log in to reply
101 replies to this topic

#76 C-Dawg

C-Dawg

    Magus

  • Members

Posted 14 August 2016 - 06:00 PM

Well, I spoke a bit too soon; I had to take Saffith's Crash Course in Forward Declarations and The Errors They Cause before I got things all connected the way I wanted.  (Thank you, Saffith!)

 

GameObjects now own their own reference to the Factory.  Spawning projectiles and effects have been moved out of GameObjectManager.  Next, I gotta move the spawning of items upon enemy death to the enemies themselves, and at that point, I'm back in business to keep adding content.

 

EDIT: Enemies now own their own item drops, spawn their own projectiles and items.   I also tweaked the Tank and Soldier weapons implemented so far so that they don't keep going forever off the screen.  Increased firing rate of initial weapon to differentiate it further from the PowerShot upgrade.

 

Time to take a break from all this engine-tweaking and get down to more content.  Next up: Tank upgrades, more cannon and rifle upgrades, and some enemies.  Maybe draw more background sprites, too.


Edited by C-Dawg, 14 August 2016 - 10:21 PM.


#77 C-Dawg

C-Dawg

    Magus

  • Members

Posted 16 August 2016 - 12:14 AM

Screwed around a bit tonight,  Soldier can now fire diagonally, and the Pogo tool now damages enemies.  (It's-a me, Mario!)

 

Also did some tinkering with how Enemies call the "TakeDamage" function and made it public so I can mess with it.

 

EDIT: One thought about the diagonal firing.  While it "feels good," I worry about this creating the same kind of problem that existed in Super Castlevania: other weapons become pretty pointless if your standard rifle can fire in any direction.  Does a wave beam, spazer, or whatever really make a lot of difference if you are able to fire in six directions anyway?

 

Here's how I've currently mapped out the rifle shots.  The idea is that you pick up "shots" and you can turn on zero, one, or two of them at any time to create a different weapon.  There are four shot types: Power, Explosive, Loop, and Multi.

 

None selected - Short range, weak, straight line, goes through walls.

[Power]-------------------- Longer range, powerful, straight line, blocked by walls, has Fire-type.

[Explosive]--------------- Grenade-style projectile, falls down, explodes on walls or enemies, has Explode-type.

[Power]+[Explosive]--- Shotgun-style spray of fire, short range, spread, has Fire-type.

[Loop]---------------------- Loop around the player character like a shield, weak, blocks enemy, goes through walls, has Electric-type.

[Loop]+[Power]--------- Fires a circular-looping bullet, can go through multiple enemies, has Electric-type.

[Loop]+[Explosive]---- Fires a slow-moving,wave-beam style, explodes on walls or enemies, has Explode-type.

[Multi] --------------------- Spread-type, three bullets, goes through walls, has Cold-type

[Multi]+[Power]---------- Fires up and down spread (not middle), projectiles create wall-chasing fire where they strike, Fire-type.

[Multi]+[Explosive] ---- Single large bullet, straight line, explodes into spray of smaller bullets upon contact.  Large bullet is Explode type, smaller are Cold-type.

[Multi]+[Loop] ----------- Fires an interlocking wave of four projectiles, get larger as they go out, Electric-type.

 

The types will give you a bit of an elemental advantage against certain enemies and interact with the environment in some places. 

 

The thing is, I'm not sure how much experimenting the player will do if the initial weapons already let you fire in any direction you want.


Edited by C-Dawg, 16 August 2016 - 11:12 AM.


#78 Saffith

Saffith

    IPv7 user

  • Members

Posted 16 August 2016 - 01:01 PM

If you want the player to experiment and switch weapons often, the interface is a major factor. Toggling a weapon should be as quick and easy as possible, just one or two button presses. You don't want to mimic Super Metroid, for instance, in which changing beams takes at least five seconds. Since you've got four shots to toggle, perhaps it could be done by holding a weapon switch button and pressing up, down, left, or right.

Castlevania IV also has ammo as a factor, making it necessary to rely mainly on the whip. If you don't have that, there's no reason not to experiment a bit.

#79 C-Dawg

C-Dawg

    Magus

  • Members

Posted 16 August 2016 - 01:29 PM

So, the menu system I have right now is like Zelda's, actually.  You push start to bring up the menu, then you can move the cursor between the different shots you have.  Two can be selected at once.  Push a button to toggle the selected shot.

 

I do plan on having ammunition as a limiting factor, but I'm not sure I will apply it to the main rifle.  Probably it will only apply to the Soldier's tools (bubble, hook, pogo, and ???) and robots (sentry, Item-1 style, Item-2 style, and ????).  

 

Then again, I might just use ammunition strictly for the Tank's sub-weapons, the way that Blaster Master does it.  That gives the player more incentive to hop out and explore side paths to collect ammo so the Tank can keep blasting through the main passages.  As I get the engine more fleshed out, I'm thinking about how to make both tank and soldier exploration compelling.  Better than BM did it, anyway, where you only hopped out to kill bosses.

 

EDIT: Heck, maybe make the tank's overpowering main cannon also require ammunition.  You can always hop out and fire your pee-shooter, after all.  But, that could be... supremely irritating.

 

EDIT2: @Saffith: You can always download the file and run the debug exe file to see what's going on, if you like.  You need an Xbox controller to bring up the subscreen, though, since I don't think I connected the keyboard for start and select yet.  Start -> Menu; Select->Hop in and out of tank.


Edited by C-Dawg, 16 August 2016 - 01:33 PM.


#80 grayswandir

grayswandir

    semi-genius

  • Members

Posted 16 August 2016 - 02:28 PM

I'm seconding the weapon switch suggestion. I'd especially recommend that switching to a weapon not depend on what weapon you already have selected.

You could have a "secondary fire" button, and have ammo switching be that ability for the rifle.
Then, assign a direction to each ammo type. So Power would be up, Multi would be left, etc.
To switch to neutral, you double tap the switch button.
To switch to a single type, you hold the switch button, and then press a direction, then let go.
To switch to a double type, you hold the switch button, press the first direction, press the second direction, and let go.

The advantage is that rather than thinking about turning off this one type, and then turning on another, each specific ammo combination instead becomes a two-button combination. Your favored combinations will quickly become muscle memory, and you can quickly react to situations that you've trained yourself for.

#81 C-Dawg

C-Dawg

    Magus

  • Members

Posted 16 August 2016 - 03:21 PM

I dislike having lots of different buttons to teach the player.  The advantage to your idea is that you actually never HAVE to use that button; you can always go to the subscreen.  It would be an advanced technique, perhaps useful later on where you need to swap shots a lot.  Interesting.



#82 C-Dawg

C-Dawg

    Magus

  • Members

Posted 17 August 2016 - 11:46 PM

First Tank upgrade is functional: Excavator attachment!

 

Mandlebrot_Screenie01.jpg

 

Right now it just digs in sand, but eventually the idea is that it will also toss up small rocks and enemies into the air.

 

Next: Link the Excavator to a selectable item for the Tank, which requires getting the Tank's separate subscreen up and runnin.


Edited by C-Dawg, 17 August 2016 - 11:47 PM.


#83 C-Dawg

C-Dawg

    Magus

  • Members

Posted 20 August 2016 - 08:18 PM

Tank subscreen works and the Excavator is now a toggle-able addon. It also tosses small rocks into the air like projectiles.

However, doing this somehow broke the soldiers subscreen. Two steps forward...

#84 C-Dawg

C-Dawg

    Magus

  • Members

Posted 24 August 2016 - 10:41 PM

Added another enemy, the Statue. 

Enabled armor for enemies.  If your weapon isn't strong enough, it won't hurt the bad guys.  Tank's superior firepower is more obvious now.



#85 C-Dawg

C-Dawg

    Magus

  • Members

Posted 28 August 2016 - 01:26 AM

Added some better sound effects and dust-poof graphics when the Statute enemy hops. 

 

Added switches - strike these event tiles and other event tiles do things on the screen.  At the moment, they just destroy other blocks to open doors and so on, but the way I coded it it should work fine to also do things like create bridges, etc.  Need to make the switch activated graphics a bit more obvious.

 

Anyway, I think the next step is to actually make this a game, in the sense that you can lose.  Right now nothing happens if you run out of HP.  Gotta put a Game Over option in now!



#86 Saffith

Saffith

    IPv7 user

  • Members

Posted 28 August 2016 - 10:13 AM

This would probably be a good time to add an event system - a mechanism whereby an object can announce that something interesting has happened (e.g. "I've died!") and other things can happen in response without the object knowing what those are. There are a lot of ways that can be implemented, but any of them will involve learning more stuff.
Angband's system is pretty simple. A straightforward observer pattern-based implementation works, but is rather ugly and cumbersome, I think. I prefer a variation on that using function pointers instead of an observer interface. In any case, you know I'm happy to help out.

Edit: Actually, maybe that's slightly premature. Probably not something you need just for a game over screen. Might be a good way to handle switches, though. Either way, something to keep in mind for the future, at least.

#87 C-Dawg

C-Dawg

    Magus

  • Members

Posted 28 August 2016 - 07:46 PM

At the moment, the Projectile object handles interactions with the map (since my map data is global) for switches.  As for death, I was able to get everything working fine as far as you lose your hp, you have a dying animation, and you explode.  As soon as I tried to respawn, my warp code broke horribly again.  I tried to fix it and now it's even worse than before.  I'm totally unable to understand the problem.  Basically my World Manager does this:

 

Upon respawn or when you step on an Exit tile, the game loads a new room.  Then it loops through all the blocks on the map looking for a landing tile in the same direction (UP, DOWN, LEFT, RIGHT, and NO_DIR) as the one you just left.  Then, it's supposed to center the screen there, adjust the xOff and yOff if the screen is getting drawn too far off the map, and then put the player there.

 

Except it doesn't do that, it just puts you in a seemingly arbitrary place.  And if you die, it just crashes.  WWAARRRGGHHHLLLBBLB

 

Wanna take a look?


Edited by C-Dawg, 28 August 2016 - 07:49 PM.


#88 C-Dawg

C-Dawg

    Magus

  • Members

Posted 30 August 2016 - 10:10 AM

After Saffith pointed me in the right direction, I fixed the screen loading and respawning code.  Works great now!  I even fixed a long-standing bug concerning the tank going invisible when it entered a new room.  (It's complicated.)

 

Also, I improved the AI of some of the walking enemies so they patrol on platforms rather than walking off of them.

 

I think my next to-do list is something like this:

1. Learn GitHub and use that as a better way to manage backups;

2. Make enemy projectiles damage the player. (2 EZ)

3. Improve the way spikes are handled in collision code, and add larger spikes that damage the tank, too.

4. Add some tiny enemies - ones that the tank just runs over and crushes but harass the soldier.  

5. Add water and water mechanics.

6. Implement "Tankor."  It's the Tank-Anchor, and will be a subscreen option allowing the player to warp back to the tank.

 

Hopefully I can do all of this in a month or so and we'll be talking about possibly sending out a little tech demo to all you folks so you can see what I'm working on!  Which requires: 6. Learn how to export an executable file that packages up the resources the game uses.

 

After that, I think I need to go and do a few more engine-related things.

1. Make the camera it's own object so I am free to pan away from the player or zoom in and out independent of the player.  Will be needed for cut-scene stuff!

2. Implement message and menu systems.

3. Implement active HUD 

4. Learn how to implement a save feature.

 

Now, once things are done to that level, I think it's really just a question of adding more features.  Levels, enemies, items, etc.  All of that is the "fun part" of game design, so it'll be really cool to hit that stage.

 

On the design side, I think I've hit on a good way to implement the Soldier separate from the Tank in a way that requires the sort of deploy-and-explore mechanic from Blaster Master without the atrocious top-down levels.  Since the Tankor lets the Soldier warp back to the tank, I can design a lot of passages that are designed to be played like a one-way side scroller for the Soldier.  Drive up, hop out, and challenge a platformer.

 

Think of it like you have your Metriod-style exploration, but then branching off of that main exploring path you have lots of long one way passages designed like Megaman levels.


Edited by C-Dawg, 30 August 2016 - 10:12 AM.


#89 C-Dawg

C-Dawg

    Magus

  • Members

Posted 30 August 2016 - 11:44 PM

Fixed a subscreen problem, got enemy projectiles working, and tweaked the Podblutter enemy to be an actual threat using them.  Simple night, comparatively.  Nothing broke horribly.



#90 C-Dawg

C-Dawg

    Magus

  • Members

Posted 23 September 2016 - 11:45 AM

Not a ton of progress to report, as I've been starting a farm (of sorts) and having to deal with new issues of animal husbandry.  Turns out that animals are little murder machines, and chickens in particular love to kill and be killed as quickly as possible.  At the same time, I've been working on a Rasbperry Pi project for the family, so that's been an interesting excursion into the world of Linux.

 

Anyway, I put together half a dozen or so Rooms and connected them up to see how the game "feels" now that the core gameplay mechanics are there.  It's a bit lackluster, honestly.  I feel like the character needs more dynamic movement from the get-go to make it feel more fun to play.  The Soldier, particularly.  So, I think my next steps are:

 

1. Add a native Dash ability for the solider; maybe some limited form of wall jumping as well.  This should keep it more dynamic and give the Soldier more options in dealing with enemies, since it's so much weaker than the Tank.

 

2. Let the Tank start with at least one of its supplemental armaments to give it more offensive options. 

 

I feel like the tank needs more options than this, though.  Right now the platforming feels solid -- I spent a ton of time making sure collision detection is tight --  but uninspired, and just not "fun."  Any ideas for a movement option for the Tank to make it more fun to play, more interesting, and different from the Soldier?  Something it could start with natively?





Also tagged with one or more of these keywords: C++

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users