General

Reply

Re: SuitePack 0.1 | The "Information" Class

Thanks for the static class.  When using the DeviceName on the actual PS Vita, I've got IP address instead.

 

Did I use it wrongly?

 

label.Text = Information.DeviceName.ToString ();

Please use plain text.

Re: SuitePack 0.1 | The "Information" Class

Previously, I've posted this.  It works quite well. 

 

You can try this simple snippet to know what device your program is running at:

 

...

//declare string array of deviceType

  private static string[] deviceType = new string[]{

    "Others",

    "Sony Ericsson Xperia Play or Acro",

    "Sony Xperia S or Acro HD",

    "Sony Tablet S",

    "Sony Tablet P",

    "Playstation Vita"};

 

//Simple method to return what device this program running on

  public static string CheckScreenSize(int width, int height)

  {
//Others
//Xperia Play 854 x 480
//Xperia S 1280 x 720
//Sony Tablet S 1280 x 752
//Sony Tablet P 1024 x 480 (X2) //not tested
//Playstation Vita 960 x 544 
if ((width == 854) & (height == 480)) return deviceType[1];
else if ((width == 1280) & (height == 720)) return deviceType[2];
else if ((width == 1280) & (height == 752)) return deviceType[3];
else if ((width == 1024) & (height == 960)) return deviceType[4];
else if ((width == 960) & (height == 544)) return deviceType[5];
return deviceType[0];
  }
...
...

// call from your initialize portion of your program,

// you can return value to Console.Writeline or any label...etc

  label.Text = CheckScreenSize(graphics.Screen.Width, graphics.Screen.Height);

...

Please use plain text.

Level 3

Level 3
Spykam25
Posts: 160
Registered: ‎24-02-2012
Message 13 of 34 (339 Views)

Re: SuitePack 0.1 | The "Information" Class

Hey! I will fix that. I will probably use the code above in 0.2. Is that ok?

Please use plain text.

Re: SuitePack 0.1 | The "Information" Class

Sure, no problem. :smileyhappy:

Please use plain text.

Level 3

Level 3
Spykam25
Posts: 160
Registered: ‎24-02-2012
Message 15 of 34 (254 Views)

SuitePack 0.2 | Upcoming Features

Here's a list of some of the upcoming features that will/may (some may be coming in future releases) be available in SuitePack 0.2:

 

Profile System

 

This feature is pretty much explanatory.  This makes it easier for developers to keep a person's data completely seperate from another person's data.  When the developer calls Profile.ShowSelector(), a dialog will show up that allows the player to do the following:

 

  1. Select an existing profile from a list of profiles.
  2. Create or Delete a profile.
  3. Continue without Saving.

The developer can then access the profile by using Profile.SignedInProfiles[int index].  

 

  • Video System - An easy way to play video.
  • Networking System - An easier way to do networking.
  • Social Networking Features -  Post to Twitter, Facebook, and more.

 

If you have any suggestions or questions, leave 'em here.

 

 


Please use plain text.

Rif.: SuitePack 0.2 | Upcoming Features

Hello, This is a very interesting library project. Do you think it is possible to open source it and let development and forks happen in the open on Github?

 

Thank you for your work, very useful class!

Please use plain text.

Rif.: SuitePack 0.2 | Upcoming Features

[ Edited ]

There is something which is puzzling me. You say to replace all calls related to GraphicsContext, but how would you interact with the Graphics API (SetShaderProgram, SetUniformValue, SetColorMask) without a valid context returned by GraphicsContext?

 

Edit: ok, I have seen you provide the context as static field. Thanks :smileyhappy:.

Please use plain text.

Rif.: SuitePack 0.2 | Upcoming Features

[ Edited ]

It does not seem to play along well with code completion.

I add the files to the project, edit the references (modifying a built-in project) by adding the SuitePack.dll, add a "using SuitePack" statement in the source code. Yet, I cannot use code completion for that, if I do not add the "using" statement I can use code completion with your library, but it does not compile... if I do add the proper "using" statement I can compile the program, but not use code completion for your custom classes.

 

Edit:

 

"Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object


  at SuitePack.GraphicsDevice.get_Width () [0x00000] in <filename unknown>:0


  at SuitePack.Information.get_Device () [0x00000] in <filename unknown>:0


  at Sample.ShaderCatalog.Init () [0x00000] in <filename unknown>:0


  at Sample.ShaderCatalog.Main (System.String[] args) [0x00000] in <filename unknown>:0

"

 

The app does not seem to be able to run...

 

 

Further Edit:

 

"GraphicsDevice.Initialize(Information.Device)"  --> causes crash.

 

"GraphicsDevice.Initialize(DeviceType.Other)" --> does not cause crash.

 

Also, code completion seems to work again now... bah... sorry for the not so useful details :smileysad:.

Please use plain text.

Rif.: SuitePack 0.2 | Upcoming Features

It would be useful to be able to initialize SuitePack's GraphicsDevice knowing already what device you are running on, but it does not seem that Information.Device is fully setup before you have initialized GraphicsDevice... at least I could not use it this way.

Please use plain text.

Rif.: SuitePack 0.2 | Upcoming Features

		//MotionHelper
		try {
			MotionHelper.SetMotionData(Motion.GetData(0));
		} catch (Exception e) {
			Debug.WriteLine("Motion Data check error... " + e);
		}

The above code will help your app not to crash when you are testing it on the Simulator (which causes a crash when setting the motion data source).

Please use plain text.
Announcements

Welcome to the PlayStation Mobile Developer Forums


This is a community for the discussion of technical topics with other developers and SCE engineers. Posting ideas/requests are also appreciated. Join the discussion!

PlayStation®Mobile開発者フォーラムでは世界中の開発者の皆様と一緒に、議論や情報交換が可能です。SCEも議論に参加し、皆様の開発をサポートします。アイデアやリクエストも大歓迎です。ぜひご参加ください。

PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.

フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと PSM DevPortalを一度ログアウトし、再度ログインしてください。