Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon

25. August 2011

 

In putting together content for this site, I find myself working in Visual C++ which presented an unintended consequence, the project folder’s files are big, huge in fact!  Most of the problem boils down to the intermediate files that Visual C++ generates for intellisense and pre-compiled headers.

 

Therefore each time I wanted to post a code example to this site, I had to go through and delete all of these temporary files or my archives would be huge.  Worse still, every time I open up the solution, they would be regenerated.  ( Yes, you can move these files outside of your folder as a possible work around ).  I figured with the whole me being a programmer thing, I could throw together a program that did this work for me.

 

Therefore I present to you ProjectCleaner.  Aim it at a folder containing your project or sln file click “Clean Project” and it will go through and delete all the temporary cruft ready for you to zip up and share.  For the record, it deletes log, tlog, pch, pdb and obj files as well as the ipch folder.

 

image

 

 

Here are the results after applying to a relatively simple project folder:

image

 

As you can see, it results in a 37MB reduction in size, which saves more than just a small bit of bandwidth.

 

So, if you are finding yourself needing to shrink your Visual C++ projects down to share them, this tool may prove useful.  The source is exceedingly primitive.  It’s written in C#, requires .NET 4.

 

 

Files:

 

CleanProject.zip  -- program executable

CleanProjectSource.zip -- source code

Programming

25. August 2011

 

I am currently working on a beginner level tutorial using SFML and just ran into a show stopper that I want to share.  If you are already using SFML 1.6, this is probably old news to you, but it caused me enough pain that I want to share it here.  Maybe someone in the future will find this on Google and they wont end up wasting a couple hours like I just did.

 

Anyways, I was developing away at my game and doing most of my work on my portable laptop, which has an integrated Intel chipset.  On occasion I did a little bit of work on my primary development laptop which has a higher end Radeon GPU and everything works fine.  Anyways, earlier this week Deus Ex: Human Revolution came out and PC gaming being what it is, I had to download and install the latest drivers.  Fast forward to today, I load up the project make a few changes and:

 

image

 

Completely hung.  Zero response whatsoever.  If I run the same application outside of Visual Studio, it requires me to kill it in Task Manager.

 

So I jump to the logical conclusion and figure it was something I changed recently in my code, so I start hacking and slashing out the changes until I am back to nothing.  Still hangs.  WTF?  Now I start hacking even more until the point I get to my main() consisting of a single return statement and still it hangs!  WTF x2?  Obviously at this point it’s a linker problem, and my lost likely culprit is SFML, so off to Google I go!

 

End result, yes, the dynamically linked version of SFML apparently has a bug with the OpenGL implementation of modern ATI drivers.  Yay.  Apparently it is only in the dynamic version of SFML, so you can switch to static linking and it will go away, but when writing a tutorial, this kind of added complication simply isn’t realistic.  That said, there is a work around and there is a fix... of sorts.

 

Apparently the problem is caused in atigktxx.dll and you can grab a copy that works here ( along with additional explanation ).  I haven’t an actual clue what the bug itself is ( it’s wayyyyyy outside my code ), but by including this copy of atigktxx.dll in your executable folder, it overrides loading the one that is installed on your machine, thus preventing the bug.

 

Oh, and although that post was in February and the fix is “coming soon”, the problem still occurs.  I do however believe this is fixed in the 2.0 version of SFML, but please don’t quote me on that!

 

So, long story short, if you are using SFML 1.6 and you want to support ATI cards with recent drivers, ship your game with atigktxx.dll in your executable directory.

 

Oh and moral of the story…  don’t always go blaming your code first!  I kow have a ton of damage to undo that I needlessly caused!  Moral number two…  ATI still suck at making drivers!

Programming ,

21. August 2011

 

When just starting out with Blender, figuring your way around the UI is probably the most difficult step.  One of the most difficult things to come to terms with is creating and closing windows.  This is something that changed massively from Blender 2.4 to 2.5, so a lot of the documentation out there is simply out dated.

 

This video shows you how to arrange Blender exactly how you want it.  Once you figure out the way things work, it is amazingly power, but it can be confusing at first.  The video is of Blender 2.59 and is shot at 1080p for maximum clarity.

 

 

Customizing Blender 2.59’s User Interface

EDIT (8/25/2011): Click here for Vimeo video.

Art

17. August 2011
 

I’ve been a little to focused on C++ I completely missed and forgot to mention that a new release of Blender, Blender 2.59 was release (*cough* 3 days ago *cough*). A ton of new bug fixes, include one specifically for exporting to Unity, have been addressed.  Additionally added support for 3D Mouse(s?), Custom Keymapping, an Ivy and Tree generator.

 

Click here to download now.

 

