Tuesday, May 29, 2018

57.) How to Install & Run XNA on Windows 10


       Contrary to the popular belief that XNA is no longer supported on newer versions of windows (no newer than Windows 7) due to its discontinuation by Microsoft, it is possible to get XNA running on Windows 8, as well as Windows 10. In its pure form, XNA will not work as a new Windows 10 application, however there is a platform called Project Centennial which helps to bring win32 (XNA) games to Windows 10. Luckily there is an open source implementation of XNA which is essentially the exact same thing and that is currently supported on all windows versions. It’ called MonoGame and I thoroughly enjoy it. 


Pre-Requisites  

1.) You will need Visual Studio C# 2008 Express to run XNA 3.1. You can download it here 

2.) When the installation process completes, click on Exit. 

Import Note: You will need to register Microsoft Visual C# 2008 Express within 30 days by clicking on Help > Register Production. Once you provide all of the required registration information, you will be presented with a 14-character registration key. Copy and paste this key into the Registration Window and click on the Complete Registration button.

I noticed when I entered in my serial key for Microsoft Visual Studio 2008 C # Express, it didn’t work for some apparent reason. Luckily there is a solution; a way around this problem if you encounter it.

1.) First, Press your Windows Key and R together to open the Run window.
2.) Now type in “regedit” without quotes, hit enter, and navigate to: Computer\HKEY_CURRENT_USER\Software\Microsoft\VCSExpress\9.0\Registration

If typed correctly, a window named ‘Registry Editor’ should appear in just a second.



3.) Delete the value Params. 

4.) Right click on the key ‘Registration’ in the tree, and click permission. 

5.) Click Advanced… 

6.) Go to the permissions tab, and uncheck the box labeled ‘Inherit from parent the permission entries that apply to child object. Include these with entries explicitly defined here.’

7.) In the dialog that opens. Click copy


8.) Hit OK in the ‘Advanced’ window 

9.) Back in the first permission window, click your user, and uncheck Full Control. 

10.) Do the same thing for the Administrators group. 

11.) Hit OK or Apply. Congratulation, you will never again be plagued by the registration nag, and just like WinRAR, your trial will never expire. 

Important Note: I recommend restarting your computer just in case. 

If you are having trouble, check out this video below which has a similar process to the step above. The only difference is that it is less steps and has you delete the entire ‘Registration’ folder and tells you to close the Registry Editor. 





XNA 3.1 
       Now you are ready to Install XNA 3.1.

1.) Click here to download the XNA 3.1 installer. This will take you to the page where you can click on the Download option. 

2.) A file named XNAG31_setup.exe will be downloaded.

The setup wizard will guide you through the installation process.

4.) Double-click on the XNA installation program. Click on Continue if prompted for permission to continue.


5.) The Welcome to XNA Game Studio 3.1 Setup Wizard window appears. Click on Next.

6.) The Microsoft Software License Terms are displayed. Read them and then select I accept the terms in the License Agreement option and click on Next.

7.) You will be prompted to allow Game Studio and XNA games to communicate through the firewall on your computer. Click on Yes, I Wish to Select These Rules to Enable, and then enable both of the following options and click on Install.

Allow communications between an Xbox 360 and your computer on the local subnet.
Allow the communication of network games built on the XNA Framework.


8.) XNA Game Studio 3.1 will copy files to your computer and complete the installation process. Once the process is complete, a message is displayed announcing that Microsoft XNA Game Studio 3.1 was installed into Microsoft Visual C# 2008 Express. The Take Me to the XNA Creators Club Online Website option is displayed and enabled.

9.) Click on Finish. Congratulations! You now have XNA 3.1 running on Windows 10.

There are some very nice Templates that come
with XNA 3.1


