The Power of Threading

I know a lot of people are afraid of threads when programming.  I kinda was for a long time.  They are confusing at times and can get out of hand as well.  The problem is to make a complicated game of any kind you have to learn them.  You don’t have to love them, but you have to get used to them so you can do things that games need, like streaming content, animated loading screens, and much more.

In short threading is powerful, but without planning it will knock you on your butt. 

In the early days of developing Violent Sol Worlds we did not use any threading.  We quickly realized that to do a giant streaming world you would need them.  The issue with plugging threading in is that it has to be planned.  If you do not plan it out, things will get out of hand quick.  The critical issue is design.  When you start your game, make sure you think of it in terms of what has to be running on the main thread and what can happen, out of time, with the main thread.

content loading is fairly easy to have happen in the background

What do I mean about main thread?  That is the main game loop, often times you care about rendering in that loop and player input etc.  The other stuff, like loading content, physics, AI, other strange interesting game-like things, can all be done outside of the main game loop.  I learned having something like content loading is fairly easy to have happen in the background.

How you ask?  You need to plan that out well.  If the game has a list of render entities that get drawn to the screen, you need to code that in a way that things can be added and removed from that list at a random time and not have things blow up.  In this way you can have the main thread put requests out to the loader thread to load in and create entities to draw.  The loader will work on them on its own timeline and eventually just pop them onto the list to be drawn to the screen.

In short threading is powerful, but without planning it will knock you on your butt.  Keep in mind that if planned out from the beginning you will have a powerful tool at your games side.  Often times some of the neatest things are done with threading and allow for a better user experience in your game.  Happy threading everyone!

Advertisements

Violent Sol Worlds Now On Kickstarter

Violent Sol Worlds has officially launched its Kickstarter project – here

Violent Sol Worlds is a story driven, single player, action hero combat game with a massively procedural generated planet covered in caves and complexes with an AI director that injects events and stories into the world. The entire game is highly mod-able including gear improvements, vehicles, drops, and much, much more.

PostCard_Kickstarter.png

New Release – Cornflower Corbin

I am proud to announce that Afterthought Games, our game studio, has released Cornflower Corbin on Steam.  Support indie, buy it today!

CorbinBanner.png

Cornflower Corbin is a family friendly, campy, side scrolling shooter about a whale, with a laser, that is trying to get the love of his life back after the evil Mecha Shark takes her from him. He is painfully assisted by his best friend Paul, an oversize clown fish that jokes a little too much, and has to battle his way through a barrage of enemies to get her back. Corbin’s secret power is in his growth. You see the bigger he gets, the harder his lasers hit. But beware, he also gets slower and becomes a bigger target, so finding a balance in size to damage is key. The game is set up to be stat heavy with leaderboards. So get ready to compete with other players by taking out more turtles and sharks than they do.

features

  • Procedural generated enemies making the game change a little bit each time you play
  • Five levels of action including 5 boss fights and 3 mini boss fights
  • Endurance mode where the waves just keep on coming
  • Leader-boards and stat collection for things like shots fired and sharks taken out

DHdnWXbVoAAxOMi

SquidBossTakedown.PNG

 

I need your very important vote

I need your vote, yes yours.  You have a few seconds to make a difference, simply click the image below and help an indie developer out by voting for Violent Sol Worlds for Indie of the Year.  I’ve been personally working on this game for over a year and it would mean a ton.  Your vote really matters and we need every one of them.

Indie of the Year Awards

vsw_paper_1000_1000

 

The Power of POC in Game Development

What is a POC?  It stands for “Proof of Concept”

Ok, so that is out of the way, what is a POC used for?  We used it for Violent Sol Worlds early on to verify to ourselves that certain game play elements would be fun.  We made three POC’s.  The first was the top down walking and shooting, the second was the car driving, and the third was crafting.

PhysicsDebugWorks.gif

Each one of these POC’s had a singular purpose.  They were built to determine if the individual game play element was entertaining enough to be in a game.  We saw the potential for all three to be entertaining so Violent Sol Worlds was born into development. The POC’s were very useful and we used them effectively to understand if the game idea we had was actually a game that would be entertaining.

CowShooting.png

Now we are far along in development and we found another reason to use a POC.  That reason was physics.  We have had several iterations of our physics now and wanted to get a version that would be the correct version for Violent Sol Worlds.  So we determined that a POC would be a good way to get there.

So we started making a new program that would simulate closely the game when it pertains to physics.  The purpose was for a simple, only physics, POC that would show that the physics implementation was more correct for the game.  Once we had something that worked well we began to plug it into the game.

DrawingNormalsOfFaces.PNG

Once we plugged the physics into the game, we began to debug the integration issues.  Here is where a POC is proving very useful.  The integration of the new physics required a lot of changes in the game.  This was complex, but the physics system itself remained intact from the POC.  We are having an interesting mathematics issue which is causing the player to be able to move through objects in specific directions.

Tracing through the code was not good enough and proved to be misleading.  So we took the exact physics body files from the game and put them into the physics POC and tried to duplicate the problem there.  Turns out the POC works great.

WallAndPlayer.PNG

What do we do now?  We plan on debugging the two implementations at the same time and walking through the code step by step and seeing what part of the math deviates and when.  This will help pinpoint the problem and get us closer to fixing this problem.

