Convert to C# and WPF?

We are always looking for new tools to create to help facilitate the table top gaming experience. Let us know if you have an idea for a new gaming tool you'd like to see. (Note: this is NOT for feature requests on existing tools!)

Moderators: dorpond, trevor, Azhrei

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Convert to C# and WPF?

Post by Azhrei »

loogie wrote:If I was to make a suggestion for a conversion of Maptools... I would have to say try to create it using Adobe's FLEX... Its a really great app, open source, works on all browsers for all OS (that support flash.. oh wait thats all of em)... and has some crazy features... Basically anything flash can do FLEX can as well.. including creating buttons and such...
Unless something has changed while I wasn't looking, Flex is a language for writing Flash-based applications and Flash is most definitely *not* a cross-platform technology. And being that Flash is controlled by Adobe and is not open source, there are no options for making Flash available on systems that do not currently support it other than begging Adobe to do the port. (Notwithstanding the option of Gnash, which is the GNU implementation of Flash, but I have no data on exactly how compatible it is with Flash.)
if you look up the VTT program Scenegrinder it can do everything that does, and probably better, since its not relying on HTML5 and java, which isn't designed for graphical animation and such as much as FLEX is... also with built in options like dropshadows, blurs, bevels, etc that can be rendered on the fly... it is a very promising candidate...
Um, I wouldn't recommend Flash over HTML for those reasons. Have you see the HTML5 demos? The advantages of HTML5 over Flash are myriad, including adoption as an Internet standard -- which should be all that's needed! As a W3C recommendation and standard (still on-going of course), every browser will be targeting HTML5 in the future (including mobile devices) while a proprietary tool such as Flash is likely to die a slow, lonely death.

There are other reasons for choosing a cross-platform development tool: installed base, longevity, robustness, support, knowledge base, and so forth. All of those reasons point towards Java, and then perhaps C# (except it's not cross-platform so doesn't really qualify in this discussion). Compiled languages can be considered as well (C++ w/ Qt or GTK+?) but puts more burden on the developers as applications must be compiled and installers created for each targeted platform. Pushing the implementation to an application platform on the client (such as Flash or HTML5) is ideal IFF client support for the toolkit is close to universal.

IMO. 8)

Craig
Great Wyrm
Posts: 2107
Joined: Sun Jun 22, 2008 7:53 pm
Location: Melbourne, Australia

Re: Convert to C# and WPF?

Post by Craig »

loogie wrote:If I was to make a suggestion for a conversion of Maptools... I would have to say try to create it using Adobe's FLEX... Its a really great app, open source, works on all browsers for all OS (that support flash.. oh wait thats all of em)... and has some crazy features... Basically anything flash can do FLEX can as well.. including creating buttons and such...

if you look up the VTT program Scenegrinder it can do everything that does, and probably better, since its not relying on HTML5 and java, which isn't designed for graphical animation and such as much as FLEX is... also with built in options like dropshadows, blurs, bevels, etc that can be rendered on the fly... it is a very promising candidate...
Its not like any of these things can't be done in java, a few are possibly a little easier in flash, but then again if you really want options you can access the graphics video card using openGL using LWGL or JOGL etc in Java. The real problem with flash is its REALLY a poor choice
if you are not running on windows. Adobe's Linux implementation is kinda meh, and the Apple one
is nothing short of horrible, basically anything worthwhile always runs at 100% CPU.

User avatar
loogie
Dragon
Posts: 267
Joined: Wed Sep 05, 2007 4:53 pm
Contact:

Re: Convert to C# and WPF?

Post by loogie »

the reason i will never try to attempt anything in HTML5 (which java would need to be partly) is cause they refuse to come up with any sort of standards on for browsers.. i'm not talking language standards.. i'm talking how it works... MS, Netscape, Etc get together to decide what tags do what, then its up to each of them to make it work.. and they all do it differently, and make our lives a nightmare... in that case i'm fine with using a proprietary software when it makes things so easy. I've been using it now for work for a couple of months.. and it keeps surprizing me every day.. the simple speed in which it will dynamically bevel everything on the page, movement, animation, and just code use... its a great tool (for me anyways)... so sorry if you don't agree.. but if i try this, that is what i'm using.