Why in the world would you want to run XNA 3.1 on Windows 10? 
       I have been asked this question many times. I got my start in game development with XNA like many others. That being said, the vast majority of my game projects were created in XNA version 3.1. Prior to installing and successfully running XNA 3.1 on Windows 10, it was a hassle going back and forth between two different computers since XNA 3.1 ran on versions no later than Windows 7. Now I can keep all my projects in one place and not have to worry about whether or not they will run for the most part. There were many breaking changes between XNA 3.1 and 4.0. Now that I have figured out how to run XNA 3.1 on Windows 10, I can revive my old game projects from the dead.

       Once revived, I can convert them to XNA 4.0 also with the help of the XNA 3.1 to 4.0 Cheat Sheet. Once I get my projects running in XNA 4.0, I can then port them over to MonoGame. So I am using MonoGame to essentially port my game projects to other platforms besides the default platforms supported by XNA: Windows PC, Window Phone 7, Xbox 360 and Zune. It is also possible to create a wrapper in Unity and get your XNA game projects running in the Unity Game Engine; however it will require some work. Below is a screenshot of Dungeon Quest from the book Professional XNA Game Programming 2.0 that I converted to XNA 3.1 and successfully got running on my Windows 10 computer. I plan on converting it as well with so many other XNA 3.1 game projects to XNA 4.0 and MonoGame.

Dungeon Quest Pic 1

Dungeon Quest Pic 2


XNA 4.0 & Refresh Version
       Microsoft XNA Game Studio only supports Visual Studio 2010. Later versions of Visual Studio are only partially supported (only Windows Phone 7 projects). Here is a list of workarounds to use the Microsoft XNA Game Studio with Visual Studio 2012 and higher.

How to Setup XNA 4.0 for Windows 10 
1.) Install the Games for Windows Live Client (Mainly for Windows 8 and higher users)

2.) Install Visual Studio 2012 or higher.

3.) Install Windows Phone SDK 7.1

4.) Install Windows Phone SDK 7.1.1 Update

(Note: The Windows Phone SDK contains XNA Game Studio)

5.) Copy the folder named XNA Game Studio 4.0 from

C:\Program Files (x86)\Microsoft Visual Studio 10.0\common7\ide\extensions\Microsoft

to

  • (for VS2012) C:\Program Files (x86)\Microsoft Visual Studio 11.0\common7\ide\extensions\Microsoft
  • (for VS2013) C:\Program Files (x86)\Microsoft Visual Studio 12.0\common7\ide\extensions\Microsoft
  • (for VS2015) C:\Program Files (x86)\Microsoft Visual Studio 14.0\common7\ide\extensions\Microsoft
  • (for VS2017) C:\Program Files (x86)\Microsoft Visual Studio 16.0\common7\ide\extensions\Microsoft

On some systems Visual Studio is incorrectly installed in the Program Files (x86) folder instead of the Microsoft Visual Studio 12.0 folder. In this case you have to use this target path:

 C:\Program Files (x86)\Common7\IDE\Extensions\Microsoft

6.) Start a text editor with administrator privileges. Open the file extension.vsixmanifest from the folder XNA Game Studio 4.0. and change the supported Visual Studio version from

<VisualStudio Version="10.0">

to

  • (for VS2012) <VisualStudio Version="11.0">
  • (for VS2013) <VisualStudio Version="12.0">
  • (for VS2015) <VisualStudio Version="14.0">
  • (for VS2017) <VisualStudio Version="16.0">


This works for Visual Studio Professional. If you use an edition that is not listed, you might have to add a tag for this edition. For example, for Visual Studio 2013 Premium or Ultimate change

<SupportedProducts>
  <VisualStudio Version="10.0">
    <Edition>VSTS</Edition>
    <Edition>VSTD</Edition>
    <Edition>Pro</Edition>
    <Edition>VCSExpress</Edition>
    <Edition>VPDExpress</Edition>
  </VisualStudio>
</SupportedProducts>

to
<SupportedProducts>
  <VisualStudio Version="12.0">
    <Edition>Ultimate</Edition>
    <Edition>Premium</Edition>
    <Edition>Pro</Edition>
 </VisualStudio>
</SupportedProducts>


7.) On some PCs the following step is necessary: Clear the VS extension cache. For example, for Visual Studio 2013 delete the files in
%localappdata%\Microsoft\VisualStudio\12.0\Extensions

8.) Open the command prompt with administrator privileges. Change the working directory to the directory which contains devenv.exe:

(for VS2012) C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\
(for VS2013) C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\
(for VS2015) C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\
(for VS2017) C:\Program Files (x86)\Microsoft Visual Studio 16.0\Common7\IDE\

or

C:\Program Files (x86)\Common7\IDE\

and execute 

devenv.exe /setup

to rebuild the extension cache. 


Known Issues: Content is always rebuilt
       In some solutions XNA content projects are always rebuilt even if the output is up-to-date - which can be annoying because building content can take many minutes in larger projects. Usually, this happens if a content pipeline project is included in the solution. The content pipeline assembly is updated every time the project is built, which causes the content to be rebuilt. A simple workaround is to build the content pipeline projects once and then unload it from the Visual Studio solution: In Visual Studio open the Solution Explorer, right-click the content pipeline project and select Unload Project in the context menu.

       If this does not solve the problem and the content is still rebuilding, then you can check the Visual Studio build log in the Output window to see which project causes the rebuilds. You might have to increase the amount of information in the build log: Open the menu Tools | Options... | Projects and Solutions | Build and Run and change the MSBuild project build output verbosity to Detailed.



XNA Installers
       If you have any trouble with finding the installation files on the web to download and install XNA, I have also provided them here 

Along with XNA installation files, this download also contains the following if you had any trouble above: 

Games for Windows Live Client
Windows Live Sign-In 
Windows Phone SDK 7.1


Important Note: Its not required but if you'd like, this guide created by Roy Triesscheijn that will provide you with a workaround for using XNA in Visual Studio 2017



MonoGame
       Both Xbox One and Windows 10 support MonoGame. Check out the 2015 Build Conference video by Jaime Rodriguez and Brian Peek.  On March 14, 2016, ID@Xbox announced that MonoGame is coming to Xbox One. This was great news for XNA fans.


How to Setup MonoGame
       RB Whitaker's Wiki provides some awesome tutorials both for XNA and MonoGame. Go to the Setting Up MonoGame page to learn how to successfully install MonoGame.





Sources: 
Stackoverflow: How to install XNA Game Studio on Visual Studio 2012: https://stackoverflow.com/questions/10881005/how-to-install-xna-game-studio-on-visual-studio-2012 


Justin Aquadro: XNA Templates for Visual Stuidio 2013: https://jaquadro.com/2014/02/xna-templates-for-visual-studio-2013/ 

Roy T.: Installing XNA 4 under Visual Studio 2017: https://roy-t.nl/2017/07/18/Installing-XNA-4-under-Visual-Studio-2017.html  



56.) The Xbox Live Indie Games App Hub Website Is Shut Down


       These have been both some awesome yet sad days. The App Hub Website is no longer up. This is sad for me because it essentially contained the Community Forums. There are fragments of the App Hub website at archive.org. Just to be clear, the community forums is not to be confused with the app hub samples. The forums contained a long history of tips, resources, questions and answers to those questions developers shared. Many programming problems developers encounter with MonoGame have already been resolved just by browsing through these forums from the past. That's years of research and solutions that would be going to waste; especially since it would be highly beneficial to developers using MonoGame. I was almost finished gathering everything I needed from the community forums on the App Hub website to help me with my research. It’s sad to see it go. 


Update!: Feel free to disregard this blog post. The App Hub website was down as of 5/29/18 and it is now apparently back up and running as of 5/30/18. I'm just glad I can continue my research while the website still lasts. Either way, the link to the App Hub Website can be found here: http://xbox.create.msdn.com/en-US/


      

Monday, May 28, 2018

55.) XNA Developer's Survival Kit Expanded



