Nice remake, but without snap to grid movement it's not a battle city ;). For example in Gamemaker Studio It's just 6 lines of code to snap to grid the player everytime you move in different axis
AAh, welcome to the future my friend! Perhaps you’re right, but I won’t be updating this game since I don’t use the same framework anymore. But this game is in my todo list.
Hi, awesome... 1) It's very annoying when you hit wall and keep pressing movement key in wall direction your tank is not stopped 2) when you hold one key e.g. 'A' then press 'D' (so 'D' and 'A' are pressed at time) tank is moving to right (correct). Afterwards when 'D' is released tank stop despite fact 'A' is still pressed. It's little bit annoying.
Well, you can't please everybody. I changed the 'not stopping after hitting a wall' thing after another user said it was annoying that it stopped after hitting a wall, hahah!
Source code is available. Scroll lower through the comments to get the link.
Hey there! This game rocks. Thanks a lot! I'm not being able to play with a friend in another part of Europe. One of us starts a host game (only yellow tank appears), then the other follows the "join", with ip introduced, and after some few seconds is led back to the main menu, while the person hosting the game continues undisturbed. Am I missing some step? Ports are open through windows firewall. Thanks for any comment!
Try you and your buddy running the .jar through the console. Start the command line and run it like: java -jar "name_of_the_file.jar". If there's any error when connecting, it should come up there. Let me know.
Thank you so much for this game. It was one of my most favourite games when I was a kid!
Can you please tell me how to use the .bcm files created using the level editor? I can't play the levels that I create using the level editor jar file.
There should be a 'mod' folder created right next to where the .jar file is. You put those inside that folder and they should be selectable in-game (just scroll past level35 or backwards). If there is no 'mod' folder, create one manually.
Sure. Here's the link: https://github.com/jh62/BattleCityMultiplayer. I warn you though, this was the first game I ever made (besides small projects) so this is not the best example how things are done and you will see that the code for keyboard/gamepads is a bit hacky because it is. I tried to implement gamepad compatibility in rush time and never touched it back again. Use it as a guide, but this is not how I would code it today.
Okay, I uploaded the entire project to GitHub: https://github.com/jh62/BattleCityMultiplayer. Just remove the comma from the beginning of some files. I had to put a comma because GitHub wouldn't let me upload hidden files (or I don't know how).
Hey man, do you have any instructions on how to do multiplayer over TCP, trying to play with a friend overseas. We've opened the ports in windows firewall and router and no luck joining the same game together...
After open TCP AND UDP ports, you should be able to connect. There's no other way. I play it very often with no problems. There's something blocking the connection most probably. Disable the router firewall if there's any. I should warn you though, the internet gameplay it's a little buggy at the time. If the connection is not good and not very fast, it will mostly break from time to time. I usually play in on the internet with friends under a solid connection.
It's not required to be online for coop. You just have to connect another computer to your Lan ip. If you mean two people in same computer, be patient. I'm hoping to do a revision of this game in the coming future.
In the next days i will upload a version of this game with local multiplayer with the same keyboard and, hopefully, joystick support. Anyway, this version will be just the same game roughly adapted to make the other tank controllable. There will be bugs and maybe incompatibilities. Im doing this because i need it for a game party i will attend and i thought, for the time beign, it's the best i can do. In the future a new version of the game will come with renewed features. Enjoy!
Start a new game, give your ip to your friend and have him join a game with that ip. If you're behind a router or firewall, ports TCP 2596/UDP 2597 must be open.
That's weird. I've tested it live many times through wifi, same local network, internet, etc, and never had serious lag issues or disconnects. If you play other games, those work okey? Try executing the jar through the command line and see what errors you get.
← Return to game
Comments
Log in with itch.io to leave a comment.
Nice remake, but without snap to grid movement it's not a battle city ;). For example in Gamemaker Studio It's just 6 lines of code to snap to grid the player everytime you move in different axis
AAh, welcome to the future my friend! Perhaps you’re right, but I won’t be updating this game since I don’t use the same framework anymore. But this game is in my todo list.
Hi, on your gitHub page https://github.com/jh62/BattleCityMultiplayer there is not source for level editor.
I uploaded the editor in another repository:
Ok, thx :).
P.S https://github.com/jh62/BattleCityMultiplayerLevelEditor
What version of NetBeans are you using? I have problem with opening project with NetBeans version 12.5 loading have stopped under 10%.
I have no idea. That was several years ago. I guess i used Netbeans 8 with JDK 1.8.
If you can’t open it, just look at the source code and copy the code.
I have successfully opened project but its looks different from your editor that you have uploaded on itch.io. Did you push last code on GitHub?
From GitHub :(
From itch.io :)
Hi Paul, Im very new to this. I would love to play this game but I dont know how I run it? Can you direct me in some way how to get it running?
Thank you in advnce.
Just install java and run.
does it work on windows 7?
it should!!!
Hi, awesome...
1) It's very annoying when you hit wall and keep pressing movement key in wall direction your tank is not stopped
2) when you hold one key e.g. 'A' then press 'D' (so 'D' and 'A' are pressed at time) tank is moving to right (correct). Afterwards when 'D' is released tank stop despite fact 'A' is still pressed. It's little bit annoying.
Is source code available?
Thanks!
Well, you can't please everybody. I changed the 'not stopping after hitting a wall' thing after another user said it was annoying that it stopped after hitting a wall, hahah!
Source code is available. Scroll lower through the comments to get the link.
Glad you liked it!
Oh sorry, I didn't noticed anyone was complaining about it.
https://github.com/jh62/BattleCityMultiplayer
Hey there! This game rocks. Thanks a lot! I'm not being able to play with a friend in another part of Europe. One of us starts a host game (only yellow tank appears), then the other follows the "join", with ip introduced, and after some few seconds is led back to the main menu, while the person hosting the game continues undisturbed. Am I missing some step? Ports are open through windows firewall. Thanks for any comment!
Try you and your buddy running the .jar through the console. Start the command line and run it like: java -jar "name_of_the_file.jar". If there's any error when connecting, it should come up there. Let me know.
Also, if you are behind a router, you may need to forward the ports (or your friend).
Thank you so much for this game. It was one of my most favourite games when I was a kid!
Can you please tell me how to use the .bcm files created using the level editor? I can't play the levels that I create using the level editor jar file.
There should be a 'mod' folder created right next to where the .jar file is. You put those inside that folder and they should be selectable in-game (just scroll past level35 or backwards). If there is no 'mod' folder, create one manually.
Thanks man..... You're awesome!
really cool game! is it posible for you to share the code on github im learning gdx recently.
Sure. Here's the link: https://github.com/jh62/BattleCityMultiplayer. I warn you though, this was the first game I ever made (besides small projects) so this is not the best example how things are done and you will see that the code for keyboard/gamepads is a bit hacky because it is. I tried to implement gamepad compatibility in rush time and never touched it back again. Use it as a guide, but this is not how I would code it today.
np. still looks a great gdx example to me. great thanks
may i have the complete gradle project with resources so i can actualy compile it if possible? thx again!
Okay, I uploaded the entire project to GitHub: https://github.com/jh62/BattleCityMultiplayer. Just remove the comma from the beginning of some files. I had to put a comma because GitHub wouldn't let me upload hidden files (or I don't know how).
really appreciated. i can build and run now. thx again
Hey man, do you have any instructions on how to do multiplayer over TCP, trying to play with a friend overseas. We've opened the ports in windows firewall and router and no luck joining the same game together...
After open TCP AND UDP ports, you should be able to connect. There's no other way. I play it very often with no problems. There's something blocking the connection most probably. Disable the router firewall if there's any. I should warn you though, the internet gameplay it's a little buggy at the time. If the connection is not good and not very fast, it will mostly break from time to time. I usually play in on the internet with friends under a solid connection.
It's co-op. What yo mean?
It's not required to be online for coop. You just have to connect another computer to your Lan ip. If you mean two people in same computer, be patient. I'm hoping to do a revision of this game in the coming future.
In the next days i will upload a version of this game with local multiplayer with the same keyboard and, hopefully, joystick support. Anyway, this version will be just the same game roughly adapted to make the other tank controllable. There will be bugs and maybe incompatibilities. Im doing this because i need it for a game party i will attend and i thought, for the time beign, it's the best i can do. In the future a new version of the game will come with renewed features. Enjoy!
How do me and my friend play?
Start a new game, give your ip to your friend and have him join a game with that ip. If you're behind a router or firewall, ports TCP 2596/UDP 2597 must be open.
Me and my friend keep getting in a game but it lags very bad and i keep getting disconnected. note we are on same wifi.
That's weird. I've tested it live many times through wifi, same local network, internet, etc, and never had serious lag issues or disconnects. If you play other games, those work okey? Try executing the jar through the command line and see what errors you get.