FLEX is open source.. so its halfway there :P i know i know.. flash, which is required for FLEX is proprietary... oh well :P

User avatar
loogie
Dragon
Posts: 267
Joined: Wed Sep 05, 2007 4:53 pm
Contact:

Re: Convert to C# and WPF?

Post by loogie »

I know HTML5 is going to be the new standard, and all platforms will try to use it... but the problem is they all use it however they want to... which is what drives me crazy... i have not been able to do anything but very basic web design even tho i know and understand HTML code, CSS, and in some part javascript and php... its just after you do it the first time, you then have to figure out what the hell is wrong with it for every other browser under the sun. because none of them work the same... to me that is not a universal language...

I would LOVE to be able to learn HTML and have it work... but until I see it with my own eyes... its not for me.

(in fact i would love to be able to switch to linux, and be able to work, live, and play that way... but it doesn't work either)

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Convert to C# and WPF?

Post by Azhrei »

loogie wrote:I know HTML5 is going to be the new standard, and all platforms will try to use it... but the problem is they all use it however they want to... which is what drives me crazy...
I agree. It would be nice if all of the vendors would choose a single rendering/parsing library and then keep it up to date. The good news is that Apple's webkit has become the base for a number of browser implementations, as has the gecko engine, so we're moving in that direction already. If MS would get on board things would be much better. But alas, they don't care about their users very much.
because none of them work the same...
But you'll have the same problem with Flash. Not all platforms have the same version. There isn't anything even close to being usable on mobile platforms, for example. Some day there will be a working/usable Flash for Android, but I'm not holding my breath.
(in fact i would love to be able to switch to linux, and be able to work, live, and play that way... but it doesn't work either)
Well, this is as much a matter of conviction than anything else. One needs to make a decision to switch and live by that decision and not waffle back and forth. There are things that Linux can do that Windows can't, and vice versa. Regardless of which platform you're on, there will always be greener grass on the other side. For me, I prefer an OS in which incremental changes are released to the public to allow them to test and integrate little pieces at a time. Which is why we have little builds of MapTool instead of going from 1.3 to 1.4 with no steps in between: users get to previous and comment on features in a highly interactive manner. Now just imagine that your OS provider did the same thing!

Oh well. I wish you luck on your Flash project, and it'll be cool to see a Flash client talking to an MT server some day... :)

User avatar
loogie
Dragon
Posts: 267
Joined: Wed Sep 05, 2007 4:53 pm
Contact:

Re: Convert to C# and WPF?

Post by loogie »

Working with FLEX at work has made me realize exactly how these things work.. I can't speak of mac hardware, but FLEX seems to work great with linux, android, and pc, not using Flash (well sort of) but using Adobe Air... basically a desktop version of their flash engine. Gives more control for a desktop system (direct access to databases, local files, etc) and allows touch support, sockets, and other features for use with mobile apps and other things.

We're not talking using Air on your mobile, it (at least in the android sense) converts the air program into a linux program, it just writes the programming for you. You end up with a native APK to install on your phone, which means you can actually take anything you make for FLEX, and make it work for your android, iphone, blackberry, etc with very minimal changes. (i'm not sure if the iphone, or blackberry works as well as the android ports... but from what i've read they seem to work quite well.

i think in that sense it is a very good candidate for a project like this... since you end up with a product that can be used in a web setting, desktop, and mobile without changing the code.

as for playing around, i've been plagued with issues, a graphics card explosion, increased deadlines, and just lack of time...

as we speak i'm putting everything back together, and should be up and running for some serious play time soon!

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Convert to C# and WPF?

Post by Azhrei »

loogie wrote:i think in that sense it is a very good candidate for a project like this... since you end up with a product that can be used in a web setting, desktop, and mobile without changing the code.
I wasn't trying to discourage anyone from making the attempt, but I thought it would be wise to understand the issues prior to beginning the project.

By all means, go for it! The more devices that the RPTools apps can run on, the better!

The_Grand_User
Kobold
Posts: 14
Joined: Tue Nov 18, 2008 6:22 pm

Re: Convert to C# and WPF?

Post by The_Grand_User »

I think I'll take a stab at converting MapTool to C# and WPF. Who knows, I might even finish and it might even work! :P I'll be sure to put it up somewhere if so, sticking as close as possible to the original version as possible, though likely to make a diverging branch after that.

Any advice and/or comments from the RPTools team?

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: Convert to C# and WPF?

Post by jfrazierjr »

The_Grand_User wrote:Any advice and/or comments from the RPTools team?
Use Mono... that way, you can pretty much guarantee platform neutrality. I "believe" MT uses the Hessian protocol for data transfer(I don't do network stuff) which is also cross language (.net in particular) and XStream for serialization(which I don't think is cross language, but .Net should have a means to serialize in a non language bound way I would hope).

The big annoying thing then will be the parsing and functions...
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

The_Grand_User
Kobold
Posts: 14
Joined: Tue Nov 18, 2008 6:22 pm

Re: Convert to C# and WPF?

Post by The_Grand_User »

Ah, I'm actually going to be sticking with MS .Net, though it shoudl be easier for someone else to move it to Mono if they want. I figure the original Java MT should suffice for the cross platform stuff, and I want to be able to take advantage of the full .Net libraries. Plus I'm actually one of those people who actually likes MS stuff :P :)

*Checks on the Hessian protocol and XStream* Yep, looks like those are both available for .Net; the XStream one is even on NuGet, nice.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Convert to C# and WPF?

Post by Azhrei »

The_Grand_User wrote:I think I'll take a stab at converting MapTool to C# and WPF. Who knows, I might even finish and it might even work! :P
I would like to wish you "good luck" but my personal preference would be to stick with a multi-platform language (Python would be another good choice). Otherwise users are tied into a single computing platform and we have enough of that already.

But as I said, that's just my personal preference and people are welcome to do what they want. :)

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: Convert to C# and WPF?

Post by jfrazierjr »

The_Grand_User wrote:Ah, I'm actually going to be sticking with MS .Net, though it shoudl be easier for someone else to move it to Mono if they want. I figure the original Java MT should suffice for the cross platform stuff, and I want to be able to take advantage of the full .Net libraries. Plus I'm actually one of those people who actually likes MS stuff :P :)

