Author Topic: Scripting multi-player games  (Read 3052 times)

0 Members and 1 Guest are viewing this topic.

Offline erwin

  • Sr. Member
  • ****
  • Posts: 314
    • View Profile
Scripting multi-player games
« on: July 04, 2014, 11:27:01 pm »
I was wondering - should multi-player games be quest rewards, or could we possibly have a room somewhere in Recall with such games?

Games such as poker, hearts, bridge, maybe some "card" games like Munchkins / Acromage / etc.
« Last Edit: July 04, 2014, 11:29:07 pm by erwin »

Offline Kvetch

  • Administrator
  • Hero Member
  • *****
  • Posts: 728
    • View Profile
    • Email
Re: Scripting multi-player games
« Reply #1 on: July 05, 2014, 08:15:08 am »
So... you want to open an arcade near recall?  Is that what I'm hearing?  Charge 25 cents per play - wait, I think everything is 50 cents now - showing my age...  It is an interesting thought and maybe, even though I was joking as I was writing it, it could be a small "gold sink".

Offline erwin

  • Sr. Member
  • ****
  • Posts: 314
    • View Profile
Re: Scripting multi-player games
« Reply #2 on: July 05, 2014, 09:52:56 am »
Well, not really arcade, but more of games where two or more people can play, without any mobs (or rather, I could try scripting an AI system, but it might take up too much memory)...

Offline erwin

  • Sr. Member
  • ****
  • Posts: 314
    • View Profile
Re: Scripting multi-player games
« Reply #3 on: July 05, 2014, 12:03:38 pm »
Maybe I should change my house location to be at Recall, add in a few games, and write a script that transfers gold paid into my bank account...

But seriously, I think we could have some function triggers, such as:

1. A function trigger to generate and shuffle cards (Rumble's trigger on TBA to shuffle cards isn't very efficient - he uses a random number generator, if the number picked is a drawn card, the random number trigger fires again until he picks a card that hasn't been chosen. It's not that bad for a two player game of blackjack, but when there are very few cards left in the deck, the trigger takes more time than expected. Was thinking of rewriting it as create an array of 52 numbers, pick 1 randomly, reduce array by 1, pick 1 randomly, etc.)

2. A function trigger to divide an array of cards into m groups, corresponding to m number of players. Remainder gets discarded.

3. A function trigger to sort each group of cards either by denomination, or by suit. i.e. so the player sees a nice ordered list of something like: 3C,4C,5C,6C,JD, QD,KD,AD, 2H, QH, KH, 3S,7S (in suits and increasing order, or if the game doesn't care about suits, we'd have 2H,3C,3S,4C,5C,6C,7C,JD,QD,KD,KH,AD), instead of randomly shown cards.

4. A function trigger to replace an item in a grid (eg like the battleship one), so we can easily replace ....... with ...*... eg.

5. (Whatever is needed for such games..)

Cause if we had these triggers, then players could script a lot of card games (just writing a script for valid moves) with function triggers 1-3, and function triggers 4 for grid type games.

These games won't be playing with mobs, but playing with other players. So yeah, instead of four people idling at recall, we could have four people playing bridge at recall.... and we can claim to be one of the only tbaMUD/circleMUD with such games..


An example of a 2 player game - you can go on 6002, load obj 33712, find someone else / use another player character and test it out.
« Last Edit: July 05, 2014, 12:08:34 pm by erwin »

Offline erwin

  • Sr. Member
  • ****
  • Posts: 314
    • View Profile
Re: Scripting multi-player games
« Reply #4 on: July 05, 2014, 12:21:19 pm »
Actually, once/if/maybe/some years in the future/???when I finish my African Zone, I might work on a new zone called The 4D Lost Wages Casino...