I will check shortly to see if it works “out of the box” with Unity.

 

EDIT: 8/17/2011  Nope, default export didn’t work.  Can’t say I’m shocked.

EDIT2: User woodn has provided an updated importer script.  Download it, extract the .py file and extract it to your Unity install directory /Editor/Tools folder, overwriting the existing importer.

After updating the import script it would successfully import dae files, but wouldn’t automatically process .blend files, at least for me.

Art ,

16. August 2011

 

Well if you are a student that is, yes!  Autodesk has made an absolute ton of their programs available on a 36 month license for students.  That said, there is a very big but… and we will get to it in a moment.  First off, here are the applications they made available:

 

AutoCAD®
AutoCAD® for Mac
AutoCAD® Civil 3D®
AutoCAD® Electrical
Autodesk® Alias® Design
Autodesk® Alias® Automotive**
Autodesk® Ecotect® Analysis
Autodesk® Inventor® Professional
Autodesk® Maya®

Autodesk® Moldflow® Adviser
Autodesk® Mudbox™
Autodesk® Revit® Architecture
Autodesk® Revit® MEP
Autodesk® Revit® Structure
Autodesk® Simulation Multiphysics 
Autodesk® Smoke®
Autodesk® Softimage®
Autodesk® 3ds Max®

That is a pretty awesome list and making them available to students for free is an absolutely brilliant idea for locking in future users down the road.  Now here are the buts…

 

If you are creating a game, you are violating the license.  This license is explicitly for personal learning.  The personal part even excludes use in a lab or classroom environments, however more to the point, if you want to use the software to work on a game that is going to be distributed ( even freely ) you are violating the license!  If you use the software to create graphics for a website, you are violating the license.  In a nutshell, legally, you can only use the software to learn or post your works to Autodesk’s community.  Now posting your work to a 3rd party like DeviantArt for non-commercial gain, I do not know the legal status of that.

 

As to who qualifies as a student, I will let Autodesk themselves answer that.

 

A faculty member is an employee at a primary or secondary educational institution or any degree-granting or certificate-granting educational institution or any learning, teaching or training facilities and who upon request by Autodesk is able to provide proof of such status.

A student is an individual enrolled at a recognized degree-granting or certificate-granting educational institution for three (3) or more credit hours in a degree-granting or certificate granting education program or in a nine (9) month or longer certificate program, and upon request by Autodesk is able to provide proof of such enrollment.

An Autodesk Assistance Program participant is either a veteran or unemployed individual who has previously worked in the architecture, engineering, design or manufacturing industries, completed the online registration for the Autodesk Assistance Program, and upon request by Autodesk is able to provide proof of eligibility for that program.

 

 

So if you are thinking the cost of your game just went way down because you are a student, you are completely wrong.  However, if you wanted easy free access to learn and evaluate various Autodesk products, you will love this opportunity.

Month List

Popular Comments

A look around the PlayStation Mobile tools and SDK
Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon


22. April 2012

 

 

This post is going to take a look at what’s included with the PS SDK, PlayStation Suite Studio and all the various included tools and tutorials.  So if you are wondering what is included in the PSSDK or have downloaded it and are trying to figure out what exactly you’ve got, this post is for you!  It assumes you’ve installed to default directories, so if you haven’t you have to adjust all locations accordingly.

 

 

image

 

 

Where is everything?

 

 

The PS Suite SDK installs to two different locations.  First check out

C:\Users\Public\Documents\Pss

This is where all the documentation and samples are installed.  The samples are amazingly comprehensive, but we will cover that later.  The samples are in the “samples” sub-directory.  The documentation are in the “doc\en” sub-directory.  The most important file is pss_sdk_doc_e.chm, which is the primary source of documentation and should soon become your best friend.  On the other hand “index.html” brings up the html document, which appears to be system generated class reference documentation and duplicates a lot of the information in the chm file.  Of course, both of these can be launched from the start menu.  Just do yourself a favour now, open pss_sdk_doc_e.chm now and leave it open! Winking smile

 

 

The next important folder is C:\Program Files (x86)\SCE\Pss, assuming you are running a 64 bit Windows ( drop the (X86) if not ).  The mono and software directories can be pretty much ignored.  Within the “target\win32” is pss.exe, which is the PlayStation Suite simulator which of course can be launched from Studio.  The source directory contains 4 helper libraries with full source code, GameEngine2D, Model, Physics2D and UI.  Most are documented in the main documentation already, so I won’t go into further details on these.

 

Perhaps most important is the tools sub-directory and the key files being:


 

adb This is the Android debugging bridge, it’s normally part of the Android SDK, but apparently PSS uses it for debugging too.

AnimationConverter This command line application is used to convert animations authored in Adobe Flash into a PS Suite compatible format.

OscCustomizeTool This tool is used to create onscreen joystick controls for Android ( but not the simulator or Vita ).  The output is a cfg file.

PssStudio This is where the Studio is located, which is a customized version of MonoDevelop and we will see it in more details later.

ModelConverter Is a command line utility to convert from dae, fbx, xsi and x formats to mdx format for use in PS Suite, I will cover this process in an upcoming tutorial.

Vita This folder contains the device driver needed for your computer to see your Vita.

ShaderConverter Used to convert cg shaders to a PS compatible formats.

UIComposer Used for making GUIs, will look at this in a bit more detail later

 


 

Playstation Suite Studio

 

 

This is where the magic happens.  PlayStation Suite Studio is a modified version of MonoDevelop, which is a code editor, project manager and debugger all in one.  You create, debug and compile your code all from within Studio, which is capable of launching the Simulator or deploying and debugging on your actual device.  This is as screenshot Studio in action:

 

image

 

On the left is the project manager window, to the right is the tabbed area where you edit or debug your source code.  The windows change based on your current activity.  Perhaps the most important modifications to MonoDevelop, are the new PlayStation Studio specific projects.

 

image

 

Until the Visual Studio add-in is released, PlayStation Suite Studio is where you are going to spend the majority of your waking hours.  I will cover parts of it in more detail in later tutorials.

 

 

 

PlayStation Suite UI Composer

 

 

UI Composer is where you put together your User Interfaces, which are then saved in .uic XML format.  If you are familiar with building UIs in Visual Studio, Interface Builder, Qt Designer or various other similar UI generators, you will feel right at home here.  Here is a shot of UI Composer in action:

 

image

 

 

There’s a pretty good selection of widgets available, illustrated below:

 

image

 

 

UI Composer can be used to generate Scenes, Panels, Dialogs and ListPanels.  Once you have drawn your UI, you then “Build” it, which then generates cs code to be included in your project.  The code generated uses partial classes, meaning you can add your code, but if you make changes, it will not overwrite them.

 

 

 

OscCustomizeTool

 

 

This is a neat tool for creating onscreen controls for Android tablets.  The end result is a cfg file that controls how the, um, controls will be created.  However it doesn’t work on Vita ( makes sense… ) and doesn’t work on the simulator ( doesn’t make sesne ), so I haven’t really got a chance to use it.  The UI seems quite evident though, you pick what capabilities to enable:

 

image

 

 

Then you select the layout and form factor you want to use:

 

image

 

I look forward to trying this out a bit more, so hopefully they will add compatibility with the simulator, even if just single touch at first ( or better yet, give the ability to remote control using a device, or map to a keyboard ).

 

 

The Demos

 

 

Ok, wow, this is the part Sony really got right.  There are full source code demos, many many many demos.

 

 

As to the demos, there are lots of little ones you would expect to demonstrate individual aspects, such as playing music, math usage, clipboard, storage, networking, physics, input, UI, model loading, imaging, etc.  Then some are extremely impressive and detailed, like the following:

 

 

A flight game:

image

 

 

A Arkanoid-ish Game:

image

 

 

A 3D Tower defense game:

image

 

 

A fully 3D RPG!

image

 

 

A 3D R-Type style game:

image

 

 

An Angry Birds Style game:

image

 

 

A 2D Side Scroller:

image

 

 

A Puzzle Game:

image

 

 

An RSS Reader:

image

 

 

And many more.  Seriously Sony, bang up job on the samples!  This is where you will spend a lot of your time, reading through the source examples, which I need to warn are often documented in Japanese, as are some of the tooltips.

 

 

The SDK

 

So that’s the tools and demos included, what about the actual code libraries themselves?  Well, PlayStation Suite SDK is based on Mono, so you get most of the libraries you would expect from it, which means most of the .NET runtime which is pretty comprehensive.

 

Additionally, as I mentioned earlier, they provided full sample projects, including a 2D Game Engine and a physics implementation.  On top, here is the class hierarchy of the current SDK:

 

 

 

ClassListPS

 

Over all, I am extremely impressed with what is included.  I wish Visual Studio support was ready, but PlayStation Studio (MonoDevelop) is pretty impressive if a bit sloppy at times.  You basically have everything you need to get started, it’s just a matter of finding it.

 

 

In a nutshell, that’s what you get when you install PlayStation Suite SDK. If you are just starting out, I highly recommend you jump into the CHM help file, or more importantly, start running through the samples.  There is a ton of great content in there and they have been my main source of information so far, as the documentation can be a bit… lacking at times.

General , , ,

blog comments powered by Disqus

Month List

Popular Comments