*Checks on the Hessian protocol and XStream* Yep, looks like those are both available for .Net; the XStream one is even on NuGet, nice.
Well.. you are of course free to do whatever you want... but I would pretty much beg you to stick with .Net components that can be run under mono. That's really about 95% of the stuff MS provides, see here. It's really NOT that hard to keep from using .Net features which won't work in Mono. Just stay away from a small list of classes, don't use P/Invokes, and a few other small things.

Personally, I would absolutely LOVE to see a Silver/Moonlight client app capable of talking to a standard MapTool backend server.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

The_Grand_User
Kobold
Posts: 14
Joined: Tue Nov 18, 2008 6:22 pm

Re: Convert to C# and WPF?

Post by The_Grand_User »

I can probably stay away from p/invokes, and I'll likely refactor the business logic and UI into seperate projects, so the UI could be swapped out for a different one, but beyond that, no promises. For now, I'll be using WPF, though I might try the Silverlight 5 RC.
Azhrei wrote:I would like to wish you "good luck" but my personal preference would be to stick with a multi-platform language (Python would be another good choice). Otherwise users are tied into a single computing platform and we have enough of that already.

But as I said, that's just my personal preference and people are welcome to do what they want. :)
Hehe, and my personal preference is to stick with one platform (Windows in this case) and take advantage of all its features :)

Thanks for making a great app, and allowing it to be a springboard for others :D

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Convert to C# and WPF?

Post by Azhrei »

The_Grand_User wrote:Hehe, and my personal preference is to stick with one platform (Windows in this case) and take advantage of all its features :)
Yep, I admit MS has some great development tools. It's one of the areas where they actually do a good job.

Well, when you get deep enough into programming you'll learn that "not all the world's a Vax". ;)

Let us know how it progresses!

The_Grand_User
Kobold
Posts: 14
Joined: Tue Nov 18, 2008 6:22 pm

Re: Convert to C# and WPF?

Post by The_Grand_User »

So far just going through each of the class files and making one in C# and filling it with the (commented out) java code. Once that's all in, I'll get the field/property and method declarations all set, then start going through each method once everything is defined. It'll take a long time to be sure, but should be fun, as well as a good learning experience.

Post Reply

Return to “Ideas for New Applications”