XNA Port

BlitzPlus Forums/BlitzPlus Programming/XNA Port

EricC(Posted 2009) [#1]
Hello, I'm in the process of building a game using Blitz Plus and now I would like it to work on XNA.

So, do I need to rewrite the whole thing in C#? I would really rather not do that, since the code base is already 9000+ lines long.

Or can I build a little wrapper in C# and call a compiled B+ executible? Would that run slowly? Would it even run?


Beaker(Posted 2009) [#2]
There is no point trying to mix B+ and XNA. Choose one or the other.


EricC(Posted 2009) [#3]
Actually, I'm trying to port it out so it works for XBOX Community Games. XNA is the only method to get a program to easily compile on an XBOX short of a Dev Kit.

Otherwise, I totally agree, B+ works in Windows already, so an XNA wrapper is redundant.

So, could I build a wrapper or has anybody tried that before?


Matty(Posted 2009) [#4]
I'm guessing you could wrap the functions in B+ so that there are similar commands in XNA? But no - you couldn't simply then pass the executable to XNA.
However I am totally willing to be corrected here as I'm speaking with minimal experience.


EricC(Posted 2009) [#5]
I've found some code working in C# that lets me do just that, I just don't know how to run it.

I'm calling the B+ .exe and trying to make it run, but it keeps crashing out on me when it loads up, before displaying anything. I think I may be on the right track, but I don't know enough about C# (which is so unlike Blitz as to be un-understandable). I was curious if anybody else has tried this before.


Robert Cummings(Posted 2009) [#6]
an idea would be to look at running it in a C++ scripting environment, at the very least porting to a script syntax might be easier. I have personally learned C++ to get over these hurdles, and I'm pretty sure you can learn it too.


EricC(Posted 2009) [#7]
I probably could, but at that point I could (although I am loathe to) rewrite the source code into another file. But since I'm looking at a deadline of the end of the summer and I don't really have the time to do as such.
So, how could I write a C# wrapper exactly? Basically, I'm curious if anybody has managed to do something like this and could give some insight (or some assistance).
If we (as a community) can find a reasonably quick way to port our Blitz programs to XNA, I can see that only being a net positive for us.