tags:

views:

64

answers:

1

We have to develop 5-10 individual 2D game modules using XNA. Is it possible to wrap these individual games as dlls and use it on one console(Exe)? If yes, How we can read the user input(using input devices like Keypad, Mouse, Joystick) from dlls?

Need an input from XNA experts. I am new to XNA technology.

Thanks in advance.

+1  A: 

I would say yes. .Net allows you to have one exe that references external dlls to load functionality. There are numerous libraries (MEF comes to mind) that builds on this fact to enable plugin architectures.

XNA games are primarily .Net assemblies. Therefore you should be able to make a "shell" exe that can be configured to load Game modules from selected external dlls.

What you should have in mind is how Content is handled. Since content files are stored separately from the binaries, so you will need a scheme for how content is "bundled" with your dll.

You should read up on the GameComponent mechanism, perhaps your game modules should be implemented as GameComponents.

Regarding input: you could handle input both in the shell or in the individual modules. Either way you need to define an interface between the two so that control can be delegated to the shell when needed, e.g. to navigate to some common Settings menu.

Peter Lillevold