Register    Login    Forum    FAQ    PinSimDB.org

Board index » Future Pinball » Tables Release




Post new topic Reply to topic  [ 39 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: fpxEngine table builder
 Post Posted: Mon Dec 25, 2017 9:06 pm 
Offline

Joined: Tue May 01, 2012 11:13 pm
Posts: 408
Location: Abbotsford
We all hate scripting. In fact most people (like 99.99 % of the entire planet) when they look at a bunch of code, find it so intimidating and complex that they won't even try. Others just don't even have the time to learn how to script, it's months of study and learning. The biggest problem with Future Pinball (and especially VPX now) is the scripting, it was always the scripting, and will be the scripting in the future.

The FPx template is designed to replace the stock New Table template in Future Pinball. This one will be aimed right at beginners, in fact, with luck, it may work exactly like the Pinball Construction set. This not only fixes the bugs and incompleteness of the New_table template, it also adds more features that every beginner would want, and then presents it in such a way to make it as easy to use as possible.

It is so easy to mess up a script, especially the high level code of a scoring and logic template. Even advanced coders can mess up pretty easily, because all the code is MIXED IN together. FPx divides the script in to 2 parts, with the first part a user section, and the second portion the actual engine. The engine contains "Hooks" to the user section, this allows just about everyone to make simple changes without needing to touch the engine at all, and yet be able to use one of the most powerful, full featured engines available for Future Pinball.

The FPx template is designed for those who want to get their feet wet with scripting, and yet has all the power and features for Intermediate coders to use.

Build 10

' 4 players support
' Bonus count up to 159, bonus multiplier up to 15x
' Replaced tilt system with a custom plumb bob tilt setup
' Added Variables for easy settings. balls per game, bonus, replay scoring etc
' 2 ball multiball
' Player memory system that requires typing in one line of code per light
' ball save, extra ball, special and jackpot support
' Complete routines included for all aspects of arcade tables, from power up, light Attract mode to a match feature
' Initialization, Light Attract, Match routines all ready included
' easy control of lights for Light Attract and game play, no typing required
' Pause key plays tune
' 9 element x4 translight display, HUD display x2 A.N.D. (Alpha Numeric Display) to support up to Williams System 11
' HUD display can be hidden or shown using the default HUD key set in the editor (Usually the tithe key, just below the esc key)
' Pre-set unified Bally type scoring
' Debug system variable for code testing in place. press F9 key at editor. Also writes to text file during debug mode to track code
' Special HUD displays for debug mode, shows bonus etc
' Multiple sound system capability with background music support
' Solid State and A.N.D. support HUD display
' Preset feature scoring Extra ball/Special etc with just one line of code
' Easy Beginners Fail safe system. All access needed for easy modification of the engine in ONE place without needing to touch the engine code
' You can add/remove/replace lights, sounds, change the display, adjust timers etc through this one setup
' Code is heavily remarked, and teaches you new methods as you work your way down the hit code
' Engine is fully automated as possible, so no need to touch the engine code, no rocket science degree needed.

Build 11

- fpxEngine is now so simple even a person with no coding experience can use it (scriptwise that is)
- fpxEngine has been completely restructured and rewritten. It is now the easiest template engine to use since Pinball Construction Kit
- fpxEngine now has a manual, that describes a lot more than you would think
- Preset section added. all accessed with one line of code to multiple scoring routines. Just point and shoot
- Bug fixes etc.
- Light Attract routine expanded, now displays high score list, table name. This is now fully automated, so no need to add light bulb interval/on/off code
- BAM support added with a simple system for the user to select among multiple xml physics files and a up to 10 different flipper bounce settings.
- Select-able Debug mode (press f9 key in editor) now shows general table info including physics package or engine debug information
- New Display and Light Seq routines added
- New Control routine added, which adds multiple music set support, with the ability to customize all displays/lightSeq/music per music set. Support added for Williams System 7 and early 1979 music sets.
- Users should be able to play any music set/company style with any fpx table
- All display and lightseq code is also usable in code as well (e.g. AddDisplay "BlinkMessageFast":AddLightFX "BlinkFast")
- HUD displays expanded from 2 to 4 displays, to match the translight displays. This is for possible future support of Williams/Bally system11
' and Data East tables
- all music/sound code has been (or will be by the time the next build is released) moved to the main control routine (AddMusicSet) so we can have multiple styles without the user having to do anything
- Multiple background sound support (up to 29) using increasing frequency/pitch common with Solid State games.
- There are about 15 display routines now coded, with 6 new routines added. (More will come)
- AddEvent has been stripped of any code completely. Now it is just for typing in messages for the display to use, and your custom code hooks like what to do with a new ball etc.

Build 12

(In progress)
- Fixed: Bam "fix" breaking nvHighscore. From now on, you need to set the highscore and names in the script. You will find how to do that right here
- Fixed: textdebug now shows proper information in debug mode. This appears to happen with slower computers, or the debug mode just isn't fast enough to write too much text
- Removed music/light/display routines not used.
- Drain code fixed to allow main music feature to finish playing before bonus count started. (TimerDrain)
- Added some mechanical sounds
- constAddDebug has different settings based on number
1 = shows engine subroutines and addEngineEvent
2 = shows AddMusicSet subroutines and the music case it is playing. This also now shows AddLightFX and AddDisplay subroutine calls
- Renamed some things, deleted unused routines. LightAttract scroll effect slowed, replaced table name showing with replay goal instead
- Added Mystery Feature. Player can set minimum and maximum values for a random score
- AddScoringEvent sections included in the manual with copies of the code used by the engine and complete description for coders
- AddDisplay new additions: "Radar"
- HUD key added (show HUD/ Hide HUD) Because BAM uses the default HUD key for it's own menu, a second HUD key is added set to the "H" key. nvR and nvS support is added, the table will now save menu settings.
- Table Menu system added. Use "M" key and then flipper buttons to change options
You have to exit the table and restart the table again for the changes to take place.
- Save/Load system added. This saves number of Balls per Game, scroll/no scroll, high scores plus high score names, plunger type (enter key or arrow keys) and 3 difficulty levels
- Manual has been updated, and almost completely rewritten in spots. quite a few new pages have been added.

BAM Support
- Support added for flipper and ball shadows
- Custom ball, including blinking ball based off example by ravacade (turned off by default)
- Some small improvements made, and some additional support. None of the fancy stuff nor is it up to standard with the newer tables.

http://www.pinballnirvana.com/forums/do ... le&id=5344

_________________
_____________________________________

Latest projects and rants at My Facebook Page
_____________________________________

Latest Project: fpxEngine


Last edited by blue on Fri Sep 27, 2019 3:06 pm, edited 1 time in total.

Top 
 Profile  
 
 Post subject: Re: FPx Table Template v1
 Post Posted: Mon Dec 17, 2018 5:54 pm 
Offline
User avatar

Joined: Thu Jan 26, 2017 6:48 pm
Posts: 58
Location: Australia
Blue, I'm making a table using your template and mostly it works really well. But there is one thing I cannot work out. I have a diverter gate on the right outlane that leads back to the shooter lane. It is set to close after the ball exits via the outlane or hits the drain. But the problem I have is that when multiball is enabled and one ball drains it closes the gate. I dont want that to happen until the second ball drains or exits the outlane. How can I script it so that it doesnt close on draining the first multiball?


Top 
 Profile  
 
 Post subject: Re: FPx Table Template v1
 Post Posted: Mon Dec 17, 2018 10:51 pm 
Offline

Joined: Wed Nov 17, 2010 7:41 pm
Posts: 947
Great job Blue! I've been writing code for FP for almost a decade, and so coding is second nature to me now, but when I started out....oh boy, just mumbo jumbo. But when you get going, you soon realise that coding is where all the creativity is. It's like being a film director - the sets are all built; the cameras and lights are set up; the actors are ready.....now make it all happen.

It's not at all boring when you get going, too much fun in fact. But afterwards, when it's all done and you're just bug fixing, then it sucks.


Top 
 Profile  
 
 Post subject: Re: FPx Table Template v1
 Post Posted: Tue Dec 18, 2018 1:19 am 
Offline

Joined: Tue May 01, 2012 11:13 pm
Posts: 408
Location: Abbotsford
Quickly as limited time. No idea where your code is actually placed, but I figured it's wrong.

Simple way...
Put the code in the AddEvent "NEW_BALL" Subroutine, the entire engine is set up to do it this way. "NEW_BALL" is the case setting. This is used to reset the table for each new ball after the previous Player is finished his bonus and drain hit routines. In fact most arcade tables did it this way before full fledged computers took over the code.

(NOTE: "DRAINDELAY" is used more as a delay at a drain hit before the bonus system starts counting.)

@ Slam. Thanks, something like this is so badly needed, so it's just nice someone is actually using it.

_________________
_____________________________________

Latest projects and rants at My Facebook Page
_____________________________________

Latest Project: fpxEngine


Top 
 Profile  
 
 Post subject: Re: FPx Table Template v1
 Post Posted: Tue Dec 18, 2018 3:26 pm 
Offline
User avatar

Joined: Thu Jan 26, 2017 6:48 pm
Posts: 58
Location: Australia
Thanks Blue, moving the close diverter code to the "NEW_BALL" Subroutine worked


Top 
 Profile  
 
 Post subject: Re: FPx Table Template v1
 Post Posted: Thu May 23, 2019 5:59 pm 
Offline

Joined: Tue May 01, 2012 11:13 pm
Posts: 408
Location: Abbotsford
Since I was on Hiatus to work on my new design (dubbed "project x" for lack of a better name) and it's now to the point that I can start testing the play, I needed a engine, and the only game in town for something like that one is FPX.

After a while I started adding in more advanced coding from Jungle girl, (guess I was in a scripting mood, which is very rare for me) and now decided to kill 2 birds with one stone, and hopefully release a new build of the FPX engine shortly.

Here's what I have so far for additions

'Build1.1
' NOTE: THIS is still being worked on. At the present moment, I am just starting work on moving the music/sound/display code to AddMusicSet().
' - Bug fixes etc
' - Light Attract routine expanded, now displays high score list, table name. This is now fully automated, so no need to add light bulb interval/on/off code
' - BAM support added with a simple system for the user to select among multiple xml physics files and a up to 10 different flipper bounce settings. All
' the user has to do is change a number at the top of the script. The Flipper bounce settings has 10 settings defined, for both high and low ball speed
' flipper bounce, based on the latest xml by GeorgeH. The low bounce settings will automatically adjust based on a math formula
'- The user can change the physic settings at the top of the list. Selectable are the xml, bounce, flipper Omega (force) and ball speed.

' Physics settings
' xPhysicsXML=1 ' Set the xml physics package you want here. 0= No XML(default xml in BAM (NOT TESTED YET)) 1=BAM Team xml 2=Jungle Girl XML by shiva
' fpxSetBounce=7 ' set the amount of "flipper Bounce". From 1 to 10, with 1 being the slowest and 10 the fastest. 6 is a good default value
' xMaxBallSpeed = 3500 ' Set the maximum speed a ball will play. This adds the value to xBAM.BallSpeedLimit
' const MaxOmega = 50 ' Default Max force for All flippers. Must be > MinOmega. These are here in case the omegas are not defined in the xml
' const MinOmega = 18 ' Default Min force for All flippers Must be < MaxOmega. These are here in case the omegas are not defined in the xml

'- FlipperBounce has 2 values, one for a faster ball, and one for a slow ball. Normally this is set to 200, but after tests with a cradled ball, it shows that when the flipper is dropped
' the pick picks up speed to 380 by the time it leaves the tip of the flipper, so the low ball setting has been changed to 400
'- Debug mode (press f9 key in editor) now shows general table info including physics package
' - New Display and Light Seq routines added
' - New Control routine added, which adds multiple soundset support, with the ability to customize all displays/lightSeq/music per soundset. The FPX engine
' has Bally (1982) music and routines, but shortly Williams System 4/5 will be added, with it's own set of code. The user can set which set he wants
' with one change in code and this feature can also be scripted. The new soundset system can support any amount of different sets, so sets from other
' eras or companies like Stern/gottlieb can also be added. (This requires coding) Users should be able to play any soundset/company style with any fpx table just by
' loading in a music library and changing one small line of code.
' - Because of this new system, the engine has been rewritten, and a lot of code has been moved to this new section. It also means that this system can be
' re-used in Hit_Code as well so you can run routines when ever you want just by typing one line of code (e.g. AddMusicSet "LightAttract1") As well,
' you can change the messages in the display in your code
' (e.g. Message(1)= "FPX ":Message(2)= "Engine ":Message(3)= "by ":Message(4)= "shiva ":"LightAttract1")
' All display and lightseq code is also usable in code as well (e.g. AddDisplay "BlinkMessageFast":AddLightFX "BlinkFast")
' - HUD displays expanded from 2 to 4 displays, to match the backglass displays. This is for possible future support of williams/bally system11
' and Data East tables
'- all music/sound code has been (or will be by the time the next build is released) moved to the main control routine (AddMusicSet) so we can have multiple styles without the user having to do anything. This also
' prevents a lot of fustration with all the coding needed, as there are also background sound code, as well as lightseq and a far more advanced text display.
'- There are about 15 display routines now coded, with 6 new routines added. (More will come)
'- Most of the display text code is in AddMusicSet, due to being quite tricky to write, but the user can change the text display for some of them in the AddEvent subroutine.
' Here is a example using the LightAttract1 case, which you can change to your table name and place your author name. (NOTE: there are 4 segments now, but they can
' Only display 7 characters per segment)
'
' Case "LightAttract1"
' ' You can change this to your own message, it will display during light Attract. Note the blank spaces so it will display better
' Message(1)= "FPX ":Message(2)= "Engine ":Message(3)= "by ":Message(4)= "shiva " ' change between the quotes to your message
' AddMusicSet "LightAttract1" ' points to preset routine to displaytext/light show/ music
'
' There are 4 messages, each message corresponds to the display. (i.e. Message(1) is the player one display) Just change the message between each quote and make sure you
' leave in the AddMusic "LightAttract1" line, as this handles all the lights/display/sounds/routines automatically. So your changes could look like this...
'
' Case "LightAttract1"
' ' You can change this to your own message, it will display during light Attract. Note the blank spaces so it will display better
' Message(1)= "MY ":Message(2)= "TABLE ":Message(3)= "by ":Message(4)= "ME!!! " ' change between the quotes to your message
' AddMusicSet "LightAttract1"
'
' All the changeable display code can be found in each of the case settings within the AddEvent main subroutine. Almost all the user adjustable code can be found within
' the AddEvent subroutine, as the engine code is very advanced and even most advanced scripters can make mistakes very easily. The AdEvent subroutine solves this problem
' by having pointers (called "hooks") within the engine directly to AddEvent for any user modification or additional code in a pretty fool proof method. Beginners shouldn't be
' scared to use this,even if you make a mistake, it's a lot easier to find and fix the mistake because it's all in one place and not scattered among thousands of lines of code
'- The AddEvent timer (TimerSetEvent1) has been moved to be part of the main engine, and should not be modified unless you really really know what you are doing
'- Timers, most noteably the background timer, has been rewritten and now has expanded capabilities.
'- The background music timer has also been moved to the engine code from the user modification system
'- A new timer has been created (TimerCloseScoringEvent) to give users a simple single timer if they need it for the hit_code (e.g. pop targets delay time before they pop back up)
' More code will be added in the future, this was used in my Jungle Girl table, and proved to be quite useful. When a music file has finished playing, the engine then points to
' the background music timer (to play the background sound). The background sound system then points to TimerCloseScoringEvent to run any closing statements. The very nice thing
' about this is you don't even have to code a timer interval, it's already set by MusicIntervalTime in AddMusicSet.

The main thing is AddMusicSet, I'm starting to take out the excess coding from the AddEvent() subroutine, and move everything that is Audio/Video/light into the preset routines. This allows for very advanced code, multiple soundset support as a database and just a hell of a lot easier for any beginner to use, and a fraction of the code he has to do as well.

If people want to submit xmls (as the system is set up to use a xml from a selection of multiple physics) or additional BAM coding I can fold it in pretty easily. There's a lot of BAM stuff, it will be nice to have a complete set, but just don't have the time to work it all out.
I will put up what I have got done once I get tired of looking at code and want to do something else. :)