Is it possible to created a game engine like Unity or Unreal in XNA/ MonoGame? How long would it take to create?

       In short, the answers is yes, however the vast majority will say given enough talent, number of coders, time and money. These are all variables that will have a major impact on the time-frame it would take to create an engine "like or equivalent to Unreal or Unity". There are other variables and factors that could also pro-long the development of such an engine as life can get in the way. There are tons of research on the web that says it could take 5 years or more. With the help of this awesome developer's survival kit, you will be able to create an epic game engine in a fraction of both that time and costs.

       If you are thinking about creating your own game engine and you utilize XNA and or MonoGame, I highly recommend the XDSK2 Expanded (XNA Developer's Survival Kit Expanded). This page contains a list of links to tools that can be used by game developers to develop their own games or game engines, without having to spend weeks and weeks searching over the internet for specific libraries, algorithms and other resources needed to develop a game. There are a host of third party libraries as well. One of the advantages of using a platform like XNA or MonoGame is that there is a large enough developer community providing lots of libraries out there to help you do cool and unique things with it. That way you can leverage these libraries to solve your technical problems, and focus more on making your game fun.

       This kit was originally created by Nelson Hurst who has re-uploaded the original XDSK2 on his blog. So this page is essentially a combination of Nexlon's research and mine. If you are looking for tools to help you save time and money with your game projects, even if you don't use XNA or MonoGame, you will still find this page very helpful!  I will gradually continue to update the XDSK2 Expanded page and add more as I discover them over time. If you have any additional libraries and or resources to help ease the burden of creating games and or game engines in XNA and MonoGame, please share them by commenting below. In this blog post, I also present several libraries that you may find useful.


PHYSICS
       One of the most difficult parts of a modern game is the physics engine. Even more than graphics, this is one of the advantages of having a 2D game, since 2D physics is simpler than 3D physics. It also means that there are likely to be a lot of free physics libraries out there (unlike the 3D engines, which want some serious money). My preferred 2D physics engine is called Farseer Physics.

Farseer Physics
       Created by Jeff Weber and lead by Ian Qvist, the Farseer Physics Engine (now changed to Velcro Physics) is an open source high performance 2D collision detection system with realistic physics responses. It was originally based off the XNA port of Box2D. This download includes source code, samples and documentation. It also includes the source to Velcro Physics. Check out the samples inside the Projects folder. The Simple Samples projects were created by Mads Laumann. The TestBed project was ported by Marcel Härte to MonoGame 3.6. Also, check out the Black Hole Gunner game located in the projects folder. Black Hole Gunner was a game created by Libor Vilimek, Jan Švehla, and Vojtěch Ruschka. The game was made at the end of year 2010 at Czech Technical University (ČVUT) in school subject "Computer games and Animations". The game is based on the Farseer Engine, built in XNA 4.0, Visual Studio. Black Hole Gunner was made within 2-5 months with no game-experience creation.

Farseer has a ton of features!

  • Continuous collision detection (with time of impact solver)
  • Contact callbacks: begin, end, pre-solve, post-solve
  • Convex and concave polygons and circles.
  • Multiple shapes per body
  • Dynamic tree and quad tree broadphase
  • Fast broadphase AABB queries and raycasts
  • Collision groups and categories
  • Sleep management
  • Friction and restitution
  • Stable stacking with a linear-time solver
  • Revolute, prismatic, distance, pulley, gear, mouse joint, and other joint types
  • Joint limits and joint motors
  • Controllers (gravity, force generators)
  • Tools to decompose concave polygons, find convex hulls and boolean operations
  • Factories to simplify the creation of bodies


Wednesday, February 28, 2018

54. Monster Truck Basic Modeling Process


       Welcome to my next blog post where I share a basic insight into creating models for my game projects. For the vehicles, I attended car shows to gather references to model from. I took pictures of the front, back, sides and top of the vehicle to help with the modeling process. There are many ways I approach this and often I try different methods. This blog post simply illustrates the basic workflow I follow. The first part is to block out the 3d model. This step is about keeping the geometry simple and getting the proportions and shapes right. I often start this in sketchup to keep everything low-poly and simple. I normally don't model the vehicle in its entirety. I model individual components of the vehicle separately to be assembled later. For example, I will model the chassis, wheels, suspension, seat, and engine separately and then import the models to into one scene to configure the vehicle. Below is a screenshot of the final assembly. 


Final Assembly
       I use Sketchup for this to keep everything low-poly and pretty basic. Once the assembly is complete, I export the model as a .3ds file to later be imported in 3D Studio Max. After touching up the model in 3ds Max, I export the model as a .fbx file and import it into Autodesk Maya. I am aware that Sketchup can export .fbx file types. I've encountered issues when I import an .fbx file exported from Sketchup such as missing faces and gaps in the models' geometry. I've found ways to fix most of them however, when exported as a .3ds file from Sketchup, all of the detail, textures and geometry is retained with no issues for the most part.


SketchUp Feature Request: Customizable Navigation
       First, I’d like to say that SketchUp is an amazing application. I would like to suggest a feature that would make not only my work in SketchUp more enjoyable, but others as well. Like myself, there are many who use other 3D software alongside SketchUp. What it SketchUp offered options to suit users’ preferences that allow them to customize their navigation controls? What if the user could click on settings and assign different keys or a combination for changing the navigation controls. We’ve seen this feature work well in videogames. Allowing the user to somehow emulate the controls of their favorite 3D App would enhance their experience in SketchUp because it would be more pleasant and consistent when going back and forth between programs. For example, I am an Autodesk Maya user for the most part as it’s the modeling program I am most familiar with. I am use to holding down the ‘alt’ key, then dragging the left mouse button to rotate, the middle mouse to pan and the right button to zoom. As much as I enjoy using SketchUp, often times I forget that everything is different and find myself spending a few extra minutes trying to adjust.

For example:

Maya:
Alt + Hold-Left-Mouse = orbit view
Alt + Hold-Right-Mouse + Drag Right = zoom view in
Alt + Hold-Right-Mouse + Drag Left = zoom view out
Alt + Hold-Middle-Mouse = pan view

Sketchup:
Hold-Middle-Mouse = orbit view
Roll-Mouse-Wheel = zoom view in/out
Shift + Hold-Middle-Mouse = pan view


       I often start out modeling SketchUp since it has the ability to do a number of things much faster than Maya, but because the navigation and tool hotkeys are so different from one another, I stumble over my old habits trying to use them more so. Wings 3D for instance lets you set a preference as to how the navigation works, and better yet it has a drop down list of 3D apps that you can emulate. Many users feel at home when they enter Wings right because they instantly know how to get around. If SketchUp allowed the user to assign the mouse buttons along with the modifier keys to navigational functions then you could make SketchUp navigate the way you want instead of being forced to learn a new system or have to adjust to it all of a sudden after spending a few hours in a different program. In short, to have user’s 3D navigation muscle memory they’ve built up by a different program to be supported would supplement very well. Anyway, I just figured a feature like this would help many 3D users out there besides me adapt more easily to the way SketchUp works.













       I often go back and model different components of the vehicle separately and add them back in such as the engine and the springs. 








Textures Turned Off

Wireframe

Viewports


















Thursday, December 14, 2017

53. Euclideon Welcomes the World to Holoverse


       Hello everyone and welcome to my next blog post. This is news many have been anticipating for quite some time now. I am aware I've been pretty late on posting this so my apologies up front. Euclideon has opened the world’s first hologram entertainment center where people can play games and have holographic adventures. Bruce Dell, the CEO of Euclideon was kind enough to contact me some time ago and share . He had informed me they were working on opening up hologram entertainment centers all over the world. Unlike virtual reality helmets, they are using a technology similar to augmented reality. So rather than having a screen over their eyes, the objects are projected to appear in the air. 


Further details are coming soon..


About Holoverse: http://holoverse.com.au/about.html

Holoverse FAQ: http://holoverse.com.au/about.html#games-experiences

Holoverse Games: http://holoverse.com.au/experiences.html

Sunday, October 8, 2017

52. XNA 4.0 & MonoGame Robot Mech Attachments


       The is my robot animation processor based off the Robot Game Starter Kit running in XNA 4.0 and MonoGame. It took a while to figure out how to attach models to the mech "correctly". By multiplying the bone-transform of the specific bone index of the mech, to the parent-bone index of the model, I was able to attach them. This works for both animated and non-animated models. Figuring out how to attach the models to the mech was the first challenge. However, due to the complexity of the animation processor, positioning the models correctly on the mech model was the biggest challenge. Now that attachments work, I am programming customization options for the mech.


Jet-Pack Screenshots














Gun Screenshots




























       Besides guns, I was able to attach melee weapons to the mech such as swords. I will be working on a way to program the mech's animation processor to somehow mimic the animations of other animated characters. This will help save time when creating melee animations for sword attacks and blocks. Performing melee sword attacks also while jet-packing could make for some interesting gameplay. 


Dual-Wielding Swords Screenshots


















The Map in First-Person