Compiling FlaME under mono

Get some help with creating maps or modding.
Need a map editor or other tools, look here!
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Compiling FlaME under mono

Post by cybersphinx »

In case of... what? Why would you want to run a program as root (and possibly compromise your whole system) without even trying if it works as a normal user first?
User avatar
macuser
Regular
Regular
Posts: 1052
Joined: 19 Mar 2010, 23:35
Location: USA

Re: Compiling FlaME under mono

Post by macuser »

In case of other user's computers config being different. LOL on mac there is no root account. You have to sudo in to use root powers.
ArtRev Website

ImageImage

System: AMD Phenom II x4, 4GB RAM, 640GB HD, Nvidia GeForce GT 240 1GB, Mac OS X 10.6
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Compiling FlaME under mono

Post by cybersphinx »

My point was that you shouldn't need root powers, and it's bad practice to use them when you don't need them.
User avatar
Flail13
Code contributor
Code contributor
Posts: 263
Joined: 16 May 2008, 12:00

Re: Compiling FlaME under mono

Post by Flail13 »

macuser wrote:OH wow..... i wish i had gotten here sooner. LOL DONT COMPILE ON MONO. Compile on windows and run on mono. As long as we have the source for VB.NET 2008 and not 2010 it should work with these modified:

1. Change all "\" to "/" that refer to a path/filename
2. Include all libraries with the compiled binary
3. Any other errors resulting from more changes I will look at myself
4. I forget the rest...
By "Compile on windows", do that mean to use the "Microsoft .NET" option in MonoDevelop rather than "Mono 2.10.1"? I had used the Microsoft .NET option originally, and that's why I couldn't get NoQ's errors. Today I have it mostly working on Mono also.
The source is still VB 2010, but there's not much difference from 2008, so it's easy enough to copy & paste the needed parts of the generated form-designer code.
I think it's possible to detect the OS in VB, and make code to alter the path slashes. That way, less would have to be changed each time.
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA

Re: Compiling FlaME under mono

Post by Zarel »

macuser wrote:In case of other user's computers config being different. LOL on mac there is no root account. You have to sudo in to use root powers.
There's still a root account, it's just incredibly difficult to access. And sudo su still works.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Compiling FlaME under mono

Post by NoQ »

Today I have it mostly working on Mono also.
One Custard Pie? LET ME HAVE IT!
You do not have the required permissions to view the files attached to this post.
User avatar
Flail13
Code contributor
Code contributor
Posts: 263
Joined: 16 May 2008, 12:00

Re: Compiling FlaME under mono

Post by Flail13 »

That means you want the code? Mono Code - however it probably still has bugs and the slashes have not been changed at all.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Compiling FlaME under mono

Post by NoQ »

After auto-replacing slashes, it compiles-and-works on pure linux! :3
upd: Hey, it's sooo fast! I had around 2fps while scrolling through the map in virtualbox, but it's absolutely smooth when run natively :D
upd: Hmm, a little trouble with numpad keys; they're getting sticky; already looking into it.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Compiling FlaME under mono

Post by NoQ »

When i replace them with usual arrow keys, they work well: :|

Code: Select all

Input_Control_Create(NewControl)
keynum = Keys.Left
NewControl.DefaultKeys = New clsInputControl.clsKeyCombo(keynum)
Control_View_Left = newcontrol

Input_Control_Create(NewControl)
keynum = keys.Right
NewControl.DefaultKeys = New clsInputControl.clsKeyCombo(keynum)
Control_View_Right = newcontrol

Input_Control_Create(NewControl)
keynum = keys.Up
NewControl.DefaultKeys = New clsInputControl.clsKeyCombo(Keynum)
Control_View_Forward = newcontrol

Input_Control_Create(NewControl)
keynum = keys.Down
NewControl.DefaultKeys = New clsInputControl.clsKeyCombo(Keynum)
Control_View_Backward = newcontrol
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Compiling FlaME under mono

Post by NoQ »

It can't import .wz maps; says "game.map not found"; probably i replaced too many slashes, they are still "\" for archives (?)
User avatar
Flail13
Code contributor
Code contributor
Posts: 263
Joined: 16 May 2008, 12:00

Re: Compiling FlaME under mono

Post by Flail13 »

that's likely what the problem is. i can load .wz files. you might have noticed i used the splitpath structure to work with the zip directories, so you'll possibly have to make a new structure with slashes pointing the other way if you want to fix it.
Last edited by Flail13 on 05 Apr 2011, 10:31, edited 1 time in total.
User avatar
Flail13
Code contributor
Code contributor
Posts: 263
Joined: 16 May 2008, 12:00

Re: Compiling FlaME under mono

Post by Flail13 »

im not so sure now - you might just need to change the part of the splitpath structure's sub New, where it replaces one type of slash with the other. if you auto-replaced, it would be changing / to /, so you need to make it go \ to /, where it was originally / to \.

edit: but you might still need to change them back for the writing of the .wz file
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Compiling FlaME under mono

Post by NoQ »

Yes, fixing just this line in modProgram.vb allows loading .wz files:

Code: Select all

            tmpPath = tmpPath.Replace("\"c, "/"c)
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Compiling FlaME under mono

Post by NoQ »

Compiling maps works without any extra efforts. Even though they look differently from inside, warzone has no troubles loading them (and the archive even seems to be more correct with "/"'s; i believe you can/should use them for making archives on windows as well)
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Compiling FlaME under mono

Post by NoQ »

Now i'm having minor troubles with water transition tiles:
(do we really need to have them transparent?)
You do not have the required permissions to view the files attached to this post.