samedi 16 juillet 2016

Rushin' Delivery: Devblog #1

🚗 Get back to work!

I have not written anything for a long a time, but now that I'm actively working on a new game, I think it's a great opportunity to practice my english writing skills (and also possibly to show you some of my works).

Summer holidays has started and thus I have more time to spend on personal projects. The development of Rushin' Delivery started a while ago (early May) but has been quite slow due to school, holidays, and my body needing some rest.  But since Monday, I'm happy to say that I'm making some good progress and a lot of things have changed (yey, smiley face!).

To keep me motivated, but also to "force" me to work on a regular basis (not that I dislike making video games, but there are too many distractions around me and some are very tempting), I have set myself the objective of writing an article every Sunday. Also, it will keep you up to date on this game.

That being said, I should tell you what Rushin' Delivery is about before going more into 'technical' details!

🚗 Game Concept

It's actually very easy to understand. You control the direction of an unstoppable delivery truck that needs to deliver its packages as fast as possible. That's it! Overtake other cars, run red lights, take one way streets in the opposite direction... do whatever you think is the best to make you save some time, but be careful not to crash your car. 

You can't accelerate nor decelerate. Just use left and right arrows to rotate your endlessly ridin' little yellow truck. I like to see this game as a modern version of snake (remember our good old Nokia 3310?).

🚗 DOTween

To begin the development part, this week full of changes for Rushin' Delivery started with the discovery of DOTween (thanks @Gib!), a "fast, efficient, fully type-safe object oriented animation engine for Unity", as stated on their website. In short, with this I was able to rework and improve some animations and feedbacks, in order to make things more juicy. 

For example, even if I started using DOTween mainly for UI, I tried the DOPunchScale function when cars were colliding, and the result is quite enjoyable. I think it works well with those cartoonish assets. So, if you are like me and you like to animate with code, you should take a look at this.


🚗 Level Selection Menu

Like I said before, I used DOTween A LOT to animate UI elements, and especially when I decided to improve my level selection menu. First of all, I wanted a better layout: more levels are shown (10 now compared with only 3 before), more informations given to the players and finally they can more easily see their progression but also how many levels remain (more content = happier players?). 

Then I started playing with tweens to make things more "responsive" and pleasant. You cannot (yet) play Rushin' Delivery, but I can guarantee you that the new menu feels much better and is way more enjoyable than the old one, at least on pc. For mobile users it will be another story, but this is a problem I will try to resolve later. 

On the left, the old version and on the right the new one (which one do you prefer?).

🚗 Fuel Limit

One of the biggest addition to the game was certainly the fuel limit system. Before this feature was implemented, players had unlimited time to finish a level. Admittedly, there's a rating system that rewards the fastest players, but the thing is, with some patience, everyone could finish a level simply by turning in circles and avoid cars at the right moment. It makes the game easier and I'd even say 'boring', because at the end, players avoid the main challenges. 

Now there's a fuel limit. I will not lie, it acts exactly the same as a countdown and once it reaches 0 you lose. Well, I lied (sorry!). You can actually win in some cases. Because I'm a nice guy, I made sure that, when its fuel tank is empty, the delivery truck 'slides' until its velocity is null. During this short slidin' phase, you have no control on the car but if it enters the objective, you win! 

THIS will make you salty

I'm sure this is a good addition to the game. It forces players to take risks and quickly find a way through all those obstacles instead of exploiting the lack of time limit. But it's possible that some players find this mechanic too restraining (and that's why we need playtests people!). We'll see how it goes.

🚗 AIs' Route 

Now, I will try to succintly explain how those blue cars (AI), but also other cars (police, firetruck, pizza truck, bus, etc...), work. For those who know what I'm talking about, no, they are not navmesh agents on a navmesh. They are simply going straight forward until they reach a 'turning waypoint' that I disposed in the level. And until yesterday, the route that those AIs took was defined on those turning waypoints, like this:

When a blue car passes over a waypoint, the latter checks a list of booleans and if the one at the current index is true, thus the car turns. Then the index value increases by 1 for the next car passing over the waypoint. And once all the list has been checked, we restart at the beginning of this list. This system was working, but with simple behaviors and with cars taking the same route over and over again. I wanted more complex behaviors, and therefore, this system needed improvements!  

So now, turning waypoints just give the direction (turn right or left), but they are indexed in a very specific way. The route that non-playable cars take is defined in their own script. It simply checks the waypoint's index, and if it is 'true', the car turns. Otherwise, it goes forwards. 


Of course, there are some exceptions that I need to deal with. For example, on the image above, if the car is coming from waypoint 7 and the script says the car has to turn once it reaches the 'turning right waypoint' 8 (element 8 is 'true') I will say 'no'. You can't see, but in lower left corner it's a one-way street from left to right, so, without this exception it would make the car took the street in the wrong direction.

Sorry, this is some very technical details, but the point here is that this new system allows me to implement more sophisticated behaviors. So this is good news and I'm happy!

🚗 New AI: Police car

Another huge addition to the game is the new AI. Like I just said, they are cops, and because of this, if they see you overspeeding they will chase you down until you crash. They act like a 'ghost system' in racing games. That means, once they saw you, they will follow your tracks but slightly faster than you. They're going to catch you up very quickly if you don't manage to get rid of them before!

The AI is not perfect, there's definitely room for improvements (and for AIs in general), but it's already powerful enough and could be very constraining for the players. I will use this behavior sparingly. But overall, they (AIs, cops or not) work as intended and do not need more sophisticated scripts. Maybe it will have to change later, but for now, as a beginner, I'm proud of what I was able to accomplish!

🚗 Final Words

To end this first devblog, I wish to say a few things.

I am not an expert game designer nor programmer. This is my first devblog and this is the first 'big' game I am making on my own (except for some assets, I am not an artist!). I am a student that wants to learn new things. I might do some mistakes, miss a few things or over-complicate others, but I think this should be a good exercice and I am open to constructive criticism. Things can only get better! 

Welp, see you next week I guess!

Useful links:
Kenney Assets
Simple Town Assets

Aucun commentaire:

Enregistrer un commentaire