XNA Creators Club Online
Page 1 of 1 (8 items)
Sort Posts: Previous Next

XNA with IronPython, C# and/or WPF/Silverlight - thoughts / advice appreciated...

Last post 3/13/2008 4:51 PM by Colshy. 7 replies.
  • 3/13/2008 12:24 PM

    XNA with IronPython, C# and/or WPF/Silverlight - thoughts / advice appreciated...

    Hi,

    I am about to embark on my first gaming project. I trawled the net initially looking at various languages to use and how to go about it. I eventually concluded that I wanted to use XNA with .NET. However having a lot of experience in programming (Unix and Windows) and web development (PHP, C#.NET) I realise planning and deciding upon the technologies before you start can save a lot of pain!

    Not wanting to start, and having read many, 'My langauge is better than yours!', 'My dad could beat up your dad' type of arguements about what languages to use I wanted to get some thoughts on my project and how what people's thoughts/experiences are with the methods I am looking at. I guess there is a lot of personal preference in this but is also heavily dependant on what you want to do.

    I aim to make a MMORPG which has two distinct parts to it. First is a map of territory and second is the actual game engine which will be a 2d turn based system. The idea is users can (possibly via a web page) view their territory and then challenge other players around them. At this point the 2d engine would kick off and play. Once the game was over they would return to the map with the updated results (then do leveling,equiping and usual rpg stuff etc).

    So essentially the map side could be done as a web page using c#, XAML, silverlight etc or it could be as part of the game (or both!). I would probably use XML or sql server to store player/world data here also.

    The 2d engine I would envisage being done with XNA using either c# or IronPython and would be a more traditional XNA thing I guess.

    For me I would love to be able to use XAML/WPF as the interface to the game (within the 2d engine) also as it is a nice way of working and means I could display the map (also done in XAML) via a web page or within the game. However I read integrating XNA and XAML, silverlight/WPF etc is not easy and has issues.

    Also do you think using Ironpython would be better than c#? I realise using IronPython means it probably won't work on xbox anytime soon but I am not so bothered about that for now. I know c# already so that is an advantage to me but I would like to learn python anyways. However IronPython seems easy to integrate with XAML etc.

    Essentially I am asking can I take advantage of new methods such as WPF , silverlight, XAML in my game, also can you invoke a game engine from the web and run outside the web page, or would I have to do the whole thing in a web page or outside it. Or can you write a game that uses web pages to show off information from within the engine. If so what are your thoughts on the best way to go about this?

    Any advice is greatly appreciated!! :)

    Thanks
    Colin

  • 3/13/2008 1:34 PM In reply to

    Re: XNA with IronPython, C# and/or WPF/Silverlight - thoughts / advice appreciated...

    Answer
    Reply Quote
    Colshy:

    I am about to embark on my first gaming project.

    ...

    I aim to make a MMORPG which has two distinct parts to it.

    Your first game project should never EVER be an MMORPG. Unless you are God of programming the odds of anyone finishing an MMORPG as their first game project is about equal to me being able to fly to Pluto. I'm not trying to be mean to you (heck about 40% of beginners want to make an MMORPG on the first project), but the harsh reality is you need to scale back a bit on your ambition otherwise you are just setting yourself up for failure.

    Also do you think using Ironpython would be better than c#?

    Not if you want to use XNA. Using any language besides C# is a pain in the butt to get going.

    I know c# already so that is an advantage to me but I would like to learn python anyways.

    Well if you know C#, I'd just stick with it for the XNA part of your project.

    However IronPython seems easy to integrate with XAML etc.

    So is C#. That's how all of WPF works. XAML for the markup and C# behind it. Going with an unsupported (for XNA anyway) language is just asking to overly complicate your first project by trying to learn integration between many technologies and languages that aren't all made to work together.

    Essentially I am asking can I take advantage of new methods such as WPF , silverlight, XAML in my game,

    Inside of XNA? Well you can't use Silverlight or WPF in there, but XAML is just markup so you can interpret that however you want. There isn't built-in support but you could write the parser for it you could.

    also can you invoke a game engine from the web and run outside the web page, or would I have to do the whole thing in a web page or outside it.

    You would have to run the game engine from the desktop and have your server side parts run in the browser. You could make them both write data to the same database so that they share, but now you have to write a third part (web service) to facilitate that.

    Or can you write a game that uses web pages to show off information from within the engine.

    If you wanted to write an HTML parser for XNA, then sure. But currently there is no easy way to just pop open a website in XNA.

    In summary, don't try to make this game now. You will just get frustrated at the sheer difficulty of it and quit trying to make games. Start with C# and XNA and learn to make some simple games. Maybe eventually toss in a webservice to write out some data about your game to a database and have a simple webpage just dump that database to the screen. Again, I'm not being mean or saying your idea is dumb (it's actually pretty cool), I'm simply saying if you try to make this on the first go you will get frustrated and you will most likely fail. Work your way up to it over time.

  • 3/13/2008 3:19 PM In reply to

    Re: XNA with IronPython, C# and/or WPF/Silverlight - thoughts / advice appreciated...

    Bah I wrote a big reply and for some reason my page moved and it got wiped!

    Anyway in summary, I really appreciate your reply and it is a massive help and answered many of my questions. I do sound naive to suggest a MMORPG as my starting game. Its a bit like saying I think my first (or any) game will make me rich and famous!

    The way I see it is I can develop the 2nd game engine part slowly and independantly of the web/map part. Basically do it as an simple offline game and add networking etc later on. If I am honest I will be well chuffed if I even achieve this first part! I already have the system well defined in terms of the rpg rules as it is based upon an existing well known system. As for the web side I expect that to be the easy part (in theory!) as I develop scientific web tools/web services as part of my job in c#. I really really like the idea of using web services as this is something I already know well and is a nice way of doing it.

    As for XAML part, I had read the post: http://forums.xna.com/thread/6451.aspx  and saw someone mention about designing a gui in xaml, then wrapping it in a windows form which could then be used with XNA. Do you think this can be done or would it be painful?

    Anyway back to my tutorials for now :)

    You mentioned frustration... you aren't a real programmer if you don't spend at least 50% of your time frustrated :)

    Learning a language = frustrating

    Being able to turn what you have learnt into the program/website/game you envisioned = very very frustrating

    Having the drive and time to finish your over ambitious project = nigh on impossible ;)

     

  • 3/13/2008 3:29 PM In reply to

    Re: XNA with IronPython, C# and/or WPF/Silverlight - thoughts / advice appreciated...

    Glad to hear my advice was well received. Hopefully you do well on the project.
  • 3/13/2008 3:30 PM In reply to

    Re: XNA with IronPython, C# and/or WPF/Silverlight - thoughts / advice appreciated...

    Sure was and none of it came across as mean :)
  • 3/13/2008 3:40 PM In reply to

    Re: XNA with IronPython, C# and/or WPF/Silverlight - thoughts / advice appreciated...

    Colshy:
    Sure was and none of it came across as mean :)


    That's good. Sometimes you tell a new forum member that they shouldn't start with an MMO and they start acting like you ran over their dog. The fact that you didn't react this way already moves you up in the probability to finish your project. Maybe I should make a page to calculate the odds of someone finishing an MMORPG... ::runs off to Visual Studio::
  • 3/13/2008 4:13 PM In reply to

    Re: XNA with IronPython, C# and/or WPF/Silverlight - thoughts / advice appreciated...

    Answer
    Reply Quote

    Howdy,

    XNA and Beyond

    This is a good example for those interested into mixing WPF/Silverlight and XNA it is by all means a hack... but its really not that hard to get going and have somthing useable. as well when Silverlight 2.0 is released and Visual Studio 2008 support is added it will make things a heck of a lot simpler.

    As well normaly I am all for use whatever language you like it .Net who cares they all work together.... but in this case 99% of samples are in C# so having to convert your sample to a diferent language then trying to learn what it dose is never a good idea...

    Take Care,
    Near

  • 3/13/2008 4:51 PM In reply to

    Re: XNA with IronPython, C# and/or WPF/Silverlight - thoughts / advice appreciated...

    From a quick skim that looks like a nice article. I had a vague suspicion you could at least dump the references in to VS2008 but did not have the knowledge or skills (by a long way) to risk delving in yet :) But what you write about is really interesting and could really help me in my project. I really like the idea of trying to design the interface in WPF and then using it to control my XNA game...

    Thanks :)

     

Page 1 of 1 (8 items) Previous Next