Coder Social home page Coder Social logo

deceth / battle-city Goto Github PK

View Code? Open in Web Editor NEW
50.0 13.0 24.0 24.89 MB

Build a city, hire a team, drive a tank, orb the enemy! Multiplayer online game.

Home Page: http://battlecity.org

License: GNU General Public License v3.0

C++ 41.55% Objective-C 0.36% C 38.78% Pascal 16.32% Visual Basic 2.94% Shell 0.05%

battle-city's Introduction

Battle City


Battle City is a very fun and addicting online game. You start off by either building a city or applying for a job in a city built by someone else. Your goal is to defend your city while attacking and destroying enemy cities. All of this is done in real-time from the comfort of your tank! For more information, visit the Official Battle City Website. The best thing about Battle City is that it has been released under the GPLv3 open source license. This license gives ownership of the game to the community and ensures Battle City will stay free and open source forever! Help Battle City by playing the game, updating the wiki, or contributing code!

License: GPLv3 Credits: Deceth

Download the latest release from the official website

Download the source code from the master Battle-City code repository

Resources

battle-city's People

Contributors

abiffle avatar deceth avatar rileyw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

battle-city's Issues

Flare Gun 'Mode'

Another cool option would be, upon right clicking the Flare item in your inventory, it switches between the three 1/3 power shots, or a single shot that is three times as strong.
I use the tri-flare primarily as an offensive weapon, to destroy mines and attack people on my DFG-traps, but when it comes to defense, there only real use is either spamming them, which is fairly easy to dodge, or attacking bombs.
With the single fire option, they become a powerful defensive option too!

Gap Generator

Sleeper factory allows you to build a 'Gap Generator', a 3x3 dense building, that covers a 15x15 size area on the map in total darkness. Needs to be populated, and can be bombed as normal.

Resolution Bug

The click-able area and the image in 1024 resolution windowed mode do not match. If you want to build something you have to click the building under the one you want to build.

Distribute the game with the server

Right now the only way to host a Battle City Server is to download the source code and compile. Instead, the server should be distributed with the game so any user can double-click it to launch their own server.

Convert database from SQLite to MySQL

This would allow for the game database and website database to be merged which would open up some interesting possibilities on the website such as the ability to browse players, scores, stats, etc..

Also, certain things that would be more difficult to implement in-game could then be done via the website such as profile management & clan management.

Also, same password on game + site would be nice.

Forum

The forum is being unreasonably slow, and more often than not just doesn't load.
I would label this 'Bug'

Speed it up pl0x? Lawl.
I would label this 'Idea'

I know you can't do that if it's something Jamoola, or whatever you use, based. >.<

Extract all language into external file

Rather than have language embedded within the games code, it should be loaded from a file. This would make it easy for users to submit and load language packs or just funny customized versions (like Pirate text).

Database Modernization

