Showing posts with label development. Show all posts
Showing posts with label development. Show all posts

Tuesday, 11 January 2011

miTanks, Part 7

A little more progress and some more screenshots.

Had a game against my brother yesterday. Found a couple bugs, but it was still playable. The first most obvious bug is that bullets would explode halfway through some walls. This was due to the movement calculations. They were somewhat refined though needed to be more so with the bullets jumping instead of moving through every pixel in their path. Took some thinking but I figured out to solve that.

Also I made the first tank blue and all the others red. A quick fix so I could tell which was the first. Also made it playable for two people. Eventually colours will be selected on start up.


The ground now falls nicely into place if a shot blows up the ground beneath it. Only one line added so this may be a temp fix. Seems to be good for the game needs though. I was too slow with taking the screen shots but the ground falls line by line. Looks ok. Will make it even smoother later on.


Found an issue with falling as well. When you fall it moves you according to gravity. Though you can still move back and forth between the fall movements. If I implement an automatic redraw of the canvas, this shouldn't be an issue. Unfortunately that would ruin how I'm doing my other calculations, so that may have to wait. I'm sure there is another way to resolve this.


Added a laser beam. Fires in a straight line destroying all the ground in it's path. Damn I missed him.


You can kinda see the ground adjustment here. Got a screenshot about halfway through it.


I'm having a meeting with Foo about the game tomorrow. Now that I have alot of the game done, he can get started on creating the game view for Android. Hopefully he has a better idea about how to do this then I do.

By the way, all these screens are from the PC version. Don't worry. I will release it for you all.

Cheers,
Milk

Sunday, 9 January 2011

miTanks, Part 6

A little more progress. Moved the ground builder into the Ground enum so that each type of ground has it's own way to build the terrain. Implemented a Sand random ground generator and a Rock random ground generator. Guess which one is which.



You can see the code behind building these is only a few lines each. Writing the rock one took less then 10 mins. The sand one was just over an hour.

The sand one still has some issues. I haven't quite got the constraints for the range, period and shift of the wave. And then applying some additional scaling so that it doesn't fall off the bottom of the game.

Haven't done much else really. Will look at adding a straight shot weapon that moves through the floor. This is probably going to be alot more enjoyable then the game to work. To be honest there isn't that much else to do to get it playable.

There are a couple of steps I have when I create a game:
Working = It does what it should.
Playable = You can see it doing what it should.
Done/Fun = There is enough story/options/levels/bells and wistles that you will enjoy playing it.
Finished = It's actually done.

At the moment miTanks for PC is at a proof of concept stage. Which is some wierd combination of fun and playable, but not quite working. This usaully happens when I get bored of doing behind the scenes code and start making stuff that I can actually see. Like the ground generators.

Please read this:
I've made the sound support on this PC version. Still waiting some sound effects. If you go to Vocaroo and make me a sound, I will put it in my game, and your name in credits.
Just post the Vocaroo link in a reply below.
If you want a weapon just tell me what it should do, how to move and shoot. I'll put that in aswel. Credit will be made to you also.

See example comment below.

Friday, 7 January 2011

miTanks, Part 5

Here's a some pics of what I've got so far for testing.


Support for an arbitrary amount of players. They are actually all human controlled at the moment.



In this one you can see the error with damage. You can see it has broken one line correctly. But hasn't done the others.


 If anyone can help me with code formatting on here let me know. Here's a screen of it. Lol.




ground is a 2d array of size game_width x game_height. All the others should be self explanatory.
When it prints we see:


Destroy: -5, 0
Destroy: -4, 0
Destroy: -3, 0
Destroy: -2, 0
Destroy: -1, 0
Destroy: 0, 0
Destroy: 1, 0
Destroy: 2, 0
Destroy: 3, 0
Destroy: 4, 0
Destroy: 5, 0

So for every x, y = 0. But why! Should be something like. x = -5, y = 0; x = -4, y = 1; ...

[Edit: Found it!!

Not sure why I was scaling y by the bullet location... Removed this.bullet_x and this.bullet_y in the y calculation and it works. Too easy. Doesn't even look that circular... How to fix that?

]

Wednesday, 5 January 2011

miTanks, Part 4

Happy New Year!

Hope everyone's holidays are going well. Nothing too exciting going on in mine. Had a nice few days off work for drinks and general relaxation. Didn't do too much on the tanks game but thought I should update what has been happening. Foo is currently on holidays afk so not much in the lines of GUI completed.

Sorry I don't have many pictures for this project. As the GUI is last on the TODO list, this will come when the app is in the testing phase. I'll get some code up here later on for you all aswell. As this uses Java classes the code is spread across multiple files. I'll upload any interesting code I make though. Have a couple little bits in mind for later on.

Completed:
More of the inner workings are completed for in game.
The game physics work.
(better now)
Simple flat terrain completed.
Support for differing gravity, wind and landscape. (three landscapes have been added, one fully completed)
Support for random terrain generator. (included in landscape)
Support for multiple weapons, including weapon movement and collision calculations.
One weapon implemented. (fully implemented, including circular proximity damage)
Multiple matches in a game. (support for)
Game cycle. (may need to be editted once visuals and sounds are added.)

Still to do:
Getting input. Once input can be received the usage is already implemented.
Tank movement.
Display. Location calculations implemented. Just need to know how to put an image on the screen.
AI calculations, of differing skill levels.
Perfect AI, should be easy to do.
Absolutely useless AI, is even easier.
Realistic AI is somewhat harder. Shouldn't take too long. I'd just fudge some numbers from the perfect AI.
Defensive weaponry support. Shields and such.

NOTE TO FOLLOWERS:
I'm going to need some sound effects for this game. Such as a tank moving sound, bullet fire sound, bullet fall, explosion, and probably some others. If you can link me some sounds you've made I'll give them a listen and add the best ones into the game.

Saturday, 1 January 2011

miTanks, Part 3

As neither me or Foo know how to successfully draw to the screen, we thought we'd make it as easy as we could. Firstly the game will be the size of the screen. This will remove the need for scrolling. The battlefield size will be in relation to some fixed variables, so can be easily changed at will. The game will be completely in landscape view.

Foo agreed to do the visual side of the application. Considering the amount of lower-level coding Foo has actually done, and the combined skills we possess for graphics, this looks like the hardest part. Seemingly working from scratch, the progress on this is slow. So far there is nothing to show.

Done so far:
Did a quick class diagram for the actual game.

























Most of the inner workings are completed for in game.
The game physics work, (untested).
Simple flat terrain completed.
Support for differing gravity, wind and landscape.
Support for random terrain generator.
Support for multiple weapons, including weapon movement and collision calculations.
One weapon implemented.
Multiple matches in a game.

Still to do:
Getting input. Once input can be received the usage is already implemented.
Tank movement.
Display. Location calculations implemented. Just need to know how to put an image on the screen.
The game cycle. This will be very easy. Just need to actually do it.
AI calculations, of differing skill levels.
Perfect AI, should be easy to do.
Absolutely useless AI, is even easier.
Realistic AI is somewhat harder. Shouldn't take too long. I'd just fudge some numbers from the perfect AI.
Defensive weaponry support. Shields and such.

Things YOU think I should add:
Leave a comment. Tell me what you would like to see.