Register    Login    Forum    FAQ    PinSimDB.org

Board index » Future Pinball » Tables WIP




Post new topic Reply to topic  [ 53 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: MEDIEVAL MADNESS Update
 Post Posted: Mon Sep 18, 2017 4:15 pm 
Offline

Joined: Mon Sep 18, 2017 3:49 pm
Posts: 23
Location: Chicago, USA
Hey everyone. I decided to get my feet wet with scripting within Future Pinball and the first table I mucked with is MEDIEVAL MADNESS. It's already a great table, but pretty difficult... Let me back up a little...

I've been trying to get my kids interested in pinball, and they both liked this table. So first I made it fully multi-player (up to 4 players). Now they'd play, but it was 'too hard' (they're kids...) So to help make it more 'exciting' for them I modified it so that it's easier to get castle hits, royal madness mode and even to the final battle. I even updated the second half of the final battle to include the Trolls. Speaking of trolls, I fixed it so they won't disappear if hit while moving up. Also fixed some scoring bugs (10 mill vs 1 mill, bonuses not resetting on extra ball, etc...)

The reason I'm posting this is to see if there is any interest in sharing these modifications. Admittedly, it can get to be a bit of a button-masher at times. Also, due to multiple modes running at the same time the DMD can get a little crazy and I have seen a race condition or two. But, it is easier and I think it's fun. I guess my hesitation is that I don't want to offend or tick anyone off with the rule changes...

Anyways, is this worth sharing, or will it just upset folks? Thanks for your feedback and opinions!


Top 
 Profile  
 
 Post subject: Re: MEDIEVAL MADNESS Update
 Post Posted: Mon Sep 18, 2017 8:25 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 1708
Location: Ontario, Canada
Which version are you playing?
Do you use BAM?


Top 
 Profile  
 
 Post subject: Re: MEDIEVAL MADNESS Update
 Post Posted: Tue Sep 19, 2017 12:27 am 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 1264
Location: Arkansas, USA
This is one of Francisco's tables. He is not around anymore but he usually let anyone mod his tables. Personally, I'm interested in multiplayer but don't really super interested in in an easier version. ...But I am sure other wold be. I'd say go ahead and post your version on PinSimDB.org.

George


Top 
 Profile  
 
 Post subject: Re: MEDIEVAL MADNESS Update
 Post Posted: Tue Sep 19, 2017 7:48 am 
Offline

Joined: Mon Sep 18, 2017 3:49 pm
Posts: 23
Location: Chicago, USA
Hey guys. Thanks for the feedback. The version that I started with was SLAMT1LTs Mod, the ULTRA Edition 1.01.

Another thought I had was to undo the logic changes so it plays more like the original Mod, but that would take some time. Anyways, thanks again guys.

_________________
--flug


Top 
 Profile  
 
 Post subject: Re: MEDIEVAL MADNESS Update
 Post Posted: Tue Sep 19, 2017 12:19 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 1708
Location: Ontario, Canada
If you are familiar with Bam, you should try Monezzas mod as I believe the physics were better and the flipper aiming was improved and graphics are stunning

Quote:
So first I made it fully multi-player (up to 4 players).


What do you mean "Fully Multi-player" ?


Top 
 Profile  
 
 Post subject: Re: MEDIEVAL MADNESS Update
 Post Posted: Tue Sep 19, 2017 3:30 pm 
Offline

Joined: Mon Sep 18, 2017 3:49 pm
Posts: 23
Location: Chicago, USA
Quote:
Quote:
So first I made it fully multi-player (up to 4 players).


What do you mean "Fully Multi-player" ?


It now supports up to 4 players. Originally it would let you play 4 players, but the goals of the game were not tracked correctly; you would never make it to the final battle. So, it now tracks everything per player so when it's your turn again, you're facing the correct king, and all the progress is adjusted correctly.

I will check out that over version. And yes, I do use BAM; love it. Thanks!

_________________
--flug


Top 
 Profile  
 
 Post subject: Re: MEDIEVAL MADNESS Update
 Post Posted: Tue Sep 19, 2017 3:51 pm 
Offline

Joined: Mon Sep 18, 2017 3:49 pm
Posts: 23
Location: Chicago, USA
One other quick note.... I did not adjust the models or lighting or anything like that. I modified the code/game logic. I will see if I can apply it to the version that Monezzas created. Thanks again.

_________________
--flug


Top 
 Profile  
 
 Post subject: Re: MEDIEVAL MADNESS Update
 Post Posted: Tue Sep 19, 2017 4:49 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 1708
Location: Ontario, Canada
Quote:
It now supports up to 4 players. Originally it would let you play 4 players, but the goals of the game were not tracked correctly;


Well done.
I would love to see what you've done.
SLAMT1LT claimed to have "multiplayer friendly" tables but they were only partially implemented.

I suspect you use the DIM shell game approach?
Code:
Dim KingProgress
Dim KingProgressPlayer1
Dim KingProgressPlayer2
Dim KingProgressPlayer3
Dim KingProgressPlayer4


For example at the end of Player3's turn

Code:
KingProgressPlayer3 = KingProgress


and at beginning of Player3's turn

Code:
KingProgress = KingProgressPlayer3


Top 
 Profile  
 
 Post subject: Re: MEDIEVAL MADNESS Update
 Post Posted: Wed Sep 20, 2017 10:05 am 
Offline

Joined: Mon Sep 18, 2017 3:49 pm
Posts: 23
Location: Chicago, USA
Gimli wrote:
Quote:
It now supports up to 4 players. Originally it would let you play 4 players, but the goals of the game were not tracked correctly;


Well done.
I would love to see what you've done.

I suspect you use the DIM shell game approach?

Hey Gimli. I saw the approach you're talking about in SLAMT1LTs Star Trek table. At some point he suggested someone make Star Trek multiplayer, but I thought I'd finish my Midieval Madness shtuff first. That said, I did not use the Shell game approach...

What I did was use arrays for each variable that needs to be player specific. There are chunks/examples of this in the default table script:
Code:
' initialise all the variables which are used for the duration of the game
' (do all players incase any new ones start a game)
For i = 1 To constMaxPlayers
   ' Bonus Points for the current player
   BonusPoints(i)   = 0
   ' Initial Bonus Multiplier
   BonusMultiplier(i) = 1
   ' Balls Per Game
   BallsRemaining(i) = nvBallsPerGame
   ' Number of EB's out-standing
   ExtraBallsAwards(i) = 0
Next


Even in the original code for this table, the AddScore references some Arrays
    nvScore(CurrentPlayer)
    BallsRemaining(CurrentPlayer)

Being that I was new to FP scripting, I figured I should do what the original authors did. In the end, I think it's cleaner (just my personal opinion).

For example, to track the number of times the castle has been hit I use:
Code:
'Original Code
dim Castlegatehits

'Multi-Player Code
Dim CastleGateHits(4)


Then, wherever the original CastleGateHits was used, you change it to:
Code:
CastleGateHits(CurrentPlayer)


This change is actually pretty simple as a Find/Replace does almost all the work for you. Here is an example of the change...
Code:
'Original Code
CastlegateHits = CastlegateHits + 1

'Multi-Player Code
CastleGateHits(CurrentPlayer) = CastleGateHits(CurrentPlayer) + 1


Doing it this way avoids all those extra Player1-4 variables as well as swapping values to/from them. You do still need to adjust the table when a player starts a new ball though. Most of the tables I've look at use the targets and lights to determine the game logic, so setting these appropriately (which should happen anyways) is important. It's not difficult, but necessary.

On a side note, I did modify a bunch of code to use the Array variables instead of the status of a light or target. This is much more consistent, and makes multi-player very easy to implement. For example, when you hit a joust target, you simply increment the joust target counter, then call a Sub to adjust the lights (based on the joust target counter). This same Sub is then used when a player starts a new ball, or after multiball, or after the final battle, etc... Very clean and consistent.

I also use helper Subs a lot rather than copy/pasted code. In the end, the lines of code drop from roughly 15k to 9k.

Anyways, using the same example, when a new player starts, you need to set the Castle up (lower/raise the bridge, open/close the gate). This code does that:
Code:
Select Case (CastleGateHits(CurrentPlayer) - 1) ' Reset the castle
   Case 1, 2, 6, 7, 8, 13, 14, 15, 16, 22, 23, 24, 25, 26, 33, 34, 35, 36, 37, 38, 46, 47, 48, 49, 50, 51, 52
      OpenGate FALSE
      LowerBridge TRUE
      BulbCF1.State = BulbOff
      BulbCF2.State = BulbOff
      BulbCF3.State = BulbOff
   Case 3, 9, 17, 27, 39, 53
      OpenGate TRUE
      LowerBridge TRUE
      CastleOnFire
   Case Else
      OpenGate FALSE
      LowerBridge FALSE
      BulbCF1.State = BulbOff
      BulbCF2.State = BulbOff
      BulbCF3.State = BulbOff
End Select


The above also contains an example of 2 Subs I added:
    LowerBridge
    OpenGate

This helps makes the code more compact (again, a personal preference), but also lets me easily add new logic that will happen every time the Gate is modified. For instance it will only play the "LowerGate" sound if the status of the gate is actually changing. Imagine player 1s turn ends and the Gate is down. When player two starts, it will call OpenGate to set it appropriately for Player 2. So, if Player 2 needs the gate down (and it already is), don't play a sound. It's the little things like that which I try to accommodate.

I do enjoy writing FP script, so if you know anyone who needs some scripting help, I'm willing and happy to jump in and try to help.

Hopefully this information is helpful.

_________________
--flug


Top 
 Profile  
 
 Post subject: Re: MEDIEVAL MADNESS Update
 Post Posted: Wed Sep 20, 2017 11:06 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 1708
Location: Ontario, Canada
Wow!!!
Very good. Finally someone who cares about the nuances of MP games!!
1. Dim shell game Slamt1lt
2. Arrays
a. Flug method
b.Gimli method


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 53 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next

Board index » Future Pinball » Tables WIP


Who is online

Users browsing this forum: No registered users and 4 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to: