Jump to content

  • Log In with Google      Sign In   
  • Create Account

Aurioch's Time Machine



Salty update.

Posted by , in Battle City development 23 July 2013 - - - - - - · 862 views

Hello.

Greeting from the sunny (and disgustingly windy) beach in Croatia. It's good to get away from the regular style of life; for some reasons my productivity arises while on vacation. Only problem is the lack of the normal connection to the internet, but I've managed to snatch dad's mobile internet USB stick so I can get here on occasions, so, this journal entry will be short.

Currently, I'm trying to establish the rhythm:
  • Breakfast @ approx 9:15
  • Beach
  • Math study
  • Lunch
  • Gamedev
  • Beach
  • Physics study
  • Dinner
  • Gaming
  • Sleep at 23:00-24:00
For now, I'm more or less abiding to it. I hope I'll manage to prepare myself before next semester.
Coding update

All the major features are finished!
I'm ironing out the bugs and finishing Options screen - only setting controls ingame is now required to implement.

Aside from that, after looking through the code, I started refactoring it. Smart decision when Update method holds 50% of relevant game logic. Only problem is organizing the code; despite refactoring, the most important class still feels clunky. But readable.

Artistic update

Nothing special on this front. Sadly, the workspace here isn't suitable for practicing art... I miss my 32' TV screen and Razer Copperhead.
I'm trying some combinations for improving the HUD and message boxes.
Miscellaneous

After some talking with jbadams, I said "it's enough" content-wise and decided I'll try and sell the game once polishing is finished - at least to see and learn about marketing/distribution/PR/etc. Otherwise, I'll never stop adding new, possibly questionable, content which can be added later anyway to keep the game fresh and thus never release the game. While I don't have much time to research about that field - at least until my Math and Physics exams finish, hopefully with passing grade - I put my game on IndieDB, where I'll also update status as soon as new material to update with appears.
Thanks for reading!


Battle City - Battlefield is opened

Posted by , in Battle City development 27 June 2013 - - - - - - · 986 views

Hello

I took a break from exams in order to work on the game. For now, I managed to pass Databases exam and Intro to Computer Science exam so I'm a little tired from studying.

Battle City revamped graphics


This time, there are no any big updates on the progress, except for graphical revamp (which is still in progress). Instead, I'd like to share a current version of the game. I'd like to hear your feedback of any kind about the game. Part of this is for selfish reasons - I'm starting to get bored of it due to (somewhat) long production (burnout?); however I don't want to start a new project because I'll never finish this one. Another problem is that I don't know what I'll do with it once I finish it, other than add it to my portfolio. Apart from these concerns, I still enjoy making it.
Any suggestions, comments etc. are appreciated.

Grab the game:
Attached File  Battle City.zip (1.61MB)
downloads: 50
and just extract and run.
Game requires .NET Framework 4.0 installed on the machine to run!

Controls: Up, Down, Left, Right, Enter (Shoot).

For now, I disabled 2 player mode and Options screen. Options screen is incomplete and 2 player mode has too many bugs I need to fix. For example, AI once took control over my tank and suicided it!!! I couldn't believe my eyes.

To change settings, open config.txt file. Parameters are easily recognizable; however, I didn't code in any protective mechanisms so if game suddenly starts crashing, check config file.

Currently known bugs:
  • 2 enemy tanks get stuck in small passages.
  • Sometimes enemy tanks go between two closest tiles.
  • Sometimes enemy tanks can fire a stream of bullets.
  • Brick wall destructions is sometimes too big or too small.
  • On widescreen resolution, mouse cursor and level editor cursor are displaced.
