Car Wars 02 - Pedestrian Movement

Published August 09, 2019
Advertisement

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
 

2 likes 0 comments

Comments

JustinKase

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 ;)

August 09, 2019 03:29 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement