Wednesday, December 15, 2010

new VertexBuffer() Xna3.1 -> Xna4.0

My latest errors seem to revolve a lot around vertex buffer api changes. There is  nice blog post here by Shawn Hargreaves.
Post about Vertex Buffer Changes

simply put though you remove your VertexDeclaration lines of code and just put 'typeof(RoundLineVertex)' the declaration in the second parameter of the VertexBuffer call, like these following two lines of code.
vb = new VertexBuffer(device, typeof(RoundLineVertex), numVertices * bytesPerVertex, BufferUsage.None);

// vdecl = new VertexDeclaration(device, RoundLineVertex.VertexElements);
 
After going through that it was very easy to change the VertexBuffer setups... Only now i have IndexBuffer to sort out. I did not write this original code and so have no real working knowlegde of the finer points required to make this stuff work. However I hope it wil be fairly straight forward once i under what has changed in the API. I understand what the buffer is for, only not whats changed at the moment.

Laters

Tuesday, December 14, 2010

Blooming fixed some more Xna3.1 -> Xna4.0

So i had 28 erros, ALL of them pertaining to the Bloom component. Interesting. I know by experience that this is not the last of the errors. They are just being masked by the current issues. So i was not surprised when i fixed the Bloom to see a new selection of errors, 48 in total.

So fixing the Bloom was easy. I just compared the New 4.0 sample to what i had and copied over the changes. I would have just copied verbatim, but i knew i made several small changes to the Bloom and i did not want to do that again. This process only took about 5 minutes anyway.

So now onto my new Errors which include
does not conatin a definition for 'MinimumVertexShaderProfile'
and
VertexElementMethod does not exist

These are all to do with Roundline which i am actually not using at the moment in this game. I may remove it for now. I will bring it back when i want to use it (gonna be used for the Menu button descriptions I hope!)

So ever forward we go.

Now tomorrow night is my works party, i am sure i will not be posting then :)

G'night

Xna3.1 -> Xna 4.0 Solving missing types

So i had 158 errors and the most obvious one was the mising definitions for certain types like..
Vector2
Vector3
Vector4
Rectangle

To solve this issue i created a brand spanking new Solution and opened it up. As the problem appeared to be mising references i started by opening up the referecnes for the new project, then comparing them with the ones in my broken project. Immediatly i saw i was missing a couple of very important reference files.
Microsoft.Xna.Framework
System.Net
Obviously without these there is no way it can compile. You can just right click the References line and say 'Add Reference' then simply browse for these two to add them in.

Onto the next issues later..
Oh, i have about 28 errors left, Yay!

Monday, December 13, 2010

My Motivation is Lacking

Or put another way..
I do not yet have enough motivation to trawl through the myriad upgrading problems presented to me by the upgrade of Xna 3.1 to Xna 4.0 game Studio.

Still i feel every day more and more resolve, only not enough yet to actually boot up studio and stare at the current issues. Last night was close but lost out to spending time with my wife.

So the last week or so has still been busy for me. Playing lots of Cataclysm which i have been enjoying rather more than i expected. I have also been Kinect playing with Dance Central a lot. Boy is that my kinda game. In fact for me it is my GOTY. I even parted with 6 stinking dollars to get 2 downloadable dances, bah! I hate you Xbox (well not really). al i need now is to get a few more friends gamertags that actually play this game. Comparing my score to one friend is ok, but not enough darn it! I need to beat or be beaten by more people. It is also great cos my wife, son, and daughter also like to play this game. Truly awesome. I hope one day it will be able to actually play two at the same time (not like the take ya turns as it is now).

Maybe tonight will be the nigth i power up Dev Studio. I feel i have more resolve and also a few more tricky ideas of simple thing to try that i believe will solve my current issues. then onto new ones.

Laters

Thursday, December 9, 2010

Wow has accounted for my last night or two

I do have to say that it seems like an easy choice to play Cataclysm instead of developing games. Though this would not normally be true, IF in fact i could develop my game. However with Berzerkatron being stuck being upgraded to 4.0 Xna, it is hard to get into at all.

So instead of slogging through error  after error, i play Wow with my Son and our friends. Easy choice right now.

G'night

Tuesday, December 7, 2010

So i removed the Avatar code (Xna 3.1->4.0)

After all the issues last night i have decided to remove all Avatar code for now. The chnages look just too all encompassing.and i need to get something going, if only for my sanity. Though sanity aside, it is always best to divide and conquer a problem if at all possible, and i am of the beleif that all problems can be broken down in some way.

So what happened after removal of the Avatar code? Well i ended up with 158 Errors, woohoo! Now there is something i can dig into, only i wonder how many more are hiding under these, as is usually the case.

So my next Error is... (unexpected)
"Error 1 The type or namespace name 'Vector2' could not be found (are you missing a using directive or an assembly reference?)"
I also get similar errors for Vector4 and Color (now i knew Color had changed but the Base Vector type declarations?). I guess it's time to see what i should be presenting these as.


After about 25 minutes searching, i have not found an answer. I have a couple of the Samples from the App hub and they seem to work perfectly. So i have no clue at the moment what is wrong with some of my types. I also see the same issue with 'Rectangle', i am sure one cure will fit most of these.
 
Off to work now. But if anyone knows what is wrong or even a lead, i would love to hear it.

Monday, December 6, 2010

3.1 -> 4.0 Xna First Errors

My First Errors... Most likely what you will also see.


So what should i attack first? The component link issues or the Pixelshader. I guess i should go with the component and unleash a real torrent of errors :) It is more fun that way. Fixing the Pixelshader will only solve one problem.
  • So i simply right clicked the references in the project and deleted the offending system.xinq.xml.
  • Microsoft.Xna.Framework could not be found.  So i did the same with that. Not sure what repurcussions this might have later.
