GoPinball.com
http://gopinball.com/forum/

MEDIEVAL MADNESS Update
http://gopinball.com/forum/viewtopic.php?f=3&t=6476
Page 2 of 6

Author:  Gimli [ Wed Sep 20, 2017 11:10 am ]
Post subject:  Re: MEDIEVAL MADNESS Update

So you would have 30 arrays or so?
Whatevergameevent(currentplayer)

I do a similar thing but have all events stored in a single array
ArrayA(currentplayer),

This is essentially what you have done,but I take all of your current player variables and assign them each a position in a enveloping overarching array


At the same time I enable save game states, by converting
ArrayA(player1) to a String(Player1)
And assign to nvS1 etc....

Author:  Flug [ Wed Sep 20, 2017 12:04 pm ]
Post subject:  Re: MEDIEVAL MADNESS Update

Gimli wrote:
So you would have 30 arrays or so?
Whatevergameevent(currentplayer)

I do a similar thing but have all events stored in a single array
ArrayA(currentplayer),

This is essentially what you have done,but I take all of your current player variables and assign them each a position in a enveloping overarching array


Hey there. Yeah, you're correct. There are a bunch of 4 element arrays. Your approach sounds good too if I understood you correctly. So, you have one 4 element array.
Code:
Dim OutsideArray(4)
Dim InnerArray(50)  ' Assuming 50 events

' Or in 1 Line
Dim OutsideArray(4, 50)


So using it would be like:
Code:
Const cBonusLit = 1
Const cBallsLeft = 2
Const cScore = 3

Dim OutsideArray(4)
Dim Player1Array(50)
Dim Player2Array(50) ' through 4...

Player1Array(cBonusLit) = TRUE
Player1Array(cBallsLeft) = 2
Player1Array(cScore) = 50250

OutsideArray(1) = Player1Array


I actually like this way better (assuming I'm on the correct path...):
Code:
Dim OutsideArray(4, 50)
OutsideArray(1, cBonusLit) = TRUE
OutsideArray(1, cBallsLeft) = 2
OutsideArray(1, cScore) = 50250
' ...
OutsideArray(CurrentPlayer, cBonusLit) = (OutsideArray(CurrentPlayer, cBallsLeft) > 2)


Is that correct? It's almost like having a bitmask per player. I like the idea of saving state; that's a big win for those that want that functionality. Thank you for sharing!

Author:  Gimli [ Wed Sep 20, 2017 12:46 pm ]
Post subject:  Re: MEDIEVAL MADNESS Update

Your coding knowledge is
More advanced than mine
But essentially your understanding is correct

Dim ArrayA(4)
Then I copy and paste an Array template by Wecoc that defines how the array is processed, allowing for 99 events within

But, because I am converting to Strings for save states, and saving to nvS1-16 , and each nvS only allows 32 numbers, my array is constrained from 99 to 32.

To confuse you even more, Ravarcade
Gave me a code to allow two strings to be compressed into one nvS :-)

Author:  Gimli [ Wed Sep 20, 2017 12:51 pm ]
Post subject:  Re: MEDIEVAL MADNESS Update

Saving states also has the potential to double the events you want saved!
Depending if a save state saves only at the beginning or end of a turn or during play in the middle of multi ball or a mini game

Author:  Gimli [ Wed Sep 20, 2017 12:54 pm ]
Post subject:  Re: MEDIEVAL MADNESS Update

If you download the dark knight ultimatum it has my most advanced save states where you can save and restore during mini Games

Author:  Gimli [ Wed Sep 20, 2017 7:31 pm ]
Post subject:  Re: MEDIEVAL MADNESS Update

Sorry to blather on Flug, it was great therapy. By all means release your mod !

Author:  Flug [ Wed Sep 20, 2017 9:29 pm ]
Post subject:  Re: MEDIEVAL MADNESS Update

Gimli wrote:
Sorry to blather on Flug, it was great therapy. By all means release your mod !


Heh, no worries at all. I actually took the code base and modified it to use a multidimensional array like you mentioned (and I mocked up before). Need to do more testing, but so far it seems to have been a clean transition.

Once it's solid (I swear every time I have a good game I come across something...) I will upload. Thanks for the messages; really appreciate the conversation.

Author:  Gimli [ Wed Sep 20, 2017 10:44 pm ]
Post subject:  Re: MEDIEVAL MADNESS Update

Cool
Thx and good luck!!!
Welcome to FP!

Author:  gibsmedat [ Sun Oct 08, 2017 9:53 pm ]
Post subject:  Re: MEDIEVAL MADNESS Update

The last version of MM available from SLAM was v1.02. I changed a few graphics as seen in my abandon thread and uploaded it to http://www97.zippyshare.com/v/jgL8BdRU/file.html
If you fixed some stuff in the script I am always interested, but you should probably use the 1.02 version as base. The physics on that one are 2.7. Maybe post the script changes here when you're done? I'd appreciate that.

the last changes as per his script were
' ULTIMATE Edition 1.02:

' improved all lighting effects
' fixed a few bugs
' improved geometry

Author:  GeorgeH [ Sun Oct 08, 2017 11:09 pm ]
Post subject:  Re: MEDIEVAL MADNESS Update

Fung,

Is this your posting?

http://www.pinsimdb.org/pinball/table-2 ... s_(m-m_1_3)

George

Page 2 of 6 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/