Thursday 5 July 2012

Hello World!

The UI Composer generated the UI files as outlined in red below:


These files had to be manually added to the solution by right clicking on the Blog1 project and "Add>Add Files..."

In order to use the generated class called BlogScreen, I had to import the Blog1UI namespace by adding a "using Blog1UI". I also had to import the HighLevelUI namespace by adding "using Sce.Pss.HighLevel.UI" to use the Blog1UI. This is similar Java's "import" statement for importing packages. 


To use generated user interfaces, I had to make use of the UISystem class. This can be initialized in the initialize method


public static void Initialize ()
{
graphics = new GraphicsContext ();
        UISystem.Initialize(graphics);

var blogScreen = new BlogScreen();


        UISystem.SetScene(blogScreen, null);
}


Changes were also required in the other methods


public static void Update ()
{
var gamePadData = GamePad.GetData (0);


List<TouchData> touchDataList = Touch.GetData (0);


UISystem.Update(touchDataList);
}


public static void Render ()
{
UISystem.Render ();


graphics.SwapBuffers ();
}



This is enough to get the program running but more work must be done to get the "Hello World" button to function and display the image when pressed. To do this, changes must be made to the BlogScreen class in BlogScreen.cs. In the constructor, a button action method has been added where the image is set to visible when the button is pressed. The following code snippet describes the changes


public BlogScreen()
{
InitializeWidget();

HelloWorldBtn.ButtonAction += HandleHelloWorldBtnButtonAction;
}


void HandleHelloWorldBtnButtonAction (object sender, TouchEventArgs e)
{
WorldImg.Visible = true;
}


Here is the end result after the button is pressed





     

Sunday 1 July 2012

Playing with the UI Composer

I was playing around with the UI Composer and made a little "Hello World" program. It reminds me of NetBeans in a way where you can design the user interface using various widgets and then code for functionality.

The UI Composer builds the necessary files that are required to be used in a project where you want to use the interface you've created. These files have to then be added to the project's solution. A few minor changes had to then be made in order to use the UI generated files.

Here is a screenshot of my project in the UI Composer













Currently you can only see a Hello World! button. I wanted to create a button that showed an image after it was pressed.

There's some code to input to make the program functional so right now, I'll try and get that working.

Tuesday 26 June 2012

With the press of a button...

Alternating between different background colors was made possible by creating a variable called "buttonsPressed" using a conditional statement where if the button was pressed, the screen would turn black else it would remain the default red. Originally a ternary operator was used but was a bit more difficult to understand.

Here is a snippet of the code:

         public static void Update ()
        {
            // Query gamepad for current state
            var gamePadData = GamePad.GetData (0);

               if (gamePadData.Buttons != 0)
                buttonsPressed  = true;
            else
                buttonsPressed  = false;
              }

         public static void Render ()
         {
              // Clear the screen
              if (!buttonsPressed)
                  graphics.SetClearColor (1.0f, 0.0f, 0.0f, 0.0f);
              else
                  graphics.SetClearColor (0.0f, 0.0f, 0.0f, 0.0f);
            
            graphics.Clear ();

In this video you can see the background color changing from default red to black and so forth. I am pressing CTRL on the keyboard which is the equivalent to any button on the PS Vita.

Warning: may cause small seizures




Wednesday 20 June 2012

PS Vita display

I used the PS Vita to display the red screen that I had up on the PssStudio simulator the last time. It worked!! It may be a very small step but oh boy is it exciting.


This first video shows the program running using PlayStation's Development Assistant on the PS Vita.

This second video shows an alternate way of running the program on the PS Vita.



When I can make a mobile game like this:


I'll be sorted!

(thinking positive thoughts)

PlayStation Suite to Mobile

At the Electronic Entertainment Expo (E3) 2012, Sony held a press conference on June 4 where they announced the renaming of the PlayStation Suite to PlayStation Mobile. They have also partnered up with the mobile makers HTC, ensuring that PlayStation Mobile games are available to certified HTC Android phones. 

Check the links below for more information:

PlayStation®Mobile
PSM Press Release

 I guess I shouldn't have been so hasty naming my blog pssuite...

Tuesday 12 June 2012

Playing around with code

I opened the PssStudio and decided to play around with some code for a bit. I decided to create a new project and selected the PlayStation Suite Application:


This provided a template for me to start working on creating a program.

It is the first time I've really seen C# code and it looks very similar to Java to me. It may be a bit confusing here and there but I can still somewhat understand.

For a start, I built the project and ran it with the Simulator. This resulted in a black screen display which is to be expected judging by the code.



In the screenshot below, I placed a red box over what I decided to change...the color in RBGA format:


I changed the R parameter to 1.0f to change the color to 100% red, which resulted in:


Not that much to see but it's a start I suppose. I'll try to run this on the PS Vita next.

Monday 11 June 2012

PssStudio GTK Startup Issue

So I reinstalled the suite thinking that would solve the original startup issue but that turned out to be a failure.

It turned out that I had another GTK installed previously with another program. Both the new and the old GTK library paths were in the PATH environment variable and this resulted in PS Suite using the wrong version of GTK.

I overcame this by removing the old GTK path and all works well now.

Grand!

PssStudio Loadup Issue

I was playing around with PssStudio and the UIComposer a few days back on my partner's laptop and we managed to change the background color and display the "Hello World!" on screen.

I'm loading PssStudio on my laptop now and am getting the "Program has stopped working" error so I'll have to reinstall it seems. Hopefully that will work.

I will post again about the background color change and hello world. For now, let's just get this program running on my laptop first.

Thursday 7 June 2012

Installation Guide

Let's install the Software Development Kit

Go to link http://www.playstation.com/psm/developer/openbeta/index_e.html

Off to the download page and after reading all of the terms and conditions (which I'm sure we all do thoroughly) let's click on download!



287MB...let's take a tea break...

Okay! Let's run the executable















Click Next...















Click I Agree...















Select your destination folder and click Install...

Another window will pop up during installation

















Tick the "I have read and accept the license terms" and click Install
That will install the .NET Framework necessary to complete the SDK installation

















Click on Finish...
Another window will appear prompting you to install Microsoft Visual C++ 2010

















Tick the "I have read and accept the license terms" box and click on Install (You can send information to Microsoft about your setup experience if you wish)

















Click on Finish to progress with the installation...
A window to set up Gtk# will appear















Click on Next...















Read the agreement and tick the accept box then click Next...















Choose your destination folder and click Next...















Click Install...















Click Finish

The PlayStation Suite SDK will continue with the installation and you will then be prompted to install the PlayStation Vita USB Driver















Click Next...
If the following appears:



 Click "Install this driver software anyway" to continue















Click Finish on both of these windows.

The PlayStation Suite SDK has been successfully installed!

Saturday 26 May 2012

No one said it was going to be easy...

Welcome to my blog!

I've always wanted to create video games when I was younger, even if it was a simple text-based game (like the text-based DOS games) but I never knew where to even begin.

Now, I have a chance to try creating my own game using the PlayStation Suite SDK, along with the help from my partner who is a Software Engineer. 

Although I may not be successful, I will blog about my struggles and positive experiences throughout the journey. 

I am aware that C# is the language used in this developer kit but I've been told that this is similar to Java, which I've some experience with. 

Looking forward to letting you know how I get on and any feedback is welcome!