19-04-2012 08:30 PM - edited 19-04-2012 08:43 PM
Hello Everyone! I created a PlayStation Stuite Library called the SuitePack. It allows you to do certain tasks easily. I will be releasing new versions of the SuitePack that will allow you to do even more. Even though it doesn't have a lot of features now and may not be useful to some of you, it can help a lot.
Setup:
Usage:
GraphicsDevice
GraphicsDevice is a static class I wrote that allows access to the GraphicsDevice from anywhere in your project.
Members
Methods
Usage
That's the main setup. Everything else in the SuitePack is straight foward.
Make sure that if you decide to use GamePadHelper, TouchHelper, or MotionHelper, you set their data in your main class' Update() method:
//GamePadHelper GamePadHelper.SetGamePadData(GamePad.GetData(0)); //TouchHelper TouchHelper.SetTouchData(Touch.GetData(0)); //MotionHelper MotionHelper.SetMotionData(Motion.GetData(0));
If you have any questions, suggestions, or problems, just reply and I will try to get back to you. Also, let me know what you think and give this post a kudo. Check back every now and then as I might have a new release, new parts of documentation, and more. Thanks!
19-04-2012 09:17 PM - edited 19-04-2012 09:23 PM
The "Information" Class
The "Information" class allows you to get different information about the device. While I am still working on this class, it is capable of knowing which device the application is being used on using "Information.Device".
Here's an Image. I was having a problem adding it to the post.
Used "Console.WriteLine" to write Information.Device & Information.DeviceName to the console.
Members
on 19-04-2012 10:29 PM
Cool. Thanks for sharing.
on 20-04-2012 02:30 AM
20-04-2012 06:11 PM - edited 20-04-2012 06:19 PM
Honestly, I don't know. I added it because someone will need to use it one day. Maybe they would want to use it for an application that allows the user to send messages to any vita near them that has the application installed on it (the app could get the name of each device and return them to the user) via bluetooth or perhaps, a developer wanted his application to be optimized for all devices and set up a switch statement:
switch (Information.Device)
{
case PSVita:
{
//Use a 960 x 544 image for the background.
background = new Texture2D("/Application/assets/backgroundVita.png" );
//Do more.
break;
}
case XperiaPlay: case XperiaArc: case XperiaAcro:
{
//Use a 854 x 480 image for the background.
background = new Texture2D("/Application/assets/backgroundXperia.pn g");
//Do more.
break;
}
case XperiaS: case XperiaIon:
{
//Use a 1280 x 720 image for the background.
background = new Texture2D("/Application/assets/backgroundXperiaHD. png");
//Do more.
break;
}
}
on 20-04-2012 07:51 PM
Rogerdodger91 wrote:
Whats the advantage of telling what device you are using? On screen button placements is the only practical use i can see for it.
I have a similar check in my engine. I then adjust the graphical fidelity depending on device. I have different sets of models and shaders which each run on Xperia, Tablet or Vita respectively. I also have a full rifid body 3D physics system running in my engine and I can increase the precision and tick rate of the physics simulation on devices that I know perform better than others.
20-04-2012 08:19 PM - edited 20-04-2012 08:43 PM
GamePadHelper
GamePadHelper makes it easier to access the gamepad throughout your project. All you have to do is set the GamePadHelper's data in your main class' Update() method:
GamePadHelper.SetGamePadData(GamePad.GetData(0));
After you have done that, you can access the gamepad from anywhere in your project:
//Checks if the cross button is pressed.
if (GamePadHelper.ButtonIsDown(GamePadButtons.Cross))
{
//Do something.
}
//Checks if the cross button is released.
if (GamePadHelper.ButtonIsUp(GamePadButtons.Cross))
{
//Do something.
}
//Checks if the previous button is the cross button.
if (GamePadHelper.PreviousButtonIs(GamePadButtons.Cro ss))
{
//Do something.
}
//Checks if the cross and triangle button are being pressed.
if (GamePadHelper.ButtonsAreDown(GamePadButtons.Cross , GamePadButtons.Triangle))
{
//Do something.
}
TouchHelper
TouchHelper makes it easier to access the touchscreen throughout your project. All you have to do is set the TouchHelper's data in your main class' Update() method:
TouchHelper.SetTouchData(Touch.GetData(0));
After you have done that, you can access the touchscreen from anywhere in your project:
//Checks if a touch is detected.
if (TouchHelper.TouchDetected())
{
//Do something.
}
MotionHelper
MotionHelper makes it easier to access the accelerometer throughout your project. All you have to do is set the MotionHelper's data in your main class' Update() method:
MotionHelper.SetMotionData(Motion.GetData(0));
After you have done that, you can access the accel
__________________________________________________
You can also access each helper's data easily:
GamePadHelper.Data TouchHelper.Data MotionHelper.Data
on 21-04-2012 02:49 AM
21-04-2012 07:50 PM - edited 21-04-2012 07:52 PM
i added the dll file to the reference's project, but it still doesn't recognize che commands :\
edit:
Fixed, i forgot to add using SuitPack... lol fail xD
on 21-04-2012 10:53 PM
LOL! Thanks for downloading. Tell me if you have any problems, questions, or suggustions for SuitePack 0.2.
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を一度ログアウトし、再度ログインしてください。


Website ©2013 Sony Computer Entertainment Europe
All content, game titles, trade names and/or trade dress, trademarks, artwork and associated imagery are trademarks and/or copyright material of their respective owners. All rights reserved. [more info]
%%http://community.eu.playstation.com/t5/Announcements/Beta-Trial-Information/td-p/11386362
best_shooter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_driver.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_performer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_footballer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_fighter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_creator.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_action_player.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
dev2.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Producer-and-Developer-Ranks/td-p/18407352
trophy.gif%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/The-Community-Awards-FAQ/td-p/18407096
PSlogoSM.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Online-Support-Coordinator-rank/td-p/18414870