From tanks to robots, ideas from Quake and so on:)
But I wanted to add one more simple feature (only one stopped me – imagine?) – camera movements (with zoom and so on). Running ahead I will say that it work now in my game – check it:
And you know? I realized – that in this particular case – I simply can’t do this. Sure, it was not enough knowledge and practice. But it was also harder to do – because I used AWT library, not even OpenGL itself. I was “in thoughts” for a couple of days. What I need to do? I never didn’t like to stop project – even simple learning project – without it’s ending. And after some time I decided to try some game frameworks.
I inspected some most popular of them – and stopped on LibGDX. At first – because it already have Box2d inside – and I don’t need to learn new phys engine (in that time this was important for me). Second – it was pretty light and simple (from the first I looked on it and on other frameworks). So, I started new project in my IDE, tested some basic LibGDX features, and began to create my tanks.
In this moment I already wanted to make tanks use different weapons (like in real actions – like Quake – you know:)). Sure, there need to be a Cannon Gun, but I really also wanted to add Minigun and maybe other. And another “problem” (too much problems for simple game project – what do you think?:)) – how tanks will react for Minigun? I mean – this is not a weapon for tanks, this is more against infantry forces. Why it should be more dangerous from Cannon (and I wanted it to be more dangerous – I really like “those” moments from Terminator 2 and Matrix – remember them?:))? And there was also other question – where I will take sprites for my tanks? How this can be resolved? And again – another turn for my project:)
First of all – I realized that I want game about robots, not tanks. But robots on a caterpillar. This will allow me to make their weapons switchable. Second – I was need a designer. I found some designer, who painted robots, weapons and some environment for me. So, let’s check what I had:
- Textures and Sprites
- LibGDX as a framework
- Old idea to create some game about robots/tanks – don’t know why, but know that they must shoot each other:)
And here is development of final version – that I released few days ago – started. I programmed all environment, robots, create destructible things, effects, assigned physics model to everything. Started to create levels. Created stages, settings panels, level goals and all other required things that you can see now in my game. Some of them was more harder to create, some of them less, but I worked as I can. Only one thing (after all of above adventures) made me to stop and re-think – what I actually doing. This was AI.
Yes, AI should be as simple as possible in this game – I knew this from the beginning. And actually – I already developed some of AI – it not really hard: add some target check, some reaction for it (shoot/pursuit), and basic movements if target is unseen. But – I have all other environment in my game: buildings, walls, map border eventually. And enemies – sure – stuck on it when the try to catch Player. First my decision – was simple and hard at one and same time. I generated a ray from an enemy to target – and if it intersect with some other object in scene – I take point of intersection, made “one step back” on that ray and cast 2 more rays – to the left and to the right. In this way I tried to find a way to target. This method – I think – is good for games with arbitrary forms and shapes. If you want – just let me know in a comments – and I will share code and screenshots of this method. And you know – it worked pretty well. I afraid that it will overload a processor – but no, it was pretty fast with Box2d ray cast feature. There was only one problem – it was not always “clear”. Maybe I needed to work more on algorithm, but sometimes enemy simple drive a half of a circle – and then drive back, and doing some “crazy AI” things at all. New investigation began:)
Final part is Opened for You:)