Jump to content



Photo
* * * * * 8 votes

Unit3D Pinball - Alpha

Unit3D Pinball

  • This topic is locked This topic is locked
635 replies to this topic

#161 klamote

klamote

    Neophyte

  • Members
  • Pip
  • 1 posts

  • Flag: Poland

  • Favorite Pinball: Revenge from Mars

Posted 23 February 2014 - 07:43 PM

Hello Guys, Been Tracking Your extraordinary achievements silently till this day. Donation sent!! Keep up the great contribution and make our virtual pinball tables look like real... !!!  :yahoo:



#162 ludovids

ludovids

    Enthusiast

  • Validating
  • PipPipPip
  • 181 posts
  • Location:Owego, NY

  • Flag: United States of America

  • Favorite Pinball: LOTR IJ MM TAF Tommy TOTAN TZ

Posted 23 February 2014 - 07:54 PM

love what has happened with this project, I just can't stand my flipper lag.  I have no lag in fx2, pinball arcade, vp, fp, just unit3d.  I havde prerendered frames set to 1 (which fixed fx2, and pa).  Win7x64 with 660ti card.  Any other suggestions?

 

I am thinking that high speed counter could be placed on a table and automatically flip a flipper at a certain time and record with a camera and see when the flipper actually gets flipped could prove my point.  Does this make sense?

 

Do you think it could be your card or processor? Bilbox has GTX 680 and i7-3770K.

 

I am suffering from flipper lag also, but have a card that's only good for HTPC, so am trying to decide what to replace it with.

 

So what does everyone think are the required minimum graphics cards and processors to be able to run Unit3D pinball well?


ASRock Z270M Extreme4, i5-7600K, 16GB G.SKILL TridentZ DDR4 3200, EVGA GeForce GTX 1070 SC

Samsung 850 EVO M.2, Samsung UN40JU7100 4K playfield, Samsung SynchMaster 2232 backglass, Pinscape on VirtuaPin Plunger Kit v3


#163 robbo43

robbo43

    Hobbyist

  • Members
  • PipPip
  • 16 posts

  • Flag: United Kingdom

  • Favorite Pinball: Star Trek TNG

Posted 23 February 2014 - 08:00 PM

 

love what has happened with this project, I just can't stand my flipper lag.  I have no lag in fx2, pinball arcade, vp, fp, just unit3d.  I havde prerendered frames set to 1 (which fixed fx2, and pa).  Win7x64 with 660ti card.  Any other suggestions?

 

I am thinking that high speed counter could be placed on a table and automatically flip a flipper at a certain time and record with a camera and see when the flipper actually gets flipped could prove my point.  Does this make sense?

 

Do you think it could be your card or processor? Bilbox has GTX 680 and i7-3770K.

 

I am suffering from flipper lag also, but have a card that's only good for HTPC, so am trying to decide what to replace it with.

 

So what does everyone think are the required minimum graphics cards and processors to be able to run Unit3D pinball well?

 

 

 

Have you tried disabling vsync in the unit3d pinball options menu?

 

Cheers

 

Rob



#164 Andurian

Andurian

    Hobbyist

  • Members
  • PipPip
  • 29 posts

  • Flag: United States of America

  • Favorite Pinball: Cirqus Voltaire

Posted 23 February 2014 - 08:45 PM

I have the same experience with the lighting as Arcade4 - dark playfield at the bottom, and if I turn up the lights the top gets washed out.  I tried upping the pixel light value and it helped some, but not as much as I had hoped.  Are the tables designed to be night tables?  If so, turning up the lights is better than on FP night tables.  But it would be best if the same table could be both a night or day table with just different light settings.

I also have fps levels that feel like I'm playing in syrup with multiple monitors, but everything is snappy with real on one.  But I have a separate BG monitor, so it's syrup right now.  I'm someone who would benefit a lot from optimization.  Maybe I'll have to wait until beta to play tables on this instead of FP.  ;)

I *really* like your Class of 1812.   I had forgotten how much I loved that game.

 

These are just my observations, I hope they help.  I'm certainly not demanding anything.  :) For something in Alpha, this is amazing!  Thanks!



#165 Arcade4

Arcade4

    Pinball Fan

  • Members
  • PipPipPipPip
  • 1,686 posts
  • Location:Beaumont, TX.

  • Flag: United States of America

  • Favorite Pinball: AC/DC

Posted 23 February 2014 - 09:26 PM

Finally got the red circles back to stretch the playfield.

Turns out it was just me not paying attention. 

I was simply not clicking on the Calibrate Cabinet button. Doh!!!

 

Only had a second to play with it on my actual pinball cabinet but it was very nice.

Just need to go back and figure out how to move the backglass to my second monitor.

Was impressed the the PinDMD worked right out of the gate. 


Edited by Arcade4, 24 February 2014 - 04:14 AM.


#166 ludovids

ludovids

    Enthusiast

  • Validating
  • PipPipPip
  • 181 posts
  • Location:Owego, NY

  • Flag: United States of America

  • Favorite Pinball: LOTR IJ MM TAF Tommy TOTAN TZ

Posted 23 February 2014 - 09:56 PM


Have you tried disabling vsync in the unit3d pinball options menu?

 

Yeah, I tried all the suggested tweaks.


ASRock Z270M Extreme4, i5-7600K, 16GB G.SKILL TridentZ DDR4 3200, EVGA GeForce GTX 1070 SC

Samsung 850 EVO M.2, Samsung UN40JU7100 4K playfield, Samsung SynchMaster 2232 backglass, Pinscape on VirtuaPin Plunger Kit v3


#167 bent98

bent98

    Pinball Fan

  • Members
  • PipPipPipPip
  • 1,077 posts
  • Location:NY

  • Flag: United States of America

  • Favorite Pinball: Roadshow, Haunted House, Safe Cracker

Posted 24 February 2014 - 02:30 AM



 

Just out if curiosity, do you think we can further optimize the graphics engine? I can't get over 30 fps in cab mode and ball is not smooth. I really love what your guys are doing and hope your project continues to flurish.

I think there is some more room for optimization, but to be honest, this is not the main concern for now... sorry!
 
 



Why wouldn't it be? There are several people who have beefy vid cards and CPUs and still performance is pretty bad. Not sure what other options or features could be more important.

#168 Gamester

Gamester

    Enthusiast

  • Members
  • PipPipPip
  • 185 posts
  • Location:Texas

  • Flag: United States of America

  • Favorite Pinball: .

Posted 24 February 2014 - 04:23 AM

Just out if curiosity, do you think we can further optimize the graphics engine? I can't get over 30 fps in cab mode and ball is not smooth. I really love what your guys are doing and hope your project continues to flurish.

I think there is some more room for optimization, but to be honest, this is not the main concern for now... sorry!
 
 
Why wouldn't it be? There are several people who have beefy vid cards and CPUs and still performance is pretty bad. Not sure what other options or features could be more important.

Performance optimization is usually one of the last steps of the development process. I'm sure they need to get the major features sorted out before they do that, otherwise they can get in a vicious cycle of optimizing and then breaking the optimizations as the feature set expands and evolves. In other words if you try optimizing too soon, you can end up spinning your wheels to some degree. I'm sure they have certain feature milestones they want to reach prior to shifting into optimization mode.

We all have to keep in mind that this has just entered Alpha stage... It's too early to expect a polished experience.

#169 Slydog43

Slydog43

    Pinball Wizard

  • Platinum Supporter
  • 3,008 posts
  • Location:Hackettstown, NJ

  • Flag: United States of America

  • Favorite Pinball: Addams Family, All Williams 90's Games

Posted 24 February 2014 - 05:08 AM

thanks robbo43, disabled vsync cleared up my flipper delay, (also disabling complex flipper did it also, but I didn't want to that)  Loving Unit3D now.



#170 reggert32

reggert32

    Hobbyist

  • Members
  • PipPip
  • 16 posts
  • Favorite Pinball: Twilight zone

Posted 24 February 2014 - 07:42 AM

Can someone explain how to open/play FP tables on this amazing software ?

 

I haven tried the script.cs, but al this allows me to do is open the table, but nothing else happens.



#171 BilboX

BilboX

    Enthusiast

  • Unit3D Pinball Team
  • 433 posts
  • Location:French Polynesia

  • Flag: France

  • Favorite Pinball: Metallica, Addams Familly, Scared Stiff, White Water

Posted 24 February 2014 - 07:49 AM

 

 

Backglass répare .... Backglass remplace .... MDR   :BDH:

 

Mdrrrrrrr ! :). T'as encore picolé ou quoi :D ? :dblthumb:

 

 

 

Just out if curiosity, do you think we can further optimize the graphics engine? I can't get over 30 fps in cab mode and ball is not smooth. I really love what your guys are doing and hope your project continues to flurish.

I think there is some more room for optimization, but to be honest, this is not the main concern for now... sorry!
 
Why wouldn't it be? There are several people who have beefy vid cards and CPUs and still performance is pretty bad. Not sure what other options or features could be more important.

 

Well first, because the ratio time/hoped optimization is not really, IMO, the best one neither is it the best way to spend the time we can have on this project. I will post soon the TODO list with some kinds of priority and you'll see.

 

Please, also keep in mind that this is not our rendering engine and that we don't have access to every aspect of it. Moreover, we "handle" nearly 200 "real" lights (8 only for FP!!!): even if these are static ones, even best FPS today does not have so much. If UP is meant to last 10 years as were FP/VP, we need to focus on future hardware, not past ones...

 

That does not mean we won't try to provide a solution for that: we think the main problem is related to multiscreen/multicards/vsync (for example, try to get all of your screen at the same refresh rate, aka 60Hz).

 

Finally, with provided all kinds of tuning wheels to be able to run on the larger panel of configuration and we cannot try them all! Remember we need you to do so ;)...

 

thanks robbo43, disabled vsync cleared up my flipper delay, (also disabling complex flipper did it also, but I didn't want to that)  Loving Unit3D now.

Glad to see you found a solution,. Though, if you can reach 60FPS with physics arouynd 1000Hz, you should not need disabling vsync: while playing, we found that vsync is important for overall smoothness. However, our hardware is different than yours and if you does not have not much flickering/speed changes, then keep these settings. Maybe we will add a Refresh rate limitation WITHOUT vsync for example...


UP2


#172 BilboX

BilboX

    Enthusiast

  • Unit3D Pinball Team
  • 433 posts
  • Location:French Polynesia

  • Flag: France

  • Favorite Pinball: Metallica, Addams Familly, Scared Stiff, White Water

Posted 24 February 2014 - 08:07 AM

As I just pointed, here is the current TODO List with a kind of priorization (Louizou still nedds to add table related thing though, I'll edit this post today):

 

 
TODO List post Alpha release:
 
- VPM Restart
- Finish cab building to do...
- ... DOF/B2S support
- Editable Virtual Windows (To select, for example, the backglass area without DMD) + adding/removing virtual windows...
- Collision mesh from FPM
- VR support: Oculus Rift, Head Tracking, Stereo rendering, etc... (using middle VR?)
- Scripting Documentation
- DMD missing lines (rebuild VPM?)
- Force Fake/Real fullscreen on non-main windows screen (option)
- Check front glass collision when glass off mode
- Improve Subway API (adding higher level functions like "ballstack", etc..)
- Subway visual editor
- Cab Calibration: adding "reset" button?
- Slider class object for uniformity
- Improve/rewrite nudging system
- Adding Lightmaps (HUGE work there because needs to rewrite completely a lm engine)
 
TABLES:
 
- ALL: check gameroom objects assignment
- Scared Stiff
 * Crate multiball bug
 * Table bottom darkness ??
- Addams:
 * Sculpt GraveYard toy
 
BUGs:
- Flipper Lag investigations
- Cab Calibration: Graphics bug
- Free cam option not taken into account on start
- Disable keys when entering keys in Input Editor
- Mouse decay bug for fake fullscreen modes
- ... so many others...

Edited by BilboX, 24 February 2014 - 08:08 AM.

UP2


#173 ringorian

ringorian

    Enthusiast

  • Members
  • PipPipPip
  • 199 posts

  • Flag: Germany

  • Favorite Pinball: road show

Posted 24 February 2014 - 08:12 AM

That does not mean we won't try to provide a solution for that: we think the main problem is related to multiscreen/multicards/vsync (for example, try to get all of your screen at the same refresh rate, aka 60Hz).

Wouldnt be directb2s a solution for the cabs ? Unit is only doing the playfield and the backglass is done by directb2s ? Then you also have a solution for dof since db2s is calling dof ..
Bout the lights. It would be nice to have some info how much lights really needed on the tables since its a performance eater



#174 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 24 February 2014 - 08:14 AM

Billbox , Lou

 

Can you give us any more info about original game building?

 

From what I can gather atm I can't run a FP table without having the script enable pinmame. Everyone has their different uses for programs but for me (and probably a few others) we basicaly would love a FP but with good physics. Which is in a nutshell what this is, plus a lot more. Not to say I don't care about playing recreations but I personally am not bothered, I'd rather play real tables.


 

- Scripting Documentation

:love39:  => :BDH:


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#175 ringorian

ringorian

    Enthusiast

  • Members
  • PipPipPip
  • 199 posts

  • Flag: Germany

  • Favorite Pinball: road show

Posted 24 February 2014 - 09:24 AM

 

That does not mean we won't try to provide a solution for that: we think the main problem is related to multiscreen/multicards/vsync (for example, try to get all of your screen at the same refresh rate, aka 60Hz).

Wouldnt be directb2s a solution for the cabs ? Unit is only doing the playfield and the backglass is done by directb2s ? Then you also have a solution for dof since db2s is calling dof ..
Bout the lights. It would be nice to have some info how much lights really needed on the tables since its a performance eater

 

Sorry, wrote it while you wrote that it is on your todo



#176 BilboX

BilboX

    Enthusiast

  • Unit3D Pinball Team
  • 433 posts
  • Location:French Polynesia

  • Flag: France

  • Favorite Pinball: Metallica, Addams Familly, Scared Stiff, White Water

Posted 24 February 2014 - 09:43 AM

 

That does not mean we won't try to provide a solution for that: we think the main problem is related to multiscreen/multicards/vsync (for example, try to get all of your screen at the same refresh rate, aka 60Hz).

Wouldnt be directb2s a solution for the cabs ? Unit is only doing the playfield and the backglass is done by directb2s ? Then you also have a solution for dof since db2s is calling dof ..
Bout the lights. It would be nice to have some info how much lights really needed on the tables since its a performance eater

 

Correct: performance is the main reason why we finally want to support B2S: DOF comes of course with it (but we then depend on it for output and cannot create our owns).

Correct also about lights: the slider should be updated. Moreover, we should provide ways to setup a light as "important" (per pixel computation) or "not important" (per vertex computation): note that this is already doable by script...

 

Billbox , Lou

 

Can you give us any more info about original game building?

 

From what I can gather atm I can't run a FP table without having the script enable pinmame. Everyone has their different uses for programs but for me (and probably a few others) we basicaly would love a FP but with good physics. Which is in a nutshell what this is, plus a lot more. Not to say I don't care about playing recreations but I personally am not bothered, I'd rather play real tables.


 

- Scripting Documentation

:love39:  => :BDH:

Haha, script doc is a huge task, even if of course we already did it on the way. I saw with peepi for UltraDMD support for original table, this will come later. To start scripting an original table, just change the main class inheritance in your script from "BxVPMTableManager" to "BxTableManager": VPM will then not be launched ;). We should provide you at least our script for "test" table which does not use VPM. Here is a very dirty version of it:

using UnityEngine;
using System.Collections;

public class Script
{
    public void Init()
    {
        GameObject table = GameObject.Find("TABLE");
        test_TableManager behaviour = table.AddComponent<test_TableManager>();
		behaviour.PreInit();		// Call pre-initialization steps
		behaviour.Init();			// Script initialization
		behaviour.PostInit();		// Call poste-initialization steps
    }
}

public class test_TableManager : BxTableManager
{
	//////////////////////////////////////////////////////////////
	///////////////////// DropTarget4 dropped ?///////////////////
	public bool dt41=false;
	public bool dt42=false;
	public bool dt43=false;
	public bool dt44=false;
	public bool dt45=false;
	public bool dt46=false;
/////////////////////////////////////////////////////////////////////////////////////////
// Unity Callback Functions
	bool m_autokick = true;

	//! Use this for initialization
	public override void Init ()
	{
		base.Init();					// Call BxVPMTableManager Start (Display version and default controller options
	
		InitArrays(255,255,10,255);		// 89 Lamps, 65 Solenoids/Flashers (10 by default for GIs) and 255 Switches...)
		SetDMDObject("DMD","BxVPMDMD");	// Link the Vpm driven Dmd Update Component to the object "DMD"
		
		InitSubwaySystem();				// Initialize Subway System
		
		AddPlungerBehaviour("Plunger");	// Add plunger behaviour
		
		BxBumperKick.s_AutoKickBumperMode = true;		// Bumpers automatically kick

		GameObject ball=GameObject.Find("Shop/ball");
		ball.renderer.material.mainTexture=Resources.Load("BITMAP/amigaball") as Texture;////affect amigaball
		ball.renderer.material.color=Color.white;   //// so that amigaball can be seen
		
		GameObject vari1=GameObject.Find("VariTargets/TargetVari1");
		if(vari1!=null)
		{
			BxVariTarget v1behaviour=vari1.AddComponent<BxVariTarget>();
			v1behaviour.Init(0);
		}
		GameObject vari2=GameObject.Find("VariTargets/TargetVari2");
		if(vari2!=null)
		{
			BxVariTarget v2behaviour=vari2.AddComponent<BxVariTarget>();
			v2behaviour.Init(0);
		}
		GameObject vari3=GameObject.Find("VariTargets/TargetVari3");
		if(vari3!=null)
		{
			BxVariTarget v3behaviour=vari3.AddComponent<BxVariTarget>();
			v3behaviour.Init(0);
		}		
	}
	
	//! Initialize table driver
	public override void InitDriver()
	{
		m_driver = new BxDriver_wpc();
	}	
	
	public override void LateUpdate ()
	{
		base.LateUpdate();
		
		if(Input.GetKeyDown(KeyCode.K))
		{
//			BxKicker kicker = (BxKicker)GameObject.Find ("TABLE/Kickers/PlungerKicker").GetComponent("BxKicker");
//			kicker.EjectBall();
			SetSolenoid(4, true); // todo => switch off (will not work when not using changedSolenoidsCallback)
			
			try
			{
			for(int i=1;i<=10;i++)
				GameObject.Find("Kickers/Kicker"+i).GetComponent<BxKicker>().EjectBall();
			}catch{}
			
		}
		
		if(Input.GetKeyDown(KeyCode.L))
		{
			m_autokick = !m_autokick;
			if(m_autokick)
			{
				SetSolenoid(2, true);
				SetSolenoid(3, true);
			}
		}
		
		////////////////////// Testif all DropTarget4 ar dropped
		testDT4();
	}
	
	//! Initialize Subway System (redefinition)
	public override void InitSubwaySystem()
	{
		// Getting Objects
		base.InitSubwaySystem();
		
		GameObject subway = GameObject.Find ("TABLE/SUBWAY");
		if(subway==null)
		{
			Debug.LogError("Unable to find SUBWAY object");
			return;
		}
		
		BxSwManager subManager = (BxSwManager)subway.GetComponent("BxSwManager");
		if(subManager==null) subManager = (BxSwManager)subway.GetComponent("BxSwVisualManager");
		if(subManager==null)
		{
			Debug.LogError("Unable to find the Subway manager component in SUBWAY object");
			return;
		}

//////////////////////////////////////////////////////////////////////////////		
// Subway System building


        float swL = Global.Physics.g_BallDiameter;					// length of switches in mm
		
		// Main through
		BxSwNode drain = subManager.AddEntrance("Drain",5);		// Main drain node used as subway entrance
		
		BxSwNode pkick = subManager.AddExit("PlungerKicker",4);	// Exit plunger kicker Node
		pkick.m_swicthSlot = 52;								// Node switch number

		BxSwEdge mainThrough = subManager.LinkNodes(drain,pkick,1.5f);			// main Through edge link (1.5 seconds for a ball to cross it)
		mainThrough.AddSwitch(50, mainThrough.m_length-swL*1.5f, swL*0.9f);		// First switch on the edge
		mainThrough.AddSwitch(51, mainThrough.m_length-swL*0.5f , swL*0.9f);	// Second switch on the edge (making 3 in total with the pkick node switch)
try
{
				
		//  Diverter system
		BxSwNode n1 = subManager.AddEntrance("Kicker1",1);	// Top kicker used as subway entrance
		
		BxSwNode n2 = subManager.AddExit("Kicker2",2);		// Left kicker node (subway exit)
		n2.m_swicthSlot = 40;
		
		BxSwNode n3 = subManager.AddExit("Kicker3",3);		// Right kicker node (subway exit)
		n3.m_swicthSlot = 41;		
		
		BxSwDiverterNode mid = subManager.AddNode<BxSwDiverterNode>("Middle",0.0f,1);	// Diverter central node
		mid.m_swicthSlot = 42;
		mid.m_solenoidSlot = 6;															// Solenoid slot activating the diverter
		mid.m_position = new Vector3(-235.5f,(n1.m_position.y + n2.m_position.y)*0.5f,504.6607f);
		
		
		BxSwEdge e1 = subManager.LinkNodes(n1,mid,1.0f);	// First edge (from entrance to diverter)
		// 3 siwtches on the edge (linked to lights
		e1.AddSwitch(11, swL*0.5f, swL);
		e1.AddSwitch(12, e1.m_length * 0.5f - swL*0.5f, swL);
		e1.AddSwitch(13, e1.m_length-swL*1.5f, swL);
		
		BxSwEdge e2 = subManager.LinkNodes(mid,n2,1.0f);	// Left edge (from diverter to left kicker)
		// 3 siwtches on the edge (linked to lights
		e2.AddSwitch(21, swL*0.5f, swL);
		e2.AddSwitch(22, e2.m_length * 0.5f - swL*0.5f, swL);
		e2.AddSwitch(23, e2.m_length-swL*1.5f, swL);
		
		BxSwEdge e3 = subManager.LinkNodes(mid,n3,1.0f);	// Right edge (from diverter to right kicker)
		// 3 siwtches on the edge (linked to lights
		e3.AddSwitch(31, swL*0.5f, swL);
		e3.AddSwitch(32, e3.m_length * 0.5f - swL*0.5f, swL);
		e3.AddSwitch(33, e3.m_length-swL*1.5f, swL);
			
		
}catch
{
}
		try{
		BxSwNode saucer = subManager.AddEntrance("Kicker10",70,false);
		saucer 			= subManager.AddExit("Kicker10",70,0.0f);
		}catch{
		}

		// build the subway system
		subManager.Build();
		
		// Insert 10 balls in the main through
		for(int i=0;i<10;i++)
		{
			BxSwVirtualBall b = new BxSwVirtualBall();
			drain.InsertBall(b);
			subManager.ReportNewBall(b);
			subManager.DoStep();
		}

        SetSolenoid(90, true);
        SetSolenoid(91, true);
        SetSolenoid(92, true);
	}

	
	//! Link lamp array to Unity objects (called by InitArrays)
	public override void InitLampsObjects()
	{
		base.InitLampsObjects(); // call ancestor's function
		
		// Test scene By BilboX
		// ---------------------------------------------------------------
		
		AddLamp("Bulb1",11);	// common 1
		AddLamp("Bulb2",12);	// common 2
		AddLamp("Bulb3",13);	// common 3
		AddLamp("Light1",21);	// left 1
		AddLamp("Light2",22);	// left 2 
		AddLamp("Light3",23);	// left 3
		AddLamp("Light4",31);	// right 1
		AddLamp("Light5",32);	// right 2
		AddLamp("Light6",33);	// right 3

		AddLamp ("ShootAgainLight",73);	// Shoot Again
		
		AddLamp("Bumper1"			, 61,"BxBumperLamp");
		AddLamp("Bumper2"			, 62,"BxBumperLamp");
		AddLamp("Bumper3"			, 63,"BxBumperLamp");
		AddLamp("Bumper4"			, 64,"BxBumperLamp");
		AddLamp("Bumper5"			, 65,"BxBumperLamp");
		AddLamp("Bumper6"			, 66,"BxBumperLamp");
		AddLamp("Bumper7"			, 67,"BxBumperLamp");
		AddLamp("Bumper8"			, 68,"BxBumperLamp");
				
	}
	
	//! Link solenoid array to Unity objects (called by InitArrays)
	public override void InitSolenoidsObjects()
	{
		base.InitSolenoidsObjects(); // call ancestor's function
		
		AddSolenoid("Kicker1" 			, 1,"BxKicker");
		AddSolenoid("Kicker2" 			, 2,"BxKicker");
		AddSolenoid("Kicker3" 			, 3,"BxKicker");
		AddSolenoid("Kicker4" 			, 3,"BxKicker");
		AddSolenoid("Kicker5" 			, 3,"BxKicker");
		AddSolenoid("Kicker6" 			, 3,"BxKicker");
		AddSolenoid("Kicker7" 			, 3,"BxKicker");
		AddSolenoid("Kicker8" 			, 3,"BxKicker");
		AddSolenoid("Kicker9" 			, 3,"BxKicker");
		AddSolenoid("Kicker10" 			, 3,"BxKicker");
/*		AddSolenoid("PlungerKicker"		, 4,"BxKicker");	// Ball release
		AddSolenoid("Drain"				, 5,"BxKicker");	// Outhole
*/		
		AddSolenoid("Bumper1"			, 61,"BxBumperKick");
		AddSolenoid("Bumper2"			, 62,"BxBumperKick");
		AddSolenoid("Bumper3"			, 63,"BxBumperKick");
		AddSolenoid("Bumper4"			, 64,"BxBumperKick");
		AddSolenoid("Bumper5"			, 65,"BxBumperKick");
		AddSolenoid("Bumper6"			, 66,"BxBumperKick");
		AddSolenoid("Bumper7"			, 67,"BxBumperKick");
		AddSolenoid("Bumper8"			, 68,"BxBumperKick");
	
		
		AddSolenoid("LeftSlingshotRubber"			, 80,"BxSlingshotKick");
		AddSolenoid("RightSlingshotRubber"			, 81,"BxSlingshotKick");
		AddSolenoid("Rubber2"						, 82,"BxSlingshotKick");
		AddSolenoid("Rubber3"						, 83,"BxSlingshotKick");

        AddSolenoid("1", 90, "BxCoilMagnet");
        AddSolenoid("2", 91, "BxCoilMagnet");
        AddSolenoid("3", 92, "BxCoilMagnet");

		////////////////// Testing DropTarget4
		AddSolenoid("DropTarget4-1",	93,	"BxDropTargetSolenoid");
		AddSolenoid("DropTarget4-2",	93,	"BxDropTargetSolenoid");
		AddSolenoid("DropTarget4-3",	93,	"BxDropTargetSolenoid");
		AddSolenoid("DropTarget4-4",	93,	"BxDropTargetSolenoid");
		AddSolenoid("DropTarget4-5",	93,	"BxDropTargetSolenoid");
		AddSolenoid("DropTarget4-6",	93,	"BxDropTargetSolenoid");
	//! Flipper solenoid slots (all games => move into BxVPMTableManager????)
	//! sLRFlipper = 46
	//! sLLFlipper = 48
	//! sURFlipper = 34
	//! sULFlipper = 36
		AddSolenoid("Flippers/RightFlipper"	, 46, "BxBasicFlip");	// Right Flipper
		AddSolenoid("Flippers/LeftFlipper"	, 48, "BxBasicFlip");	// Left Flipper
	}
	
	//! Link solenoid array to Unity objects (called by InitArrays)
	//! (Must be inherited and use AddSolenoid)
	public override void InitSwitchesObjects()
	{
		base.InitSwitchesObjects(); // call ancestor's function	

		AddSwitchCallBack(70, TestSwitchCallBack);		
		
		AddSwitch("Target1",  41, "BxLeafTargetSwitch");			// Entrance
		AddSwitch("Target2",  42, "BxLeafTargetSwitch");			// Entrance
		AddSwitch("Target3",  43, "BxLeafTargetSwitch");			// Entrance
		AddSwitch("Target4",  44, "BxLeafTargetSwitch");			// Entrance
		AddSwitch("Target5",  45, "BxLeafTargetSwitch");			// Entrance

		AddSwitch("Bumper1"			, 61);
		AddSwitch("Bumper2"			, 62);
		AddSwitch("Bumper3"			, 63);
		AddSwitch("Bumper4"			, 64);
		AddSwitch("Bumper5"			, 65);
		AddSwitch("Bumper6"			, 66);
		AddSwitch("Bumper7"			, 67);
		AddSwitch("Bumper8"			, 68);
	
		AddSwitch("LeftSlingshotRubber"	, 80	,"BxSlingshotSwitch");
		AddSwitch("RightSlingshotRubber", 81	,"BxSlingshotSwitch");
		AddSwitch("Rubber2"				, 82	,"BxSlingshotSwitch");
		AddSwitch("Rubber3"				, 83	,"BxSlingshotSwitch");
		
		AddSwitch("DropTarget4-1"			, 85	,"BxDropTargetSwitch");
		AddSwitch("DropTarget4-2"			, 86	,"BxDropTargetSwitch");
		AddSwitch("DropTarget4-3"			, 87	,"BxDropTargetSwitch");
		AddSwitch("DropTarget4-4"			, 88	,"BxDropTargetSwitch");
		AddSwitch("DropTarget4-5"			, 89	,"BxDropTargetSwitch");
		AddSwitch("DropTarget4-6"			, 90	,"BxDropTargetSwitch");
	}
	
	void TestSwitchCallBack(int slot, bool state)
	{
		Debug.Log ("Switch CallBack " + slot + (state?" On":" Off"));
	}
	
	//! ROM Simulation (from input signals to output actions)
	public override void SetSwitch (int slot, bool state)
	{
		base.SetSwitch (slot, state);
		
		switch(slot)
		{			
		case 40:	// Left exit kicker switch
			if(m_autokick && state)
				SetSolenoid(2, true); // Autokick (todo switch off)
			break;
		case 41:	// Right exit kicker switch
			if(m_autokick && state)
				SetSolenoid(3, true);  // Autokick (todo switch off)
			break;
		case 42:	// Diverter switch
			if(state)
				SetSolenoid(6, !GetSolenoid(6)); // Change diverter solenoid state			
			break;
		case 52:	// Plunger Kicker switch
//			if(state && GetSwitch(50) && GetSwitch(51))
//				SetSolenoid(4, true); // todo switch off	
			break;
		case 70:
			if(state)
				SetSolenoid(70,state);
			break;
			
		case 80:
			case 81:	
			case 82:
			case 83:
			if(state)SetSolenoid(slot,state);break;	
					
		///////////////////////DropTarget 4
		case 85: dt41=true;break;
		case 86: dt42=true;break;
		case 87: dt43=true;break;
		case 88: dt44=true;break;
		case 89: dt45=true;break;
		case 90: dt46=true;break;
			
		default:
			if(slot<40)
				SetLamp (slot,state); // Works as switch slot is the same as the lamps slots...
/*			else
			if(slot>=60 && slot <70)	// Bumper
			{
				//if(state)	SetLamp(slot,state);

				SetSolenoid(slot,state);
			}
*/			
			break;
		}
	}	
	//////////////////// Test if all DropTarget4 are dropped->then reset them
	void testDT4()
	{
	   if(dt41 & dt42 & dt43 & dt44 & dt45 & dt46)
		{
			SetSolenoid(93,true);	
			dt41=false;
			dt42=false;
			dt43=false;
			dt44=false;
			dt45=false;
			dt46=false;
		}
			
	}
}

Please also note taht we did not used it a lot: I will improve API when making "Abracadabra" which does not have rom yet. Main lack is DMD/Segment LCD/ Mechanical counters... to come ;).

Have fun decypher it waiting for doc :)

 

EDIT: small hint for original tables:

 We designed it to be "compatible" with VPM tables, aka with the same "architecture": Lamps/Solenoids/Gis/Switches slots. So, the same functions applyies, excpet these are not VPM driven but.. chepas driven ;). Good luck!


Edited by BilboX, 24 February 2014 - 09:46 AM.

UP2


#177 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 24 February 2014 - 10:05 AM

 

"BxVPMTableManager" to "BxTableManager"

Awesome, cheers mate!

 

Not even thought about dmds yet, flippers first lol :db:

 

 

Have fun decypher it waiting for doc

Yes , will do but got more to work with now, thanks


Edited by chepas, 24 February 2014 - 10:06 AM.

Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#178 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 24 February 2014 - 03:08 PM

https://www.dropbox....assLibrary2.rar

 

Just got a couple minutes to play about with this. Anyone else using Visual Studio 2013 this could save you a few minutes . That link is a class library solution ready to go, add the UnityEngine.dll as reference.

 

Cannot figure out hit detection of drop target. They need to be instantiated? Just going through script and adding solenoids you already have in there, can get most working aside from that.

 

I suppose this is the problem. It's giving me a different name to what's in FP.

 

https://www.dropbox....mg/Untitled.png

 

 


Edited by chepas, 24 February 2014 - 04:53 PM.

Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#179 ringorian

ringorian

    Enthusiast

  • Members
  • PipPipPip
  • 199 posts

  • Flag: Germany

  • Favorite Pinball: road show

Posted 24 February 2014 - 04:08 PM

Am i the only one which thinks that the overall flipper force is to high ? Its like shooting with a gun, not using a solenoid driven flipper :)



#180 Gamester

Gamester

    Enthusiast

  • Members
  • PipPipPip
  • 185 posts
  • Location:Texas

  • Flag: United States of America

  • Favorite Pinball: .

Posted 24 February 2014 - 04:51 PM

Please, also keep in mind that this is not our rendering engine and that we don't have access to every aspect of it. Moreover, we "handle" nearly 200 "real" lights (8 only for FP!!!): even if these are static ones, even best FPS today does not have so much. If UP is meant to last 10 years as were FP/VP, we need to focus on future hardware, not past ones...


^^This

I am certainly appreciative of any performance optimization that can be done, however, I will GLADLY upgrade my computer for a cutting edge, realistic (both physics and visuals) pinball simulation for my cab. If that's the price of progress, I'm on board! We have waited a really long time for something like this. This appears as though it will have all of the best aspects of both VP and FP, yet even better.

I will also be donating to this effort...





Also tagged with one or more of these keywords: Unit3D Pinball