Oaf300092

Hi,

In the XNA Faq, when it talks about giving a project to other people to deploy on their 360's, it says you must give them all the assets and source code, so that they can build the program and squirt it onto their 360.

My question is: will it work if you give them a project with the C# source files removed ie they have the assets (either as source graphics and sounds, or the built files) and the .obj's, just not the C# source.

What happens if the project is dependant on an external DLL Will I need to ship a project that builds this, too Again, can I get away with excluding the C# source

Many thanks,

Mark


Re: XNA Game Studio Express Deploying to 360

Jim Perry

No, you must currently supply the source as the project must be opened in Game Studio Express and compiled and deployed. Think of it this way - if you removed all the source code to your game could you open it up

MS is working on a way around this, but it's probably going to take a little time.






Re: XNA Game Studio Express Deploying to 360

Oaf

I just wondered if you could make a project that contained only obj's, or perhaps made the obj's more recent than the C# source, so you could substitute the actual source for empty files...

I've not looked into how GSE builds things, how its dependencies work etc; just trying to find a way of shipping 360 demos without giving the source away :)




Re: XNA Game Studio Express Deploying to 360

Jim Perry

Until MS makes binary distribution on the 360 possible you have to supply the source. If it's that big a deal, just do Windows versions until then.




Re: XNA Game Studio Express Deploying to 360

Oaf

OK, many thanks Jim =)




Re: XNA Game Studio Express Deploying to 360

Stephen Styrchak - MSFT

If you really want to share an Xbox 360 game without sharing the source, you can do it pretty easily. Just build your game into a DLL instead of an EXE (Game Library project). Then share a project with the source for the program entrypoint (main) that references your compiled assembly.

Basically, the project you have to share is the default Xbox 360 Game project with the Game1.cs file removed. The Game1 class should be defined in a separate DLL, which you can build from an Xbox 360 Game Library project. That way, the code in Program.cs will instantiate and invoke your game, which is implemented in another assembly.

You can develop the game using a multi-project solution and a project-to-project reference. But when it comes time to share it, just create a new Xbox 360 Game project and reference the already-compiled Game Library that holds all your game logic. Share that project (which is just a stub and contains no game logic), your compiled game assembly, and all the compiled assets.

This way, anyone with XNA Game Studio Express can use your shared project to build and deploy your game, without actually having the source for your game.

Although many people will encourage you to share your source as well, there are ways to show off your games and your creativity without giving everything away if you really, really don't want to.

Simpler methods are on the way. Just be patient.

--Stephen





Re: XNA Game Studio Express Deploying to 360

Jim Perry

Stephen Styrchak - MSFT wrote:
If you really want to share an Xbox 360 game without sharing the source, you can do it pretty easily.

I guess some peoples' definition of "pretty easily" differ.






Re: XNA Game Studio Express Deploying to 360

Oaf

Hey, I've been developing mobile phone games for the last 5 years - believe me, Stephen's solution is a doddle! :D




Re: XNA Game Studio Express Deploying to 360

Ultrahead

Stephen, I guess that could/should be complemented with obfuscation. One question: does standard obfuscation work on the 360 or needs an "special" obfuscator

Just forgive my ignorance since I never targeted any assembly for a console before and I don't have a 360 yet to test/confirm it, so please you guys don't hit me ...






Re: XNA Game Studio Express Deploying to 360

Stephen Styrchak - MSFT

Whether you want to obfuscate or not is completely up to your own discretion. It seems like a lot of people share the false impression that being able to decompile/disassemble binaries is a new thing that is possible with managed assemblies. It is not. It is just as easy to run a decompiler/disassembler on native binaries, and that technology has been around for decades.

That being said, yes, it will certainly work for assemblies compiled for the Xbox 360. Obfuscation is a post-compilation step that takes an assembly as input, and generates a new (obfuscated) assembly as output. The obfuscated assembly is functionally equivalent, but the instructions and functions have been rearranged in a way that makes it harder for humans to understand.

An obfuscated assembly is no different than an unobfuscated assembly in that it makes no difference to the JIT compiler and runtime if an assembly is obfuscated or not (which is why it will work on the Xbox 360). Similarly, assemblies for the 360 are not special assemblies; they are produced by the same C# compiler as the Windows assemblies -- so no special obfuscator is required to use on them.

Note that obfuscation just makes it harder to read disassembled assemblies, not impossible to read. With a more sophisticated disassembler, I believe you could effectively undo most of the obfuscation. You'll have to check with your obfuscation tool vendor to understand just how "secret" they can make your code. From my understanding of obfuscation, the efficacity also depends on the complexity of the software you are trying to obfuscate. That is, an algorithm in a single function will probably remain almost completely unchanged. However, an algorithm that requires dozens or more functions would be very well hidden. The trick is in hiding what functions are being called an what data is being passed around. The instructions doing the work (loops, branches, etc) are otherwise the same.

--Stephen





Re: XNA Game Studio Express Deploying to 360

Ultrahead

"That being said, yes, it will certainly work for assemblies compiled for the Xbox 360."

Ok, and thanks for the whole explanation ...