Jump to content
  • Advertisement

Car Wars 02 - Pedestrian Movement

Eck

1033 views

It's been a while since my last developer journal. Mainly because I've been doing lots of things besides development. I've been playing lots of video games: Borderlands 2, Battletech, Master of Orion 2, and Blood Bowl 2. I've been doing lots of Blood Bowl and Twilight Imperium stuff including writing after action reports, twitch streams, and podcasts. I've also been completing some home improvement projects, learning German, working out, and just working. 

In short, I haven't made Car Wars a priority and so it doesn't get any of my time. Even though I've been productive in other "useful" things, my goof-off time hasn't really been a conscious decision and so I feel a little bit down from slacking off. This is something I've talked about in previous journal posts. It's okay to goof off so long as you prompt yourself, "Hey self. Instead of playing Blood Bowl, I could be working on my side project... Am I cool with goofing off and messing around instead of making progress?" If you ask yourself that and the answer is yes, goof off with a clear conscious. Otherwise you'll binge several hours of a video game and before you know it, that's one more day without any progress.

Anyway, I actually HAVE made some progress. It's just not as much as I'd like. Most of this was working when I posted the last Car Wars journal. I worked out a few design decisions and fixed a few bugs. I also spent quite a bit of time cleaning up my object pooler, commenting the heck out of it and making the code asset worthy. I still need to do a few things like record a demo video, and create some store page assets for it before I can publish it on the Unity asset store, so expect that in a week or two.

Here's a video for what I have so far:

I have no skills in modelling, animating, or basically anything creative. So I franken-bashed a bunch of free assets together including different animations, a model, and making my own animation controller. I think it looks pretty cool for the prototype stage.

I create the move order ghosts by instantiating a copy of the pedestrian through my object pooler, and make them translucent by turning the alpha of the materials down. To get the highlight effect, I just change the material color to yellow. 

// A couple of cached references to the renderers
protected MeshRenderer tokenMeshRenderer = null;
public MeshRenderer TokenMeshRenderer
{
 get
	{
		if (tokenMeshRenderer == null)
			tokenMeshRenderer = GetComponentInChildren<MeshRenderer>();

		return tokenMeshRenderer;
	}
}

protected SkinnedMeshRenderer modelMeshRenderer = null;
public SkinnedMeshRenderer ModelMeshRenderer
{
	get
	{
		if (modelMeshRenderer == null)
			modelMeshRenderer = GetComponentInChildren<SkinnedMeshRenderer>();

		return modelMeshRenderer;
	}
}

private void SetTransparency(float transparency)
{
    Color color = TokenMeshRenderer.material.color;
    color.a = transparency;
    TokenMeshRenderer.material.color = color;
		
    color = ModelMeshRenderer.material.color;
    color.a = transparency;
    ModelMeshRenderer.material.color = color;
}

public void SetColor(Color newColor)
{
    Color color = TokenMeshRenderer.material.color;
    newColor.a = color.a;
    TokenMeshRenderer.material.color = newColor;

    color = ModelMeshRenderer.material.color;
    ModelMeshRenderer.material.color = newColor;
}

 

So now I have the very basics of turn-based mechanics worked out. I was lost in the weeds for a few days as I thought about all the different possibilities of how to tackle this problem. Do I let everyone plan everything and then execute in the correct sequence? What about collisions? How about allowing units to plan future phases out? What about keeping information from the other player hidden. How about when two cars are moving really fast and they're nearby each other? Should I present a timeline and allow the user to scrub through it for their planned movement and their opponent's approximated movement? ... and so on.

Eventually I came to the conclusion that I need to just pick a direction and go. So I decided on something a bit simpler for now. Units will move in initiative order, and complete their movement for the phase before the next unit is allowed to go. This keeps the problem space much simpler and lets me work the kinks out of a turn-based mechanics system. As I code this simpler version, I'll try to make design decisions that consider some of the other problems I identified. Hopefully, that will make future refactors and features easier.

 

Tips from your Uncle Eck

If you don't make your game dev project a priority, then you won't make any progress on it.

When you get overwhelmed by a complex design, take a step back and try to focus on a subset of the problem. Then expand on that as more of the problem gets solved. 

A decent solution now is far better than a perfect solution that never happens.

 