_________________
_____________________________________

Latest projects and rants at My Facebook Page
_____________________________________

Latest Project: fpxEngine


Top 
 Profile  
 
 Post subject: Re: FPx Table Template v1
 Post Posted: Fri May 24, 2019 7:33 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2810
Location: Ontario, Canada
Sounds very cool blue !


Top 
 Profile  
 
 Post subject: Re: FPx Table Template v1
 Post Posted: Fri May 24, 2019 8:22 am 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 2476
Location: Arkansas, USA
I always start custom physics with Malifica's XML. You can add it if you wish. It is available here:

viewtopic.php?f=86&t=6173

I am thinking about taking a hiatus on this stuff myself.

George


Top 
 Profile  
 
 Post subject: Re: FPx Table Template v1
 Post Posted: Fri May 24, 2019 3:16 pm 
Offline

Joined: Tue May 01, 2012 11:13 pm
Posts: 408
Location: Abbotsford
Hard not to get wrapped up in stuff like this. From my point of view, this is so badly needed considering the handful of people still doing stuff. We have become too focused on BAM, but there are so few authors here that very few people will ever use it for development, and that is a bit of a waste of time.

We need more voices here, and I keep thinking about the pinball construction set and how people just wanted to make their own creations without having to spend months learning coding and then months writing and debugging code. That program sold millions of copys, so maybe that is the way to go with FPX. None of you will ever use it, you all are capable of making your own template, so been rethinking FPX and I decided to just make the script for 99.9 percent of the planet who don't know how to code or have never even written a single line. It is up to you guys to give me input to tell me how successful I am.