So onto my Pixelshader issue. While looking around the web for help on this i found this most excellent Blog where someone has done what i am doing now. Check it out here. So the change was quite simple. I just had to change the pixelshader name (yeah the bloom was using PixelShader to PixelSdr and i also saw that it had updated the 1_1 to 2_0 shader version. So onto my next issue.

My next issue that appears is becaue i am using Avatars. And as such on the PC it draw a set of polys to show the bones of the Avatar. Great for making sure you can prototype you game on the Pc, but bad cos now i need to fix whatever is wrong. The offending error is....
'XNA Framework HiDef profile supports a maximum of 16 simultaneous vertex elements'. This has caused me to figure out the .FBX animation files for my avatars are not compatible with Xna 4.0. So here is a link to the new ones New Avatar Anims. Yet still i am having issues with the Faint.fbx. the very same error as before. Not sure what to do, maybe i will attack it tomorrow night, so far i am losing this battle. I could just remove Avatars for now and re-introduce them later, but i still need them. I will also have a look at the new Avatar sample program for Xna 4.0 from here. Oddly enough the Avatar sample does not have errors in the same Faint.fbx file, though it does have a lot of warnings as expected. not sure what the solution is at present.

That is all i can do for tonight. I know i am not the most expert at this kind of upgrade, but i am also sure not everyone is great at this.

Time commited so far... 1.5 hours

G'night

Xblig Xna First load up in VS 2010

So I load up my project and it wants to convert it. Should be easy and straight forward enough i am sure.

When it is finished i find what appears to be my first issue..

Missing Configuration Selector and Build Menu option.
Here how to fix that.
  •    Find some good way of getting it back, so i searched the web and found this page Help. Follow the next bullet points to do what is nescessary though.
  • In Tools/Options click 'show all settings' in the bottom left corner
  • In Tools/Options/Project Solutions/General click the 'Show advanced build configurations'
  •    Now this had me baffled cos it still did not work. Until...
  • In Tools/Settings select 'Expert Settings'
  •   As if by magic you now have your Build menu along with Config selector. YAY!
So that was my first foray. What will be next I wonder.

I have decided i might have to be more granular in the way i Blog this. so it can be more useful and also keep me Blogging the details. So after they are all done, i will do a post linking them in order.

Laters

Getting Xna 4.0

Should be simple enough Dotcha think ?

Just go to the downloads section of the App Hub and there ya go? Well not so simple.

Here is the link and what it says on App hub. Some more links that seem to confuse more than solve my issues. Really, why would you not at this point just give 2 clickable options? One for Phone 4.0 and one for windows/Xblig.
What ya get on App Hub

This is the link everyone will want that just wants the Game Studio 4.0 for developing for Xblig and Windows.
Xna Game Studio 4.0 download link

This next link is where you can find all the Visual studio express downloads. Much easier than trying to find an actual link on the app Hub.
Visual Studio Express Download Link

Oh, i installed the Visual Studio first (i found that instruction somewhere and felt it made sense.


Next post should be me attempting to solve some of the first problems that we encounter in the upgrade. I intend to Blog the whole procedure to make it faster and easier for the next person.

After my HD crash

Well it seems the Hard Drive crash wasn't too bad after all. Yeah, it made windows crash real badly when trying to start up. But i have managed to claim all my files off it. I will reformat it and use it as a second drive.

So it is not all bad. Only i am not feeling well at the moment, so fixing up my stuff is very hard. Also, i cannot find where the heck my Office disks are hiding. I even left them in the fancy plastic box as well.

So now it is time for bed. I hope to wake up bright as a bunny rabbit on a cold and frosty morn.

G'night all.

Sunday, December 5, 2010

Upgrading to 4.0 from 3.1 Xna

Ok, so call me stupid if ya want. But i went to the App hub and tried to quickly grab the Xna suite and C# Express for my new windows install. Now i figured this would be a really fast and simple thing to do. Only it didn't turn out that way. In fact i obtained the locations of these files to install them from searching the WWW with Google. WTF is that about, really.

What i got from the App Hub initially was a version of VS that is for the WM7 Phone. also the Xna suite that goes with it. This was causing me issues trying to get my windows version working. In fact i knew  i had an issue right away cos of the fact there were no active configurations. Still, i guess i missed something somewhere.

Why is it so hard for people not just MS to make  anice download page where items and basic instructions are laid out. Starting with what ya might be interested in and then drilling down to the real page. Now i know some people will think that it already exists, and don't get me wrong, there is something. A lot of talk and either no links or broken ones.

what a pile is my first thoughts on foraying into Xna 4.0 world.

Tomorrow i will attempt to upgrade my 3.1 application to 4.0. (i have located some useful looking links to help me out, i will put them in an update tomorrow if they do me any good).

g'night

Saturday, December 4, 2010

Windows 7 is now mine!

After my HD died yesterday i went and bought a replacement from Best Buy. A 500GB unit that should be fine for developing on. Then i spent 3.5 hours formatting and re-installing windows Xp on it. Only to realise as i went to bed late that it may not be my best course.

One of the reasons i have been not wanting to upgrade to Windows 7 is simply because of the time and work involved with doing the re0-install of all the applications i use. However i have now been forced to do just that. So after talking it over this morning with my friend, i went out and bought a windows 7 upgrade.

I have to say that the installation was amazingly simple and fast compared to the Xp version. It has been wonderful so far. Of course i hope it continues this way.

I now have my Blog bookmarked once more and am hoping to get back to developing soonish. Of course i probably have at least 2-3 more days of installing software ahead of me. Time will tell.

G'night

and one bonues is that Adobe Air works on this system now, so now i have Tweetdeck at home, Freakin Yeah!

Friday, December 3, 2010

My Desktop Broke

So although i wanted to get a video up of the Zombies. With my PC going down and me spending all night trying to resurrect it (with limited success). I guess i am not going to be doing anything productive for a while.

Currently the machine is stuck without noticing it's on board network card. So i need drivers, and so far have been unable to fix it.

Laters

Thursday, December 2, 2010

Zombies are first

Well a few people gave me feedback on which of my five enemy types i should do first, and in what order the others should follow on.

Now i have to say before i reveal the order that i had in mind to do the Zombies first. simply because they are the easiest to actually implement for 10 levels on two different maps. however i didn;t really want to do the cliched zombies first. It felt a bit like a cop out and that is all I might be judged on. Now several people have experessed the Zombies should be first, i am just going to go with it and know that the other enemies will add the gameplay depth that this game will hopefully allow people to enjoy.

So without further Ado, here is a simple single screenshot.


Yeah, it really doesn't do it justice huh! Here are a few notes for the above picture.
  • I (the player) am mostly hidden under the explosion in the upper middle, slighlty to the left.
  • Lots of gore on the floor from where i have been shooting Zombies
  • Those boomerangs are not boomerangs at all but are in fact Zombie arms. Each Zombie can throw two at you. Currently they throw them way too fast.
  • Are ya wonderign what the circles are? Well they are my zombies.
  • The circles with numbers in them are the animations of when my Zombies will claw it's way out of the ground. at that time they cannot be hit or touched.
  • Once above ground they will come hunt you down. I have supplied simple arrows to make sure they are doing the correct animation.
  • Of course my son is still there as a civilian, waiting to be rescued.
Once i get real animations this whole scene will come to life. I feel good that i can already imagine these suckers coming out of the ground and heading towards you in their ungainly shuffle. Though i also know that when those graphics go in, i will still be amazed at how great this will look.

Hmm, i keep talking about this in motion. Maybe i need to make a video of it, maybe tomorrow.

Laters