The Battle City Database has several issues that need to be addressed.

  • SQLite: A new version is most likely available, so it should be assessed what is required to update.
  • Passwords: Passwords in the database need to be encrypted.
  • Structure: The database uses a flat structure with a single table which worked at first, but new fields were added that are problematic. For example, a separate table should be created for "tanks" that contains a player id and tank id making it possible for any player to own an unlimited number of tanks. This should also be done for rental cities and special items (which don't currently exists). These sorts of things can be sold to raise enough money for a dedicated server (we did this in the past when the game was popular and that's how we managed to keep a server running for so many years. The database wasn't really setup for it, so some players eager to donate maxed out on tanks, wanted others, but there was no way to add them without removing existing ones).

We also need to consider that Battle City was always a single dedicated server game. I think that hinders innovation from our creative community, that are not all developers. We want to encourage players to host their own unique servers. To build their own worlds. To add their own fun twists to the game. Of course, making that possible will require making more and more things configurable on the server, such as maps, available items, team size, etc...

... but I'm getting off-topic :)

We need to consider, how do we setup the database in a world where there might be multiple servers?

Should there be a central server for authentication, that passes the player name and ID to servers? Then each server can assign their own stats/ranks to that ID? Otherwise players will need to create a new account on every server and there is no guarantee their username won't be taken, etc...

Maybe the best approach would be to develop a "lobby" client. This "lobby" client would be where players create an account and login. They would then enter a chat-room which would also have a list of all Battle City servers. For each server you would see who is online, and the server settings. This lobby is what could be minimized to the system-tray. When you select a server, your username+id will be sent-over (not password) so you can play there with your account without risk. All this of course, has an impact on the database structure...!

Just some ideas!

A few old changes to be undone.

I feel that a few of the older changed need to be undone for this game. I remember when mines did around 50% damage, that was a lot more fun than what they currently did.
Newbies seem to like mines, they are one of the easier weapons in the game to use, and currently, with 5 meds, a player can easily tank over mines. This is the first change I would wish to be undone, put the mines damage back up to around 50%

The second, I have already mentioned. We now have 5 med kits, I know this is so to make it more newbie friendly again, but I severely dislike it. Currently we have few people on, so we often have the issue of 1v1's, meaning the newbie takes 3 meds, and the pro takes 5 meds. He just tanks the whole battle, making it unfair for the newbie.

The third, 5 dfgs. Again, why? DFG's are the counterpart to Mines. When they were both lowered, it was even, then dfgs got 5, and it was already unfair for the attacker. Then you added flares. This is HORRIBLY unfair on defenders. 4 dfg's is much fairer, and 50% damage mines is 100% fair.

The last change, rotating cities. I think this one is an important one. Twice I heard this, or something akin to this being said;
'Durr, I have no cities saved for any of these'
This I have now realized, is a rather large problem. New players, generally join more than once at least. When they rejoin, they see new cities and thus need to start over again. I hope you put it back to the Normal starting cities, and have them increase as more players get on.

Make "drop-items upon death" a configurable option on the server

Since Deceth has been able to convince me that longer lives = more fun, and that more playing = more fun, I came up with this idea, that's actually rather well thought out.
The backpack will be an item (One per city) that will be buildable after the Med-Kits.
Remember back when privates died, they used to keep all their items? Well this is much the same concept. People holding a backpack item will keep all items (Aside from the backpack) When they die.
Currently the server population is obviously down, and therefor there are alot of One vs Ones. These often result in stand still battles, and hardly go anywhere. The backpack item gives both attackers and defenders an advantage, with attackers being able to capatalize on a nice and effective attack, and defenders being able to get right back to defending after they are killed.

Cannot build on area where a player died

You cannot build an area where a player died.
Simple fix in CCollision.cpp,
// For each possible player,
for (int a = 0; a < MAX_PLAYERS; a++) {
if (p->Player[a]->X-48 <= X_48 && p->Player[a]->X+48 >= (X-2)_48 && p->Player[a]->Y-48 <= Y_48 && p->Player[a]->Y+48 >= (Y-2)_48 && (p->Player[a]->isDead == false)) {
return 1;
}

Address the DirectDraw deprecation

DirectDraw has been deprecated; therefore, code needs to be refactored to use an active API. Developers may be more willing to contribute if they do not have to jump through hoops attempting to develop on deprecated technologies.

Which technology should replace our DirectDraw implementation? http://en.wikipedia.org/wiki/DirectDraw provides light on where the DirectDraw implementation has transitioned.

Reduce Total Number of Med-kits

Rushing said: "We now have 5 med kits, I know this is so to make it more newbie friendly again, but I severely dislike it. Currently we have few people on, so we often have the issue of 1v1's, meaning the newbie takes 3 meds, and the pro takes 5 meds. He just tanks the whole battle, making it unfair for the newbie."

Get a new updater

Look for an open source updater tool to replace the current one. Several reasons this is needed:

  • Source code for current updater is not available. It cannot be updated if needed.
  • Location for update files is hard-coded into updater. Therefore, nobody except for Looble can use the current updater.
  • Many people have reported that the updater is buggy, does not work for many people.

Slow Zone

Wall factory allows you to build a 'Slow Zone', again a 3x3 non-dense building, that when stepped on reduces speed by 50%. Needs no population, but can be bombed. Interesting idea; what if bullets travelled slowly along it too, and bombs took longer to blow? DFG's held you for longer too!

Points Based Newbie Bonus'

There has long been the debate that newbies should get some kind of bonus.
There had long been the anti-debate that smurfs will abuse it.
Well with the games population at an all time low, I feel this is the perfect opertunity to introduce something like this.
There are only a few 'Pros' who still play, and they are mainly nice and fun people, not the kind of person to remake just to get a small health bonus.
Which is my idea!
If someones Points are under 5000, then allow them to have 50% extra health.
Sure it's abusable, but I doubt anyone currently playing will do such a thing.
And it also creates a new kind of play, like,

Jizohn, I know you suck N all, wanna try on a smurf to give me a bit of a challenge?
or
Hey! Just for a small laugh, lets both play on smurfs and have some fun, like seeing how far into each others cities we can rush! :)

P.S
Sorry for my terrible post style in this, my brain has officially shut down.

Add a mini health bar next to tanks

Add a mini health bar next to everyone's tank. Something very frustrating newbies experience when playing BC is unsuccessfully trying to kill other people and saying things like "I hit you like 15 times".

All experienced players know dueling takes a lot more skill and that you have to aim a little further away from where they are on your screen to hit them.

If we had mini health bars, we could see when we hit the enemies and vice versa. It would help everyone learn to become better duelers and we could all make fun of the defenders who carry 2 meds.

Wall/Boulder Item

A cool feature I think, that could be fairly easially implemented would be a decoy house. Perhaps it is unlocked after you have the Cloak factory researched?
It would look like an ordinary house, however it would fully populate instantly, and wouldn't show up on the map.
Uses:
Preventing the usual method of killing a turret by building Decoy house behind them.
Blocking off certain pathways
Placing one where a key building that was bombed used to be.

Flash/Browser?

I have next to no information about Flash, Java or PHP. But how hard/would one go about/easy would be to create a browser based version of BattleCity?

Remove Rotating Cities. Go back to Standard List.

v4.0.0

  • Remove rotating cities. Leave functionality in-tact, but disable.
  • Have 9 starting cities. Open more as more players log-on.
  • Allow players to gain permanent access keys for any city via donation. Database will need to be updated to support this. Currently player can only have access to one city at a time. Must be made unlimited.

Rushing said:

"I think this one is an important one. Twice I heard this, or something akin to this being said;

'Durr, I have no cities saved for any of these'

This I have now realized, is a rather large problem. New players, generally join more than once at least. When they rejoin, they see new cities and thus need to start over again. I hope you put it back to the Normal starting cities, and have them increase as more players get on."

Make it easier to switch skins

Players like customizing the game.

  • Make a 'skins' folder
  • Inside the 'skins' folder have another folder for the 'default' theme.
  • Allow users to add folders into the skins folder containing their new theme.
  • Add a button or command that when pressed will change the users skin to the next one in the skins folder.
  • Save the path to the users current skin in a .ini file so that it is remembered the next time they login!

HELP WANTED ----- HELP WANTED ----- HELP WANTED

This is a big list of things to do. Not all items require programming skills. If you can help or contribute in any way, please do!

Another way to help is simply by sharing your input, ideas and bugs found!

Some things that are always needed:

  • new players (We need help marketing!)
  • new skins
  • new items
  • new buildings
  • new world maps
  • new city designs
  • new information shared on the wiki
  • Hosting and organization of events, competitions, leagues
  • new articles or forums posts to keep people coming back to the website
  • new developers! (The game is open source, let's put some students to work!)

Separate "Lobby" from client

The Lobby should be a separate application which acts as a chat room and list of servers.

  • When someone hosts a server, it will connect with the lobby so that the server is automatically displayed to all players. (This will make it possible for players to easily host temporary servers for clan practices or special events)
  • Lobby should display information about the server (Server name, map name, max players, welcome message)
  • Users should be able to password protect their server for private games
  • Lobby should give user option to practice offline (Right now, this would work by launching the server and connecting the user to 'localhost')

City saving bug

For some reason, when I create, for example, a large Gauntlet, when I save it, some building sections aren't added. It's not a sector issue, because parts of the city that where two or three sectors away were still built.
The only thing plausible is that those sections were off the (M) button On Screen Map

Reduce Flare Rate of Fire

4.0.0

  • Reduce flare rate of fire so that they are significantly less effective against a player stuck in a DFG.

Rushing said:

"Why 5 DFG's? DFG's are the counterpart to Mines. When they were both lowered, it was even, then dfgs got 5, and it was already unfair for the attacker. Then you added flares. This is HORRIBLY unfair on defenders. 4 dfg's is much fairer."

Compilation Errors

client\cgame.cpp(415) : error C2039: 'RequestAutoBuild' : is not a member of 'CProcess'
client\cgame.cpp(420) : error C2039: 'RequestSaveCity' : is not a member of 'CProcess'

client\cingame.cpp(252) : error C2653: 'CUtil' : is not a class or namespace name
client\cingame.cpp(252) : error C3861: 'getLineSplitOnSpace': identifier not found
client\cingame.cpp(336) : error C2653: 'CUtil' : is not a class or namespace name
client\cingame.cpp(336) : error C3861: 'getLineSplitOnSpace': identifier not found

client\cprocess.cpp(1944) : error C2039: 'splitStringIntoInts' : is not a member of 'CInGame'

1>BattleCity - 7 error(s), 12 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

If anyone can give any hints towards the source of any of these, it would be much appriciated

Secondary Advantages

Currently, only two buildings have secondary advantages;
The Med-Kit factory allows the hospital to be built.
The Orb Factory allows you to be orbed.

I think that most if not all buildings should have these abilities, I have already suggested one;
Cloak Factory allows the Decoy House to be built. I will post a few more now.

GPL v3 license update

Need to update the GPL v3 license to be applied at the top of each source file and mentioned on the start up of the server terminal application as defined in the license file. LICENSE_GPL.txt needs to be updated to not include the statements after "END OF TERMS AND CONDITIONS"

Please create a battlecity with no errors

Deceth can you please make a BattleCity source code that does not have so many errors for people who are new to programming just one that you can download and build without errors i don't care if it has warnings they don't matter

Issue with Labels on Wiki

As far as I have been able to concert, there is no Way for me to place a label on an issue. Surely this should be possible?

Code Documentation

Documenting the code could provide future developers a path for implementing new functionality.

Crash bug.

When a player clicks Exit, sometimes after they click okay it crashes.

Information on the bug:
It seems to only happen when the game is in fullscreen mode, I've never seen it happen in windowed.
It also only seems to happen if you press OK quickly Pressing exit, waiting 5 seconds, pressing OK and you don't crash. Atleast, not as often.
The more players that are on, the more it crashes.

admin password

okay so i got the code running and i can play the game. But what i don't know is the password
for the admin account is there one or do i have to make it myself. If so how on earth
do i do it?
One more thing this is off-topic but how do i get the admin panel running?

Grenade?!

A simple item that can fly over four tiles (Including dense tiles, i.e buildings ;) ) and will then 'detonate' sending a ring of laser shots flying out.
Useful for:

  • Attacking mayors who just sit and rebuild non stop instead of defending
  • Hitting some of those impossible to get turrets with more ease (Don't need to do the really hard hook shot move)
  • Defending from a far safer position (Within the city!)
  • Clearing mines and dfgs

Useful for newbies who can hide and live alot longer before needing to face to face confront enemies
Number of item: 3
Building Tree: Comes right after Cougars are done

I have nowhere else to put this =/ Wiki Development page

Would you people mind starting to use the Wiki Development Page that I created? It's very frustrating to need to check EVERY last page for even the smallest update. I would must rather just check the WDP, see Deceth: Added, I'm such a newb topic to Reasons why Deceth Sucks page.

Minimize to system tray, update icon with total players online

  • Ability to minimize Battle City in full screen or windowed mode
  • When minimized, show Battle City icon in system tray
  • Update icon in system tray to show total players online

Rushing said:

I know you aren't really interested in this project anymore Weebo, but if you had this small feature... well, just read;
"This is the 16th. Once the 26th comes unless someone steps up to the plate BC will go down for the count.

BC has two problems right now. First the server is about to be shut off. That problem is easy to fix.

Second problem is that it is hard to retain players. That problem we haven't been able to fix in a long time.

I have made a suggestion about a programing change to BC. The change is reading the population count which is already displayed and then sending that information out to the players as a pop up program or preferably as an Instant Message. I can not program so I will have to leave that to someone who can. I give my word that if someone create the program of which I desire a few things will happen. First I truly hope that the player count will rise as people will know when people are playing and that would also encourage/remind them to play. Second I give my word that if that is created for your efforts I will personally sponsor the battle city server for six months.

All those who read this, you decide. The countdown is on. 10 days left. Who shall rise to the occasion?

Overlord Genghis (Khan)"

Wiki page issue

Whenever I create a new wiki page, it shows up as grey on the main page (Even after I actually add the page). It's still clickable and shows the correct page in the side bar list of links.
The fix is to create a new page, and then delete that page again after updating. I don't know why it does this, but it's annoying. I'm really placing this in the wrong place, should be posted on the Github support thread. Why am I still talking? Look! A spoon! Wanders off rambling

Damage Pad

Bazooka Factory allows you to build a 'Damage pad', a 3x3 non-dense building, that when stepped on gives 10% damage to whoever stepped on it, friend or foe. Needs to be populated, and can be bombed like normal.

Mines should do more damage

Rushing said: "I remember when mines did around 50% damage, that was a lot more fun than what they currently did.

Newbies seem to like mines, they are one of the easier weapons in the game to use, and currently, with 5 meds, a player can easily tank over mines. This is the first change I would wish to be undone, put the mines damage back up to around 50%"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.