Author Topic: Knife Basketball  (Read 7408 times)

0 Members and 1 Guest are viewing this topic.

Offline W*

  • Major(1)
  • Posts: 4
Knife Basketball
« on: April 17, 2008, 05:45:54 pm »
Script Name: Knife Basketball
Original Author(s): W*
Core Version: 2.6.3



This is an implementation of basketball in Soldat - it came as a consequence to Knife Volleyball.

It uses a knife as the ball. The action is very fast and the game implements as much real-life rules as possible.

Rules:
  • You can handle the ball for max 2.6 seconds (this does NOT use Apponidle so it's EXACTLY 2.6 seconds).  If you don't throw the ball fast enough it's a foul.
  • You can steal the ball from another player by punching him. However there's a chance this action will result in a personal foul.
  • A team must complete its action in a given amount of time.
  • Successfully throwing the knife into the basket yelds 2 points.
  • Jumping from outside a certain area and then successfully throwing the knife into the basket yelds 3 points.
  • After scoring, or throwing the ball out at the side of the other team, all players of a team must rush back to their side of the court. Failing to do so will result in a foul. However this is not necessary if the other team throws the ball out at their own side.
  • After scoring, or out, the ball is respawned at the same side.

How to play:
  • The game is ideally played by 4 or 6 players. More than 6 usually generates too much confusion and mass-stealing.
  • The game is very immediate, and in my humble opinion really fun. There are no particular techniques to master, the best way to become proficient is just to play it a lot. With increasing experience you'll learn to anticipate where the knife will fall and what's the correct timing to attempt a steal.
  • The skills involved in attacking are simply jumping (to achieve a favourable position for throwing/passing, and to evade incoming defenders) and knife-throwing (to pass successfully, and obviously to score).
  • Defending benefits from some tactical insight. A successful intercept or block requires good timing.
  • A key defending ability is 'disturbing'. When a player attempts to score he well get a scoring chance (expressed in %) that depends on two factors: distance from the basket and 'disturb' amount. Disturb occurs when there's one or more nearby enemies. The closer (and the more) they are, the less chances of scoring.
  • A successful throw will become an actual scoring according to the scoring chance described above. If this chance is not met, the knife/ball will randomly bounce over the basket (rim) until it falls out the basket, gets intercepted, or finally goes 'into the net' (hence scoring).
  • The above implies, gameplay-wise, that is always worth for one player of the defending team to go and disturb a tentative scorer, while another player should wait for a possible bounce and try to get the rebound.
  • Conversely an attacker should try its best to evade and mis-direct defenders in order to get a clear shot, that is much more likely to go in. A teammate should if possible rush to try and get the ball after bounce, dunking the ball in right away.
  • In general, there are no clear 'roles', nonetheless teammates should maintain a certain distance, and avoid rushing all to the ball every time - if nobody catches the ball the enemy will have a chance to a fast (and easy) counter-attack.

Technical considerations:
The game is NOT 100% bugs-free. There are many server-client lag issues which will result in disappearing knives, two knives present, etc. When playing remember that the SERVER decides, so don't trust your soldat client - if you see you got the knife but you don't see 'BALL', then you did NOT get the knife. The rule of thumb is: the more general lag, the more bugs. And as a corollary, the more players, the more bugs.

The higher rate of knife-exchanges (especially due to stealing) in basketball leads to a higher frequency of bugs. In order to lessen its unpleasant effects I had to enforce a frequent general status check, that will straight things out - e.g. remove any 'second' knife that could be present and make sure that the 'legitimate' ball-owner (as seen by the server) actually has a ball to handle.

It works - the 'disappearing knife' should occur, hopefully, not much often (and when it does, just wait a few seconds for a foul to be called - its actually another check ;) ) - but a side effect is that you could get a 'confirmed' knife (and see 'BALL' in your screen) that disappears shortly after, in favour of another player (who also had a 'confirmed' knife in the same exact moment). It can be sometimes confusing but it's not difficult to get used to; and I think it does not hinder the enjoyability of the game.

There were additionally other soldat-related problems (like the instance of a player catching the knife and immediatly turning, that results in the curious behaviour of soldat thinking he loses and regains the knife in a matter of millisecods) that had to be addressed by other checks and exceptions.

I'm very open to opinions/suggestions regarding these bugs and ways to overcome them.

Also: do NOT enable free throws (see code), it's not 100% working yet.

Where to play:

edit: added soldat.ini and mapslist.txt inside the zip, and attached 2 kb concept maps - there's a nice 3rd one by MetalWarrior, but it needs some editing. Mapmaking: see the concept maps, it should all be quite straightforward. If not, feel free to make additional inquiries.
« Last Edit: June 01, 2008, 10:48:00 am by W* »

Offline Kagesha

  • Flagrunner
  • ****
  • Posts: 702
  • cunts
Re: Knife Basketball
« Reply #1 on: April 17, 2008, 06:11:36 pm »
hahaha i love both Soldat and basketball and for you to put them together is pretty awesome! I have downloaded it but i'm confused on what to do with everything :P Oh and also what maps are used for this?

Offline W*

  • Major(1)
  • Posts: 4
Re: Knife Basketball
« Reply #2 on: April 17, 2008, 07:37:01 pm »
Uh well, re-download the stuff and extract it to your soldatserver folder, edit soldat.ini (that is provided now - admin pw is advisable). The script loads kb_weapons automatically.
I added two concept maps to 1st post (I had forgotten - again).
If anyone is interested in setting up a 'knife sports' server like my own testserver (it cycles thru kv and kb maps) let me know and I will assist - I can provide my own setup, or ScriptsManager will do as well. It would be VERY nice to have such a server since my own connection is unstable/has sometimes ugly ping/i do experiments with the server etc etc.

Offline Kagesha

  • Flagrunner
  • ****
  • Posts: 702
  • cunts
Re: Knife Basketball
« Reply #3 on: April 17, 2008, 07:53:44 pm »
Yea i might be able to intrest the one particular nz server because they are still deciding on a script to put on their server..

Offline PANTERA

  • Soldat Beta Team
  • Major(1)
  • ******
  • Posts: 34
  • Italian Community Founder
    • Soldat Italia
Re: Knife Basketball
« Reply #4 on: April 29, 2008, 11:30:09 am »
I think that Idling bot are NOT the best solution for the basket system. I suggest also to use stationary guns for delimiting playing field areas. But maybe I just gave a fast and superficial look to the code. Have a look at my mod, which shares much of the ideas of this one: http://forums.soldat.pl/index.php?topic=26130.0 good mod anyway :P

Offline Sir Jeremy

  • Flagrunner
  • ****
  • Posts: 691
  • Eurolicous!
Re: Knife Basketball
« Reply #5 on: April 29, 2008, 10:01:22 pm »
Lmao This I got to see..

Basketball with knifes..sounds ..dangerous.

Offline Meecrob

  • Major
  • *
  • Posts: 96
  • If god was a banana would jesus be an orange?
    • Mecksicko
Re: Knife Basketball
« Reply #6 on: June 22, 2008, 04:47:41 am »
sounds fun

Offline NailsForLunch

  • Major(1)
  • Posts: 18
Re: Knife Basketball
« Reply #7 on: October 22, 2008, 01:05:50 am »
I can never get the script to work, for some unknown reason..