So it turns out writing POC’s is a very powerful tool in all stages of game development.  I strongly recommend that you use them to help you develop systems for your games.  It simplifies things and gives you a tool that helps in your debugging and learning. Let us all know how you’ve used POC’s in your game development by leaving a comment.

Also come check out the game here on IndieDB

Marketing is Important

I am always surprised by the different people who think that marketing is to be done only when you are nearing completion of your product. To me this blows my mind. I believe you should be marketing constantly and this is why.

Marketing is not about a product, sure that is the content of the marketing, but it is about people. Marketing is about moving people to where you have something they might want. That is it. If you have a game online, you need an online presence that can move people to the store that the game is sold in. It truly does not matter what phase your product is in start moving people around the internet. If you can move people to a blog you can move them to a store.

Start today, start seeing if you can move people. It is a skill, there is much to learn and getting people to react to your output in the way that you want is something that is highly valuable. Keep in mind that as you develop your product you should be moving people to be interested in you, your team, and your journey. Now go, move those people, start today, it really matters.

Now do me a favor and come see Violent Sol Worlds and see what the fuss is about. 🙂

Game Tactics and Parenting

 

Ok there has been a lot of talk about good and bad parenting since the great Gorilla, Harambe, thing at the Cincinnati zoo.  I’m not going to say anything about the lady who was watching the kid, I’m simply going to try and help parents understand tactically where you should try to be at all times when watching your children using tactical thinking and good old fashion game play.

First of all lets look at a scenario, you have four things you want to keep safe.  They all at any moment could run crazy directions and do dumb things to attempt to murder themselves.  There is only one of you, so where is the smartest place for you to be?  Let’s look at some pictures.

General.PNG

See the green dots are the things you want to protect.  The blue dot is you.  If we take a look at the current scenario what do you notice?  See how it would be impossible for you to pay attention to all the green dots at once?  Why is that?  Positioning!  This is simple to explain, if you are the blue dot you have placed yourself in a tactically inferior position to fulfill your goal of keeping the four green dots safe.   If you were looking at the three on the left the one on the right could easily crawling into someplace they shouldn’t.

Equally as bad if you watch the one on the right like a hawk the ones on the left could be creating a master plan to take over the world, or escape somewhere to a dangerous location.  So where should you be?  Or better yet, where shouldn’t you be?

TheNoGoZone.PNG

See that picture?  The red circle is where you should not be.  To be 100% certain that you can keep track of all green dots at any given time you should be outside the red circle and facing the center of it.  Yes, it sounds dumb, and almost sounds like you cannot have any fun at all, but to meet your goal of understanding what is going on and having all the green dots be safe and understood at all times this is the position you should take.

ProperPosition.PNG

See how you are outside the circle that contains the things you want to keep safe?  This allows you to see everything that happens as it happens.  No surprises.  Now you say, what if they are not all equal?  What if one is prone to be crazy, or bad?  Then you position yourself in a way to be closer to that one.  Like this…

TroubleOne.PNG

See how you are still outside that circle, but you are closer to the one that is prone to do wacky and crazy things?  I colored the one in yellow that you wanted to be more ready to help when the time was needed.  Oh but things go wrong, I know.  What if one of the good ones starts fighting with another of the good ones?

Fight.PNG

How do you handle this?  the trouble maker one you are nearest is being good, but only because you are by them and watching them intently.  If you ran to stop the fight, that the two that are shaded in red are having, then you would be violating the rule of going in the circle and lose sight of the yellow one and something terrible might happen.  Turns out to be tactically sound you have a couple options here that I see.  Lets start by showing what you should not do.

Bad Move.PNG

You quickly run into the circle from your previous position.  You arrive at the fight and stop it, but where are you?  In the circle!  Can you see all the green dots at one time from within the circle?  No! No you cannot.  You are not doing the correct thing and the yellow filled dot suddenly crawls into something and stuff goes bad.  What can you do?  Think tactics.  What if you changed the circle?  A few seconds is not going to hurt the two fighting.  Let’s try to get to this situation now…

FirstMove.PNG

See you grab the Yellow filled green dot by the face and move them to the white filled green dot.  This changes things up the circle gets smaller and you remain in a tactical position to see and remain informed about all the green dots situations.  Now you grab both the Yellow filled and the white filled green dots by the face and advance at the fighting pair.  This puts you in a position to keep all the green dots from being dumb and ending up somewhere they should not.

Gathered.PNG

This makes your circle of no entry very small.  You can start smacking green dots until they realize the errors of their ways like nobody’s business from this distance.  And nobody lost a foot or anything in the process.

Oh, but what if there was no time to gather the other two before the others were going to start stabbing each other?  Always remain calm and NEVER go into the red circle.  If you believe that one of the green dots will die soon in that fight.  You can always advance around the outside of the red circle to get close to the fighters and begin smacking away with extreme authority.

Pivot.PNG

Move like that and you can keep your eyes on all of the green dots like a champ.  You have successfully escorted your 4 green dots to safety without letting any of them get themselves into situations that cause anything to be killed.  Tactical thinking gets a lot done in more than just video games and warfare.  Keep these things in mind in your life and sometimes things work out better.  There is always that time when you just let one go to save the three and complete the mission though.

Hope this makes sense and remember tactics win.  Please do understand the humor and the factual awesomeness here.  I understand situations can be more dynamic than these, but keep a tactical mind as a parent and everything turns out better.