# GC : Explosive Balls (game play)

2315 views

With the current game challenge, time has started to arc over and on the surface, I'm not looking all that great. Under the hood though, things are playing well with each other. I have most all of my render system in place, most update behaviors ready and still have some performance headroom, although I've dipped under standard monitor speed (60hz) sometime last week in test runs. So, two weeks. That's what I get to finish game play, leaving something for cleanup and GC blog/project setup. The original plan is still good and taken from concept to reality. We're here. Got balls, they go boom, they dig a hole and do a pretty splash on their way out the door. Perfect.

This last week a terrain smoothing feature was added. After a carve operation and the damage the particle system does as well, leaves pointy/jagged peaks. The smoothing provides landslide behavior and drops stray leftover pixels into the pile. As soon as I realized that, I saw a water implementation peeking it's head out of the sand. So again, here we are. The new yellow object is the puncture pin. Balls and pin against character and his pipes. If balls get the pin down to the pipe, we start flooding for effect game over. That's where my idea went. Did I mention, "not ...all that great"

Working on that mechanic for the next day or two. (I'll be back) (back) What I appreciate in this video is what you get just from std::rand and mod for polarity from the screen vertical position, plus a higher resolution chaos threshold to act or not. But watching std::rand() cycle through is not a bad thing at all in my opinion. Especially for fire and forget.

The initial stab at it was nice. Tomorrow, another particle system type as the spawner.  As of now, I set an int in my world array to the water ID and update the array like so. Pretty easy and nice addition...now we're making progress.

if (terrain.isStable == true) // not used? always fires at 100 pixel row chunks
{
static int tty = terrain.nMapHeight - 1; // search row cursor location (y axis marker)
for (int n = 0; n < 200; n++) // update count rows of pixels
{
tty--; // advance on start for the iteration of the row
for (int x = 0; x < terrain.nMapWidth; x++)
{   // scan the single row this frame
int index = (tty * terrain.nMapWidth) + x; // this location data index
int indexDown = index + terrain.nMapWidth; // the pixel below
if (terrain.map[index] != 0)
{   // we're a pixel. is someone not below me?
if (terrain.map[indexDown] == 0)
{	// fall - swap down one pixel
terrain.map[indexDown] = terrain.map[index];
terrain.map[index] = 0;
} // no, is someone down and left?

if (terrain.map[index] == 1)
{   // dirt slide
float rnd = (float)std::rand() / (float)RAND_MAX;
bool bChaos = rnd > 0.95 ? true : false;   // determine chaos for horizon movement
if (terrain.map[indexDown - 1] != 1 && bChaos == true)
{ // settle left - swap (down/left) one pixel
terrain.map[indexDown - 1] = 1;
terrain.map[index] = 0;
} // no, is someone down and right?
else if (terrain.map[indexDown + 1] != 1 && bChaos == true)
{ // settle right - swap (down/right) one pixel
terrain.map[indexDown + 1] = 1;
terrain.map[index] = 0;
}
}
if (terrain.map[index] == 2)                //
{	// water slide                          // just right here (behavior)
int sign;                               //
tty % 2 == 0 ? sign = -1 : sign = 1;
if (terrain.map[index+sign] == 0)
{ // flow left - swap (left) one pixel
terrain.map[index+sign] = 2;
terrain.map[index] = 0;
}
}
}
}
if (tty == 0) // top row tested. reset to bottom to restart scan.
tty = terrain.nMapHeight - 1;
}
}

Reaching another week, with one remaining and some fluff. How we doing? pffttt....oh boy. yes and no. In a way, like that. I'm missing on a new and isolated collision check but the plan is improving.  I have a loose event and restart working fine. Making progress on the the win aspect being one trigger away. The idea is to get at least one red ball over to the other side of the scrolling play area where a collector of sort awaits.. My level advance logic already works. The power up is in, I just havn't had the want to add in the cheezy AABB test or worse just length proximity trigger. Or imagined what I'm going to be powering up yet.

This weeks visual and the few issues I'm going after right now.

Picking up speed..is there enough for a safe landing?  we'll see.

Second video added showing improved game play and the win case. An ace fell out of my sleeve when testing goal placement for the level progression. An interesting twist, to have to un-bury your target first...from here on out I'm telling the story different.  But the block to steer and not take damage is a bonus. pffttt...everything from a step back has been bonus with the bogus plan I had

And lastly now, character involvement. In order to satisfy the scrolling aspect, the camera follows. In order to pretend like he has purpose, a shield has been granted to sink those explosive balls deep. This will close this entry. I now have power ups and an ester egg to go. I plan on tool tips (game play tips) in some small capacity and on the menu screen some clues on how this thing is played. Thanks for hanging out.

Quote

The smoothing provides landslide behavior and drops stray leftover pixels into the pile. As soon as I realized that, I saw a water implementation peeking it's head out of the sand.

Once you get to the level of pixels, I get the impression all kinds of cool stuff becomes available that has been a lot harder since everything became triangles-triangles-triangles with 3d cards. Maybe you can do it with compute shaders I dunno.  Water would be awesome, but we are getting low on time now!

Posted (edited)

the cool part about the water thing is that my structures are set up for it already. It will be close to simply adding a case in one of my switches, hold a variable list of position/velocity pairs and test against the land mass array per frame. Keep the lists small-ish but I'm curious about this thing when I push it really hard. Good fun. I'm developing on a old beat up laptop, source is running well, so I figure all good. Push it some more. This will be my loose game event, so a couple days is fairly invested for the effect. Arrive at a point perhaps, deactivate and carry on. Actually happy with the progress of ideas especially considering the twist in the theme. edit: ended up doing it as a texture concept.

Edited by GoliathForge

The water is looking great, and the animated character!  I'm doing the same thing just adding as many features as possible but still have to 'gamify' it into a series of objectives rather than throw everything at you at once in a sandbox type way.

Looking good!

'gamify' was the kick in the stern over here, otherwise feature creep would have consumed.

Is really coming together now, with the retro sound and music too!

Posted (edited)

one of the coolest tutorial series I've ever played with. Sound generated with math to wiggle the speaker. No input data. Blows me away to also have predictable pitch. I'll be revisiting that after it's over. For me it was a little nerving to a small degree because of the brand new framework I chose. Luckily, I like the core architecture and coding style. Not having to think a single triangle was actually refreshing but I'm yearning to go back to 3D. This was a good run, sad to see only a small turnout.

oh, and the crappy lightning collisions flub is all good. Starting to feel like a real game now for certain. I think I'm only a few days off from finishing, so the pressure is down. I probably will respect this in the morning taking the role of 5th game to the portfolio.

Edited by GoliathForge

Added a video showing tonight's fun and excitement. It's like the level is building itself

Very impressive stuff!

Posted (edited)

It was (is) cool, this go around I realized a goofy thing with #pragma in c++. Being aware of c# region and accustomed to it, I tried the C++ equivalent to group(and collapse) every new layer I added in. Mainly the content of the crowded update and draw root blocks. If I region-ed you up, you were good, on to the next major thing, distraction free and scrolling in a bloated text module was comfortable again. More so, it was easy to find where you left off in an obvious fashion. I tried to keep an additional rule, to not mix or spread out types of operations. a screen object update would only advance the current step, it's draw would only draw from state and only state change was at the parent update level. My objects don't even know they can be something else  <sorta'>

Edited by GoliathForge

Attached is the current state of the application. A handful of items are incomplete but it's presentable. Looking forward to a week of cleaning this up.

Works great on my PC 136 fps in the game. Took me a little bit to figure the controls but couldn't work out what I was meant to do, you will need instructions haha!

Posted (edited)

It's a free for all  Arrows and mouse only. put a red ball in the hole on the other side of the map. character advances camera and can bat the balls. blue power deflectors are movable with center node and outer nodes adjust angle (auto return) down arrow block. Up arrow shouldn't be active, it's part of my ester egg. I only get 40hz over here.

Edited by GoliathForge

Ok I've got to level 2, by some miracle!  It is difficult hehe. I couldn't work out what the spinning green thing did. Also I could use the soldier to move the camera but didn't hit any balls with it so far. Do the balls have a certain amount of bounces until they destroy?

Posted (edited)

down arrow on the character to block. (aim at head (deflection)) green orbs are stand ins (sorry, cool) still don't know what to power up. I think I'll give damage if the 'explosive balls' on good hit and you are not blocking. Ball bounces are random 3 or 4 terrain bounces. (it's supposed to be 3 bounces, but I've counted 4 so there is a  bug in there somewhere ) Deflector or character bounces are dismissed. Keep it up in the air or go get another one  thanks dude.

Edited by GoliathForge

I'll give it a try in a few days and post back.

Posted (edited)

No worries.. That will give me a chance to put an update in maybe tomorrow. Sound has been improved by a long ways. I was missing on my sound release time and it made it muddy. But an accidental fix cleared it up. Sounds great now. Maybe not so accidental, but certainly a surprise. Re-arranged the three bar looping music. It's groovy now instead of just noise. Added difficulty by scaling time. It's pretty fast, some collision types ghost through at the faster speeds, so I need to break up the step to ball radius(x2?) perhaps. Been playing it, trying to make it fun. meh, not bad-ish.  Still need to finish up the pipe configuration arrays. It's a play, add/smudge/play routine now with the driving data.

Edited by GoliathForge

Attached is an updated version. Hope to get a bow on it this next week.

I got to level 3 this time!! I did encounter a bug where the soldier disappeared then he reappeared several pixels above the level of the terrain, but could walk about as usual, just higher than he should be. I wasn't sure how to dig the hole to the cauldron so I can complete the next level, is the idea to get the balls to explode and dig the hole for you?

Ah level three, the digging problem. You know, the no weapons thing

Nice one...I hadn't noticed that one yet. Although, I've ripped the transform matrix stuff and went back to straight array blit yesterday.. It wasn't so much this issue (the transform not being the driver) but I wasn't happy with movement.  Now I'm reworking the character controller to be a little more influenced by [ this GDC16 talk ]. Being set up in this fashion, I'm now moving to experiment with the equations.

## Create an account

Register a new account

• ### Similar Content

• SAMA Tip #5 Some planets have harder bedrock than others. Upgrade the mining laser to mine faster.

• My new project codenamed Red Ribbon will be a 2D platformer with inspirations from Cuphead and Super Mario. I'm looking for some 2D cartoonish artists and animators and level designers to make this project possible.
This game's about a cute robot called Qi that has to go through several worlds invaded by evil bosses. These bosses were generated by an obscure portal in the space and Qi must reach that portal to fight the final boss that lives in it. Qi will have several shooting weapons (that will progressively find) to destroy the enemies that he'll find along his way. Also he will be collecting some special big coins (5 for each level) to unlock a secret world at the end of the game. If he doesn't stop all of this the Earth will fall in an endless era of desperation and pain.
You can email me at gsoftwares03@gmail.com or you can message me on Discord (Gianmarco#8170).

• Prop Concept Art, Weapon Concept Art, Hard Surface Concept art, Game Dev, Indie Game Dev

• Robot Concept Art, Hard Surface Concept Art, Concept Art Sketches, The Mills Game
×

## Important Information

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!