Post news RSS Hidden Asset development video #31

I've expanded the code that handles arriving police cars to handle traffic in general, so in this video I go over what I did and demonstrate the traffic working (and also not working quite as well).

Posted by on

In this video, I show how I changed the specific code for handling arriving police cars to general code that handles both arriving police cars and other traffic. Before, all the moving of police cars was done directly on the police car variable arrays called PoliceArriving. Now, part of the variables of the PoliceArriving arrays have been moved to a general MovingCar array, so when handling arriving police cars, the code will call the associated MovingCar array.

So now there's general traffic in the game, which makes the game world come a bit more alive. There are still some issues I need to take care of. Arriving police cars that drive on the wrong side of the road will block traffic, so I have to move the waypoints for the police cars to make sure they drive on the right side of the road. There's also an issue when two cars drive into an intersection in opposite diretions and both want to turn left in the intersection -- they'll simply end up blocking each other and create traffic congestion. Finally, I will have to program in cars stopping for red lights (and possibly also NPCs stopping for red lights at pedestrian crossings).


Mailing list:

Hidden Asset is an isometric assassination/stealth game with an emphasis on utilizing high-tech gear and your environment to avoid detection. As you progress through the game, new equipment will be purchasable for the money you make. The game takes place in a not-too-distant future devastated by a global economic crisis. In this world, corporations are no longer under control of the law. Or morals.

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.