Charity Fund Raising

I'm helping raise money through Extra Life which is a charity that helps sick kids. Give a little something if you can. And share the links below if you have time. Thanks!
My Extra Life page - https://www.extra-life.org/index.cfm?fuseaction=donorDrive.participant&participantID=367649 
Twitter Post for sharing
Facebook Post for sharing

 

Notice/Disclaimer

Car Wars is a registered trademark of Steve Jackson Games, and the Car Wars logo is copyrighted by Steve Jackson Games. All rights are reserved by SJ Games. This logo is used here in accordance with the SJ Games online policy

Computer Games based on SJ properties are prohibited so I'll never be able to release this project to the public (not even for free). It's just a fun personal project for myself and the most I'll be able to share is my experiences while working on it. In my pipe dream I'll get this into a cool enough state that SJ Games contacts me to publish the game. But what's more likely is a cease and desist letter. We'll just have to see how things go. Here's hoping. 

If you're interested in legit Car Wars products, I recommend Warehouse 23:
http://www.warehouse23.com/products/car-wars-deluxe-edition
 




0 Comments


Recommended Comments

Very happy to see more progress on this!

Good call starting with the turn based, you can always later convert it over to a more complex design in the future once you have the basic mechanics down.

Put me in the camp of 'I hope they reach out to you to make it a published game' rather than C&D ;)

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Advertisement
  • Blog Entries

  • Similar Content

    • By JokerDDZ
      Hello. Today I released v1.0 of my project created in Unity "Dodge Them Ball". It's arcade game where you have to dodge many kinds of obstacles. You don't control player directly but through balancing the ball. There are 30 levels + endless mode. 
      Link to google play:
      https://play.google.com/store/apps/details?id=com.EasyCompany.Kuleczka
       
      Any feedback is welcome
       




    • By ChocolatePancakes
      I just recently watched a 4-hour longplay of ATV Quad Power Racing 2 on the Xbox. I wondered, how did they achieve the physics on the quad bikes? Because after analyzing moments in the video where the quad bike landed after a long jump, bicycled, or crashed It seems to me that the wheels are "physical" rather than simply raycasted/shapecasted. I have two hypothesis:
      1. The quad is entirely kinematic. The physics acted upon it are simulated through the animation.
      2. The quad has a different physics body for collisions and a different one for driving.
       
      So, how could have they achieved such physics in the game?
    • By RoKabium Games
      The blocks you mine has different hardness and characteristics. The most common type is of a medium strength, and then you can find softer and harder ones while digging. Blocks that cannot be mined at all are distinctively different and also has a red marker around them if you aim at them.
    • By CelticSir
      I asked else where on other websites for this and never got answers, I am struggling to know how to do a design pattern for abilities that you can swap in and out that affect the given object's stats.
       
      Lets take a weapon like a gun as an example. Of which can have a number of attachments that affect its aim, fire rate, magazine count etc. You can add/remove the attachments. 

      I can setup something like that pretty easily (although its very tedious) by creating each attachment and setting its data to what it affects. But then i ran into problems for putting restrictions in place, because then i need a unique one for each weapon they are restricted to. For example:

      Scope A only attaches to gun A , C, D
      Magazine A attaches only to gun B , C

      When i have these specific restrictions - my tedious approach of hard writing it kinda falls apart. So i need a design pattern where this will work easily.

      What is the correct way to design this in C# ? I can't figure out a clean system for this at all. 
    • By Wush
      As a hobby programmer I am slowly working my way up project by project to make a game. However I am currently stumped on what to do with what I call the communication layer.
      To explain: you have an ability, a technology or a building first you need to communicate to anyone effected to apply the effects. Also abilities might need to know when a certain activity is started or ended to trigger or alter their effects.
      Events are a tool to handle this, but:
      1) You still need an effective filter, so only those recipient are called that fulfill certain requirements(nationalities, race, class, locality etc)
      2) You need to know/write beforehand what  method  needs to trigger an event.
      I would be thankful for any advice on these two points, is there any way to elegantly append a methodcall with another methodcall? 
      I mean I could write some kind of wrapper containing a delegate  of a method  and then only call the wrapper, having the wrapper contain a list of additional method calls and their inputs to be executed?
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

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!