# First XNA steps using shaped sprites....



## MrSeanKon (Feb 5, 2009)

The total XNA source code is the Jack.zip file.
The photo explains my problem:







Kreij I have lost my temper  with Microsoft.
Back to Borland??? 
Moreover let me ask you here...
Can I add controls like menus, buttons, labels using XNA???
These are System.Windows.Forms controls...
I cannot add them automatically by clicking the chosen control on Toolbox (on the left of Visual Studio)....
XNA seems to me like MFC where can I manage game's properties like colors, size, transparency etc automatically??


----------



## Deleted member 3 (Feb 5, 2009)

http://social.msdn.microsoft.com/fo.../thread/11df869e-f4b5-4cba-a7be-61925ad2da56/ this seems to answer your question.

I'm installing XNA on my work PC now as well, have nothing better to do anyway


----------



## MrSeanKon (Feb 5, 2009)

DanTheBanjoman are you an expert programmer?
Thanks for the link. But a XNA game requires more installed files instead of Micro$$$oft Framework?? I don't mean for me but for the guys who run my cardgames.


----------



## Deleted member 3 (Feb 5, 2009)

I am far from an expert. Never done anything with grapics actually. I use vb.net to automate things at work. Deploy software, administration etc. 
I don't think XNA requires anything special for users. It's something you can easily test though > other (virtual) machine.


----------



## Deleted member 3 (Feb 5, 2009)

By using 255,0,255 as background on your sprite, xna seems to make it transparent. I drew a guy in paint and made it transparent that way.


----------



## FordGT90Concept (Feb 5, 2009)

Yeah, the transparency color has to match the color you want made transparent in the images.  I would recommend using blue (0000FF) or green (00FF00).


----------



## Deleted member 3 (Feb 5, 2009)

Teh awesomest game ever, wrote it today. C# is a piece of shit, it annoyed me ++.

And it doesn't work on my computer here, yay.


----------



## FordGT90Concept (Feb 5, 2009)

Yup, it crashes on start.  You gots some debugging to do.


----------



## Deleted member 3 (Feb 5, 2009)

FordGT90Concept said:


> Yup, it crashes on start.  You gots some debugging to do.



It worked on the machine I made it on. So there probably is some dependency. I guess that answers SeanKons second post


----------



## FordGT90Concept (Feb 5, 2009)

I have Visual Studio 2008 Team System w/ XNA installed.  If there was a dependancy, I would definitely have it.  Also, if it were missing a DLL, it would give a different message than just a plain old crash.  My suspicion is that it is trying to do something on load that it isn't suppoed to (like read a non-existant file).


----------



## Deleted member 3 (Feb 5, 2009)

FordGT90Concept said:


> I have Visual Studio 2008 Team System w/ XNA installed.  If there was a dependancy, I would definitely have it.  Also, if it were missing a DLL, it would give a different message than just a plain old crash.  My suspicion is that it is trying to do something on load that it isn't suppoed to (like read a non-existant file).



Negative, I've had previous issues with the same useless crashes when a DLL is missing. I'll VPN to the office and get my files


----------



## FordGT90Concept (Feb 5, 2009)

I just checked and you're right although the binary I checked was compiled for Release and has no PDB files associated with it (the error was caught in kernel.dll).  Maybe compiling for Debug gives more thorough messages as to which DLL is missing.


----------



## Kreij (Feb 7, 2009)

I get a ContentLoadException when debugging Dan's app. 
It can't find the file "background.xnb" (Content Pipeline Binary File). 
Is the "Build Action" = "Compile" for the background image in your Content directory?
It looks like it can find the file on the system you created it on, but is not compiling it into binary form for the pipeline in the executable.

(Nice call FordGT  )


----------



## Kreij (Feb 7, 2009)

@MSK, you cannot add controls for your XNA app from the toolbox. The reason for this is that there is no "design" page in the IDE becuase you are using the content pipeline to write directly into the GC's backbuffer which is what gets painted on your screen in your game window (or full screen).

There are no built in UI components in XNA, but you do have a few options;

1) Most game engines have UI elements in them, so you could hunt one down.
2) If you are looking for Windows only editor type functionality then consider using XNA in a Windows form and using standard Windows GUI.
3) If you don't need input, you can use make due with some textures, fontsprites and a little code to display scores or whatever.
4) (My favorite ) Create your own custom control classes for you XNA app.

I am not sure what you mean by managing game properties "automatically", but you certainly can manage the properties of everything in your code.


----------



## MrSeanKon (Feb 13, 2009)

Kreij can you clarify something???
Cos I have lost my temper  
Can I write my cardgames from beggining under XNA????
You received a code and as you see the problem is animation.
I used pictureboxes to do them but they animated using f_cking threads which crash sometimes.
1) You realize that the textures need an event which "understands" mouse click to start animation.
2) The game must save/read the scores or other settings in files.
3) I must add comboboxes, menus....

Damn what can I do???? (instead of deleting the source code)


----------



## Deleted member 3 (Feb 13, 2009)

http://dan.h0sted.org/Archive.rar

Fixed it, requires the content dir indeed. Seems it works different than resources I previously used. pos 

Oh, those images are copyrighted by me, don't reuse. Took me a lot of work to create and such.


----------



## MrSeanKon (Feb 13, 2009)

Thank Dan you may delete the URL now to protect your photos from others.
Check my pm also....


----------