Other than that, alpha is perfectly playable.
One little note - in current state, game has 1897 lines of code (calculated with Visual Studio's code analysis), which also officialy makes it the biggest program I ever wrote.

Thanks for reading.


Learning to draw, pixel by pixel

Posted by , in Battle City development 13 June 2013 - - - - - - · 898 views

Hello

Some time has passed from last update. Semester end is coming close and with it summer vacation, valuable time for learning anything programming-related and... Exams. Lots of exams. Oh how I don't want to study from faculty materials, I'd rather invest time on working on projects or study from real life examples where I can learn much faster and more efficient. Sadly, math and physics aren't courses which I can learn that way. At least I had good math professor and managed to pick up most from him; physics was bad so I need to learn by myself.

As far as development goes, AI is in satisfying condition so I left it for now in current state. Most problems have been fixed, there are some issues here and there, but it's playable. With that out of the way, I've turned to the next tasks:
  • Options screen - mostly complete; pure text, serves purpose
  • Powerup system
  • Graphical update
I finally came to the powerups. This is where I can become creative and make major distinction between my clone and the original game. Apart from some powerups which are standard and thus picked up from the original, I can create some of my own as long as I know how to implement it. In preparation for implementation, I have to modify existing code in order to provide better interaction between objects. Hopefully, experience will be satisfying.
There will be two major differences in powerup system between original and clone. One, powerups will be delivered "from the air" instead of appearing after destruction of certain enemy. Two, powerups won't disappear after lying for some time without collecting - after some time from appearance of an powerup, enemy tanks will be able to pick it up as well. Because of that, some powerups will have to have different effects depending on who picks it up. I can't wait to see how will this end up.

Here's a list of the 12 powerups I plan to implement for start.
Powerup list


Now, back to the title. In order to get better assets, I've started to practice artistic skills. Because of its (relative) simplicity, I started with pixel art. Result can be seen on the picture above (I hope - resizing small sprite often brings catastrophe), with powerup icons, new brick wall and new tank. Any feedback would be appreciated.
By using pixel art and vivid colors, I plan to give the game a retro feel suited to the NES and Sega Genesis/Megadrive games.

Special shoutout and thanks to riuthamus for spending his own valuable time in order to help me with art - new tank is mostly his work, I just finished shading it. Without him, I would still be stuck with art skill on absolute zero; thanks to his help, I can produce something at least decent and continue learning from that. It's much harder than coding... time to make pencil, paper and eraser my best friends, huh?

Thanks for reading


Temporal silence

Posted by , in Battle City development 02 May 2013 - - - - - - · 568 views

Hello

Well, I've been out for a while. There is a lot going on, my faculty exams are finished. Since I'm busy with faculty I simply don't have enough time to work on what I want - and even when I have I don't have enough motivation to do it.
Regarding faculty, this semester I have to write seminary - topic I managed to get is "Pathfinding algorithms". Fun fun.

For now, I didn't done much. I'm still working on the proper AI for the game. OK, not AI but pathfinding and pathfollowing. I've decided to work on A* algorithm, considering it's one of the easier and effective algorithms. However, I needed to rewrite it several times because... Code was a mess and it just didn't work. Current version is the closest to the what I want, but there are still several problems I'm trying to solve:
  • AI is blind to the changes. Once it finds a route it will follow it no matter what. I've had to remove collision from enemy tanks in order for them to not get stuck.
  • On several occasions, game stops for a little while AI calculates a route => inefficient pathfinding.
  • If I limit pathfinding to only few steps but make it check for paths each cycle, AI goes crazy.
Definietly hardest piece of code yet I've had to write. And I feel it will need some time to write a satisfying solution.

Also, in addition to that, I've been doing some cleanups of the code. Nothing special nor visible - removing of useless structures, replacing parts of code violating "Rule of 3" to accomodate DRY concept etc. - but will at least give me more flexibility later at writing the code. One of those changes is removing structure I've been using to save all points and instead using Player class to store all data connected to the players.

Since I don't have any new pictures, I though I'd at least give a video of game in action.



Little related to the game, May's article contest theme is "Remake the classics". Maybe I join in, considering that original Battle City can be considered "classic"; however, I don't have any idea what to write about, especially considering that my game is unfinished.

Thanks for reading!


New Battle City update

Posted by , in Battle City development 27 January 2013 - - - - - - · 972 views

Hello again!

Here's another project status update; unlike last time, this time I made more "visible" stuff rather than tuning the code that operates it. Well... when I think about it... there is plenty of both. This update is rather big (for me) and I cannot express how determined and happy I am because of it.

Short summary:
  • Added level selection screen
  • Level progression, scoring and life counting
  • Game over and Victory mechanics
  • New types of tiles (20 of them)
  • Improved collision detection and destruction
  • Complete level editor
  • Manual (by editing config file) resolution selection
  • Framerate counter
New Collision Detection with destructables

Remember the solution I used in last journal entry for destroying brick walls? If you don't, let me help you: you don't need to. It's gone. Simpler, better and faster solution was implemented instead which gives me greater control over tiles while doing the exactly same thing as pixel-perfect collision detection (PPCD in short) - tile is splitted into multiple segments which are checked if CD detects there is collision with that tile.
There were also performance issues with PPCD on levels where were many bricks which caused framerate drops from 60 FPS to 38 due to multiple checking, transforming etc. due to nature of the code. Maybe I didn't write it perfectly optimized but still, calling 40 000 times same operation is not healthy.

New CD also helped me to create new types of tiles easily, which brings us to...

Level Editor

Posted Image

Oh yeah, complete level editor with toolbox (took inspiration from Sapphire Yours) and little menu with all necessary operations. Level editor is operated by mouse (currently only place where mouse is enabled). In the toolbox you can also see all tiles which currently exist in the game; numerous variations of brick and metal tile were easy to implement thanks to new collision detection. Save and Load Level bring out dialog box where you write which level you want to load or save. Those two will be improved later, together with warning there are unsaved changes when you try to exit the editor, additional level management features and few more safety measures like prevention of saving empty level.

Since level editor exists, there is also level selection screen:
Posted Image
It's ugly. I know. But it's "similar" to the original (NES) version and will suffice for now. Also, game automatically transitions between levels when you kill all enemy tanks through this screen; when it does that, player is prevented from choosing other level.

Configuration file

For easier manipulation over destructibles (read as: I don't wanna mess with non-integers if I don't need to) resolution the game is based is increased from 800*600 to 960*720. Naturally, it caused few minor issues I didn't fix yet (respawn control going berserk, font a little smaller). Game doesn't look much different, except for fresh stuff on the right side:

Posted Image

What happens when you change resolution? For 4:3 resolutions (like 1280*1024) everything's same except bigger. For non-4:3 resolutions, this happens:

Posted Image

Screenshot is taken on HDReady resolution (1366*768). On this picture you can notice 3 things.
First one is a little gray part on the left side which "came out of nowhere". I didn't like horizontal stretching during expansion on 16:9 format so I rather kept the main part in 4:3 format and added more background part to the left, keeping nice square tiles.
For now, resolution is selected by manually editing configuration file. Aside from height and width, there are also Fullscreen and Show Framerate options. I have 32' TV as my monitor screen and game in current format looks really nice on 1920*1080 fullscreen.

Game over, Victory and game exiting

What is on of main components which makes the game "game"? Challenge. Or rather, ability to lose. Now, on the previous picture, look at the bottom right of the game screen. "Game Over" for 2nd player. Yup, it's finally properly supported. I don't need to explain rules, right? Posted Image

I took advantage of Game State Machine to make this little thing that You probably spotted first on that screenshot. I think I don't need to talk about it.

What is next?

Obviously, to raise up the challenge, I need to improve AI of opponents. For now, it utilizes randomizer to create its behaviour which gives little challenge, but I swear that Random Number Generator has its own mind. Luck my ***, there is no other explanation on AIs ability to dodge perfectly fired shots in last second; if I didn't write it myself I would swear that AI tries to sabotage me.
I already have designed the behaviour of new AI, now I "just" need to implement it properly. CPU overload, here I come!

I really don't know what will I do with art and sound. I tried to draw new tank for Player 1 to replace the current one but the result was catastrophic due to overusage of Bevel&Emboss to create a 3D feeling:
Spoiler


I'll try to get new assets as soon as I can but until then I'll work on other things like improving code and performance and adding support for playing in 2 players over LAN.

Well, this is it for now, thanks for reading, I hope I wasn't too boring.


Battle City - The Battlefield is forming

Posted by , in Battle City development 09 January 2013 - - - - - - · 963 views

  • Battle City revamped graphics
  • Comparsion
  • Attempts of drawing a tree
  • Powerup list
  • Battle City Alpha 3
  • BattleCity Alpha2
  • BattleCity Alpha1

Winter vacation is over Posted Image
First things first: I know that it's late, but Happy New Year! Hope you had a good vacation.
I didn't have much time to invest into project due to all the events surrounding Christmas and New Year so there was another 2 week "rest" from programming. In the evenings I'd rather play a little or watch movies/animes since it would be pretty late for work and I would be mentally and physically exhausted.

Well, I'd like to say that my project is going steadily, but it isn't. It's going in bursts. After finishing as much as I could, I scrapped previous build and wrote a new one, drastically improving it by using structures I never used before (believe it or not, Lists are one of those) and going deeper into object oriented programming. None of my programs before never had more than 3 classes written by myself; current version of Battle City has 16 classes and will gain more. So, while visually it changed little, core of it now works much better than before.

This is how it looks currently:
Battle City Alpha 3

On the left side: somewhat bland main menu. On the right side, screenshot of 2 player game featuring destructible walls.

Some major features I tackled since my last entry:

Game State Manager

In other words, multiple screens. This system was on the whole different level than I ever wrote before and it took considerable amount of time just to study how it works. In addition to that, I needed to change whole my thought process to be able to grasp the concept. Microsoft's Game State Manager example was a great help in research; I managed to reproduce my own version by looking carefully how that example works.

As a result, game got Main Menu. Yaaay \o/ Other screens (like disabled level editor you can see on screenshot) will be simple to add thanks to it.

Destructible brick walls

This was a little problematic... mainly because I knew "what" and "how" to do it, but didn't know how to properly execute that "how".
First time I tried, I managed to break the game by calling 2 lines of code 16 million times, resulting in several second freeze each time I touched brick wall with my tank. I managed to execute the solution correctly on my 2nd try (meaning I deleted completely that part once and rewrote it from scratch) and got great results.

While writing the algorithm I learned the basics of transformation matrixes - utility which will be required later, especially in 3D projects.

Solution was to go pixel per pixel in area where tank/bullet overlaps with wall, find that pixel's coordinates in both the tank's/bullet's and wall's texture using transformation matrixes and check if it's transparent by looking at alpha parameter. Since checking each pixel is insanely resource consuming, collision must first be confirmed by bounding box test.

Game finally got some feeling like the one I'm trying to clone.

Funny bugs (that may come later as "features", because that's what experts do)

It's easy to stumble on few unforseen bugs, especially when one is as inexperienced as I am. Some of them are usual, other of them... so funny or cool looking that they beg you to stay. I wanted to share some of them before I forget; sadly, I don't have videos of them and pictures aren't enough in this case.

So, here they are:

- Star-powered tank

* Description: Player tank is invulnerable, ramming into enemy tanks kills them

* Status: Resolved

* Cause: Forgotten conditions when evaluating collision between two tanks


- Ghost tank

* Description: After player loses all lives, he respawns looking like enemy tank. Ghost tank can move and shoot and is invulnerable.

* Status: Put aside (old version of the game)

* Cause: Oversight on tank respawn involving player tanks


- Death by Spawning

* Description: Enemy tank spawns while player's tank is on spawn point and immediately fires bullet, killing player. Reverse also works.

* Status: Resolved

* Cause: Non-existant spawn control


- Unstable tank

* Description: Player's tank dies when touching environment. Respawns immediately on spawn.

* Status: Resolved

* Cause: Copied code from one property but forgot to change it.


- Tank possesion

* Description: When player dies, instead of respawning he assumes control of one of AI controlled tank. In case of multiplayer, Player 1 gains control of Player 2's tank while Player 2 gains control of enemy tank.

* Status: Resolved

* Cause: Due to Player 1 controls being hardcoded to index 0 of the list of tanks and Player 2 - if it's multiplayer - being hardcoded to index 1, when Player 1's tank is removed from list (killed) other tank's indexes are dropping by 1. You can guess what happens next.


As you can see, causes for those bugs are pretty trivial. Regardless of that, I love when bugs like that happen, giving me unexpected bursts of laugher.

Next step
  • Player-related stuff (Scoring, lives etc.)
  • Level editor and level management
  • LAN support
  • Graphic polishing
  • Sound
  • AI improvement
So much stuff to do, but it's getting easier since worst part is done. Graphic polishing will be pretty hard; I'm a coder, not an artist :/
Well, it doesn't matter. I'm happy that I'm doing it and I'll finish it completely so that I can go onto the next project I have in mind for some time.

Thanks for reading and see ya later. Hopefully, with playable version.


Developing Battle City - from beginning till now

Posted by , in Battle City development 16 October 2012 - - - - - - · 1,377 views

  • Battle City revamped graphics
  • Comparsion
  • Attempts of drawing a tree
  • Powerup list
  • Battle City Alpha 3
  • BattleCity Alpha2
  • BattleCity Alpha1

Hello.

I hate introductions, I don't know what to say about myself :/ Oh well. Name's Josip and I'm student of Faculty of Electrical Engineering and Computing in Zagreb, Croatia. I started programming in elementary school after discovering QBasic, and since I love video games I decided to become game developer. Over years I passed from QBasic, Pascal, VB.Net and C to C#, where I learn about game developing using XNA framework.
I had several "projects" (if you can call them like that), but none of them were real thing, only tests to see how can I make stuff working. After gathering enough knowledge and experience from those "projects", I set up a new goal: Clone of Battle City, a game I loved as a kid (and I'm still loving).

First, what is Battle City?

Battle City (known to many as Tank or Tank 1990) is a NES game released by Namco in 1985. The player, controlling a tank, must destroy enemy tanks in each level, which enter the playfield from the top of the screen. The enemy tanks attempt to destroy the player's base (represented on the map as a bird, eagle or Phoenix), as well as the human tank itself. A level is completed when the player destroys all 20 enemy Tanks, but the game ends if the player's base is destroyed or the player loses all available lives.

Posted Image

For the nostalgia value and for the sake of practice, I decided to recreate it (hence the same name... for now).

I started working on it in August this year (2012). After few days I encountered a slight bug which I couldn't fix immediately - my laziness kicked in day or two after that and I put it on hold.
On 12th of October I resumed working on it, and after few hours I located a bug and removed it. From that moment, everything just... started snowballing one thing at a time until it became what is it at the moment of writing.

Currently, it looks like this:
BattleCity Alpha2
  • 2-player support
  • AI controlled opponents
  • Indestructable metal walls
  • Unpassable water (bullets fly over it)
  • Grass conceals
  • Working collision detection, hit detection and respawn
So, what are my goals for the future?
  • Destructable brick walls
  • Main menu
  • Level system
  • Ingame level editor
  • LAN support
  • Powerup system
  • Total Graphic Overhaul (hell yeah, hardest for the end)
  • Only sky is limit...
Maybe I'm expecting too much of myself. Who knows. I plan to finish now what I started, but there is only one problem - I don't know what will I do with it once I finish it. Journal will be updated with new stuff as I progress.

Thanks for reading!





August 2016 »

S M T W T F S
 123456
78910111213
14151617181920
2122232425 26 27
28293031   

Recent Entries

Recent Comments



PARTNERS