As to the xml, thanks George. What I may do is have xml for company and era. I already have Jungle Girl for Bally SS, I believe POTO is the other one, but if you have recommendations for other xmls to use as masters, like wpc/stern/gottlieb, please write them down. I will have 5 down the road, one for each major era, and it's of course selectable just by changing one number.

I'm presently redoing the engine sound code, but I also found a couple bugs along the way. Oooppps :)

At least I am confident that this might work, and I am not wasting months of my life. :)

p.s. It's actually very cool by the way...

_________________
_____________________________________

Latest projects and rants at My Facebook Page
_____________________________________

Latest Project: fpxEngine


Top 
 Profile  
 
 Post subject: Re: FPx Table Template v1
 Post Posted: Tue May 28, 2019 12:15 am 
Offline

Joined: Tue May 01, 2012 11:13 pm
Posts: 408
Location: Abbotsford
Getting there
At the moment, writing the remarks so people can follow it, including people who have never scripted before. It will actually take me longer to write the instructions in the script than to write the code. :)

By then, I will have a good idea how to make the scoring code as easy as possible. May have a way for that, but it requires copy and paste of up to 4 lines of code in your Hit code, and previous experience with VP has told me no one could do that to a greater degree because it was multiple subs.. Guess it was too tough for them, so not doing that again.

Afterwards, I will add some xml. I need people to suggest the best ones, using 5 for this. a good em/ss, one for 1980 bally, one for 1980 williams, system 11 and wpc. It's a bit of work, so any help is appreciated.

BAM is supported, but the older version. I had just spent days and then Rav posted a update and pretty much wiped out all that work, so in future, I will wait and just steal other people's BAM code instead :)

Looking at the script now. Very interesting but a lot of cleanup is needed as everything is tacked in from 3 different tables on my hard drive. It's like me, messy looking but Brilliant. :)

_________________
_____________________________________

Latest projects and rants at My Facebook Page
_____________________________________

Latest Project: fpxEngine


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

Board index » Future Pinball » Tables Release


Who is online

Users browsing this forum: No registered users and 15 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: