Jump to content



Photo
* * * * * 8 votes

Unit3D Pinball - Alpha

Unit3D Pinball

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

#181 Arcade4

Arcade4

    Pinball Fan

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

  • Flag: United States of America

  • Favorite Pinball: AC/DC

Posted 24 February 2014 - 05:21 PM

Nice road map.

Love where things are going.

Glad to see the dark flipper area of Scared Stiff is on the list. :)  I know it is probably the least important thing on it, but it would sure look better all fixed up.

Just an idea here, you might want to consider having "Bloom Effect" turned off by default.

I know for me at least, when I first fired the program up and looked at the table it was not very pretty. But after clicking that one button, suddenly the whole project came to life. 

Maybe there is a reason it was defaulted to on, but I can't see it. 

Keep up the great work guys.



#182 louizou

louizou

    Enthusiast

  • Members
  • PipPipPip
  • 265 posts

  • Flag: France

  • Favorite Pinball: BlackKnight2k T2 Twilight Zone

Posted 24 February 2014 - 06:41 PM

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.

 

That's normal, you have created 1 bank DropTargets, so in the simulation, they are named YourDropTarget-1.

This is done to differentiate the targets when bank count>1 , so you can find in the bank YourDropTarget-1 , YourDropTarget-2 , YourDropTarget-3 , etc..

 

You can give a try to this test script.

Creates a table with one DropTarget called "DropTtarget4" with 6 banks.

The script handles target hits and when all targets are down, the bank is reseted

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;

	//! 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...)

		InitSubwaySystem();				// Initialize Subway System
		
		AddPlungerBehaviour("Plunger");	// Add plunger behaviour
		
	}
	
	//! Initialize table driver
	public override void InitDriver()
	{
	
	}	
	
	public override void LateUpdate ()
	{
		base.LateUpdate();
		
		if(Input.GetKeyDown(KeyCode.K))
		{
			SetSolenoid(4, true); // todo => switch off (will not work when not using changedSolenoidsCallback)
		}
		////////////////////// Testif all DropTarget4 are 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)


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

	}

	
	//! Link lamp array to Unity objects (called by InitArrays)
	public override void InitLampsObjects()
	{
		base.InitLampsObjects(); // call ancestor's function
	}
	
	//! Link solenoid array to Unity objects (called by InitArrays)
	public override void InitSolenoidsObjects()
	{
		base.InitSolenoidsObjects(); // call ancestor's function

		////////////////// 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");

		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	

		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");
	}

	//! ROM Simulation (from input signals to output actions)
	public override void SetSwitch (int slot, bool state)
	{
		base.SetSwitch (slot, state);
		
		switch(slot)
		{				
		///////////////////////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;
		}
	}	
	//////////////////// Test if all DropTarget4 are dropped->then reset them
	void testDT4()
	{
	   if(dt41 & dt42 & dt43 & dt44 & dt45 & dt46)
		{
			//////////// If all targets down=>reset the bank
			SetSolenoid(93,true);	
			dt41=false;
			dt42=false;
			dt43=false;
			dt44=false;
			dt45=false;
			dt46=false;
		}
			
	}
}

uplogomini.png

Continue helping us at [email protected]

 


#183 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 24 February 2014 - 07:12 PM

Yeah, that's got it! I did originally create one 6 bank target but must of had it named incorrect for it not to work because the same code was in billbox's script.

 

Another horse to the lambda to celebrate => :BDH:


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


#184 arngrim

arngrim

    DJ Force Feedback

  • VIP
  • 2,188 posts
  • Location:Charleroi, Belgium

  • Flag: Belgium

  • Favorite Pinball: Monster bash



Posted 24 February 2014 - 07:15 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 :)

i agree, it is so powerful sometimes that the ball become invisible

#185 ringorian

ringorian

    Enthusiast

  • Members
  • PipPipPip
  • 199 posts

  • Flag: Germany

  • Favorite Pinball: road show

Posted 24 February 2014 - 07:46 PM

Bilbox or Louizou, is there any table which is finished on the physic side ?



#186 louizou

louizou

    Enthusiast

  • Members
  • PipPipPip
  • 265 posts

  • Flag: France

  • Favorite Pinball: BlackKnight2k T2 Twilight Zone

Posted 24 February 2014 - 07:53 PM

if you find flippers too powerfull, try modifying this in the script: Global.Physics.g_FlipperForceMultiplier =280f; (change this float according to your needs)

 

You can also mod their physic material to make them more or less bouncy or to change the friction applyed to them or the ball.


Edited by louizou, 24 February 2014 - 08:18 PM.

uplogomini.png

Continue helping us at [email protected]

 


#187 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 24 February 2014 - 07:54 PM

You know you can change the physics settings? Load table with editor & change it.

 

I like these for Dr-Dude

 

https://www.dropbox....474/Dr-dude.png


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


#188 Glxb

Glxb

    Enthusiast

  • VIP
  • 385 posts

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

  • Favorite Pinball: The Addams Family



Posted 24 February 2014 - 08:45 PM

OK slowly getting there with Simpsons.

Hooked up all the playfield lights properly (I think, they seem to flash ok in the attract mode.)

 

Next , solenoids and flashers, then some switches.

 

A few questions though.

I am having trouble with scripting, I tried to copy and paste the section that should fix the look of the lights, but so far no luck. Is there another part of the script I need to add to go with that section?

 

Can multiple lights from FP be added to one call from the rom? I'm guessing they can but haven't looked deeply into the Indy script on this.

 

More questions soon.

 

Glxb


Follow me on twitter. @GLXB

#189 Herweh

Herweh

    Backglass fan

  • VIP
  • 452 posts
  • Location:Germany

  • Flag: Germany

  • Favorite Pinball: Yes

Posted 24 February 2014 - 08:50 PM

 

While this dialog is still active, I can ALT+tab to Windows explorer and check: the tmp folder I created *has been deleted*. It no longer exists. I get the same blank extractor window as before.

I'm using Win 7 Home Premium SP1, for what it's worth.

 

Can you try to check "run as administrator" in the extractor.exe compatibility tab ?

 

Same problem here, every time I start the app, on two PCs (one is running Win8.1, the other Win7), extractor.exe and unit3dpinball.exe are running as admin. I create the tmp folder (or unzip the whole package once again), start the app, the table select dialog appears and at the same time the tmp folder is deleted. Without this folder after selecting a upt file I get ...

u3d_1.png

 

... and after clicking on "Ok" I get this dialog:

u3d_2.png

 

And that's it, nothing more is happening.

 

Any ideas what's going wrong or what's happening that the tmp folder is deleted? Thanks.


herwehb2s-avatar-jr-100.pngbreakshot-sig-small3.pngatlantis-sig-small.pngmousinaround-sig6.pngsc-badge1.pnglw-sig.pngembryon-logo0.pngladyluck.pngapollo13_badge3.pngwhirlwind_badge.png


#190 louizou

louizou

    Enthusiast

  • Members
  • PipPipPip
  • 265 posts

  • Flag: France

  • Favorite Pinball: BlackKnight2k T2 Twilight Zone

Posted 24 February 2014 - 09:17 PM

I am having trouble with scripting, I tried to copy and paste the section that should fix the look of the lights, but so far no luck. Is there another part of the script I need to add to go with that section?

 

Can multiple lights from FP be added to one call from the rom? I'm guessing they can but haven't looked deeply into the Indy script on this.

 

More questions soon.

 

Glxb

Can you show me a capture of the light you want to correct ?

what is exactly the problem with these lamps ?

 

You can use AddLamp function with multiple FP lamps.

example:

AddLamp("Light1",  1);

AddLamp("Light2",  1);

 

When ROM activates Lamp 1, both Light1 and Light2 are activated on the table.

 

May the force be with you  :good:

 

 

 

 

Any ideas what's going wrong or what's happening that the tmp folder is deleted? Thanks.

 

tmp is deleted and recreated by the extractor to clean its content, that's all


uplogomini.png

Continue helping us at [email protected]

 


#191 Glxb

Glxb

    Enthusiast

  • VIP
  • 385 posts

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

  • Favorite Pinball: The Addams Family



Posted 24 February 2014 - 09:20 PM

I mean the playfield rendering, I'm having trouble using the editor at the moment and can't change any materials, so I was going to use the script to correct the playfield lights, they don't show the playfield gfx.

Glxb
Follow me on twitter. @GLXB

#192 ringorian

ringorian

    Enthusiast

  • Members
  • PipPipPip
  • 199 posts

  • Flag: Germany

  • Favorite Pinball: road show

Posted 24 February 2014 - 09:26 PM

 

 

While this dialog is still active, I can ALT+tab to Windows explorer and check: the tmp folder I created *has been deleted*. It no longer exists. I get the same blank extractor window as before.

I'm using Win 7 Home Premium SP1, for what it's worth.

 

Can you try to check "run as administrator" in the extractor.exe compatibility tab ?

 

Same problem here, every time I start the app, on two PCs (one is running Win8.1, the other Win7), extractor.exe and unit3dpinball.exe are running as admin. I create the tmp folder (or unzip the whole package once again), start the app, the table select dialog appears and at the same time the tmp folder is deleted. Without this folder after selecting a upt file I get ...

u3d_1.png

 

... and after clicking on "Ok" I get this dialog:

u3d_2.png

 

And that's it, nothing more is happening.

 

Any ideas what's going wrong or what's happening that the tmp folder is deleted? Thanks.

 

Maybe Windows Defender or something which deletes it ?



#193 Herweh

Herweh

    Backglass fan

  • VIP
  • 452 posts
  • Location:Germany

  • Flag: Germany

  • Favorite Pinball: Yes

Posted 24 February 2014 - 09:34 PM


 

Any ideas what's going wrong or what's happening that the tmp folder is deleted? Thanks.

 

tmp is deleted and recreated by the extractor to clean its content, that's all

 

 

Okay, but problem is: The folder isn't recreated.


herwehb2s-avatar-jr-100.pngbreakshot-sig-small3.pngatlantis-sig-small.pngmousinaround-sig6.pngsc-badge1.pnglw-sig.pngembryon-logo0.pngladyluck.pngapollo13_badge3.pngwhirlwind_badge.png


#194 ringorian

ringorian

    Enthusiast

  • Members
  • PipPipPip
  • 199 posts

  • Flag: Germany

  • Favorite Pinball: road show

Posted 24 February 2014 - 09:38 PM

if you find flippers too powerfull, try modifying this in the script: Global.Physics.g_FlipperForceMultiplier =280f; (change this float according to your needs)

 

You can also mod their physic material to make them more or less bouncy or to change the friction applyed to them or the ball.

Ok, i am no programmer, but when the script says 260 the value in the physic tuner should be 260 and not 1000, or ? and 100f shouldnt be 2000000 ? Like its in dr dude ..

 

Or ?

 

Chepas, your settings are nice !



#195 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 24 February 2014 - 10:02 PM

 

100f shouldnt be 2000000 ? Like its in dr dude

 

I'm not sure the Flipper Speed target is being used anymore. Just the Force multiplier.


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


#196 ringorian

ringorian

    Enthusiast

  • Members
  • PipPipPip
  • 199 posts

  • Flag: Germany

  • Favorite Pinball: road show

Posted 24 February 2014 - 10:09 PM

 

 

100f shouldnt be 2000000 ? Like its in dr dude

 

I'm not sure the Flipper Speed target is being used anymore. Just the Force multiplier.

 

I am lost, where do the physic tuner get his values from ? 

 

This is the TAF script

 

// Flippers
Global.Physics.g_FlipperForceMultiplier =500f;// 1000f; //!< Flipper force multiplier
Global.Physics.g_FlipperSpeedTargetMultiplier = 100f;//2000000.0f; //!< Flipper angular speed target multiplier
 
If you load up the editor / Physic tuner it shows 
 
g_FlipperForceMultiplier 1000
FlipperSpeedTargetMultiplier 2000000
 
Same withe the other values
 
Global.Physics.g_PlungerForceMultiplier = 5f;//40f
shows 13 in physic tuner ....


#197 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 24 February 2014 - 10:21 PM

General idea is to change settings how you like in the editor, remember them and add/edit the tables script.cs manually, save that. It should work.


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


#198 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 - 10:26 PM

 

 

 

100f shouldnt be 2000000 ? Like its in dr dude

 

I'm not sure the Flipper Speed target is being used anymore. Just the Force multiplier.

 

I am lost, where do the physic tuner get his values from ? 

 

This is the TAF script

 

// Flippers
Global.Physics.g_FlipperForceMultiplier =500f;// 1000f; //!< Flipper force multiplier
Global.Physics.g_FlipperSpeedTargetMultiplier = 100f;//2000000.0f; //!< Flipper angular speed target multiplier
 
If you load up the editor / Physic tuner it shows 
 
g_FlipperForceMultiplier 1000
FlipperSpeedTargetMultiplier 2000000
 
Same withe the other values
 
Global.Physics.g_PlungerForceMultiplier = 5f;//40f
shows 13 in physic tuner ....

 

Dude, you just found a nice bug: these values are the default one and are loaded BEFORE the script compilation. The currently used values are the script ones, but as soon as you change a value, the new value is applyed... => Bug list

 

 


 

Any ideas what's going wrong or what's happening that the tmp folder is deleted? Thanks.

 

tmp is deleted and recreated by the extractor to clean its content, that's all

 

 

Okay, but problem is: The folder isn't recreated.

 

Does anyone else installed it on C: drive? I have often problems with it. Try right click/properties on "extractor.exe" and check if there is some blocking...


UP2


#199 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 24 February 2014 - 10:36 PM

I mean the playfield rendering, I'm having trouble using the editor at the moment and can't change any materials, so I was going to use the script to correct the playfield lights, they don't show the playfield gfx.

Glxb

 

Need a materials.xml ? I've tried converting a table this evening, can set lights & solenoids just no material edit.

 

Yeah, basicaly test it with ShootAgainLight. Add the 3 xml elements into xml then you'll be able to pick your texture.


Edited by chepas, 24 February 2014 - 10:40 PM.

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


#200 Guus

Guus

    Enthusiast

  • Members
  • PipPipPip
  • 234 posts

  • Flag: Netherlands

  • Favorite Pinball: VPX

Posted 24 February 2014 - 10:49 PM

 

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):

 

...

 

GREAT list !

 

Only the Indiana Jones bugs are missing: the ball disappears / gets stuck somewhere in the table at almost every match that we played.

Besides that the lights in the Indiana Jones table are WAY too bright(even at lowest setting) and the playground is blurry / could be improved.

 

(I don't want to ask too much (I did already now lol) but Indiana Jones is my favorite table all time! for that reason I'm eager to play it in a perfect way :) )

 

Thanks for everything. VPFORUMS.ORG ADMIN REQUEST: make a new place in the forum for UNIT3D Pinball. It's better then VP! So it deserves at least that..

 

ps. the Scared Stiff table is the BEST pinball table that I played in years, it's so perfect besides the 2 mentioned bugs(multiball / flipper darkness). Can't stop playing it haha.







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