Prince Of Persia.net written in C#

Threads about other remakes and ports.
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Prince Of Persia.net written in C#

Post by salvadorc17 »

I have been playing around with this and what only i get is a really slow framerate game running, less than a 5 fps. What to do to fix it???

Image
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5746
Joined: April 9th, 2009, 10:58 pm

Re: Prince Of Persia.net written in C#

Post by Norbert »

I decided to give this another try on my Linux computer, using Wine.

I started with "Download Microsoft Framework 4.0", mentioned on your download page.
It started installing but then stopped while downloading RGB9RAST_x64.msi, so that didn't work.

So I tried installing dotnet40 with winetricks, but it said: "This package does not work on a 64-bit installation"
I then tried installing dotnet35 with winetricks, but it also says: "Error: Cannot install on 64-bit operating system This product is not supported on a 64-bit operating system. Setup will now exit."

Unfortunately, I still can't get it to work. Maybe it's now even more tricky to get it to work, since I'm now using a 64-bit system... :|
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Prince Of Persia.net written in C#

Post by salvadorc17 »

This has no monogame version?? you should download it and use for linux...
David
The Prince of Persia
The Prince of Persia
Posts: 2850
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Prince Of Persia.net written in C#

Post by David »

I found something about Winetricks and 64 bit:
https://code.google.com/p/winetricks/wiki/SummerOfCode
Winetricks currently only supports 32 bits. An older release had partial support for 64 bits; let's bring that back and add some 64 bit apps, too.
I'm not sure what does the 64 bit refer to, though: 64-bit Linux, or 64-bit Windows programs?
It started installing but then stopped while downloading RGB9RAST_x64.msi, so that didn't work.
Was that the web installer? If it was, you could try the standalone installer:
http://www.microsoft.com/en-us/download ... x?id=17718

A few days ago, I tried to install the game on Windows XP.
But I get a System.DllNotFoundException in SharpDX.Direct3D11.D3D11.D3D11CreateDevice_
Does this mean that the game needs Direct3D11?
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5746
Joined: April 9th, 2009, 10:58 pm

Re: Prince Of Persia.net written in C#

Post by Norbert »

David wrote:Was that the web installer? If it was, you could try the standalone installer:
http://www.microsoft.com/en-us/download ... x?id=17718
It was the Web Installer, yes. I also tried the Standalone Installer just now and it also fails: "Setup has detected that this computer does not meet the requirements to complete this operation. The following blocking issues must be resolved before you can proceed. Blocking Issues: The .NET Framework 4 is not supported on this operating system. For more information, see the Readme file."

Anyways, after talking with some folks on IRC I realized this is the wrong route to take under Linux.
As salvadorc17 sort of wrote, I should be using Mono (apt-get install mono-complete) to run the program instead, without Wine.
This means I need the program without the setup stuff, because the setup does a .NET check and targets Windows platforms.
polipo, can you provide a download link for just the program, without the ClickOnce or classic MSI setup?
David
The Prince of Persia
The Prince of Persia
Posts: 2850
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Prince Of Persia.net written in C#

Post by David »

I tried to compress the installed game into a ZIP or 7Z, but they are very big: the ZIP is 40 MB, the 7Z is 28 MB.
The forum doesn't accept such big files.
(Does this game have to be so big?)
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Prince Of Persia.net written in C#

Post by salvadorc17 »

I think youre ommiting what im say, you should use the source version and compile it with monodeveloptmen...

https://princeofpersia.codeplex.com/
David
The Prince of Persia
The Prince of Persia
Posts: 2850
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Prince Of Persia.net written in C#

Post by David »

I tried to compile the game under Linux... Not the best way to spend an afternoon, and I didn't even succeed... But I got very close.
Sorry for the long post, but I want to show what I did.

* Download the sources of the game:
http://princeofpersia.codeplex.com/SourceControl/latest
Click the "download" link in the menu. Save the ZIP and extract it.

* Install MonoDevelop and MonoGame:
https://github.com/mono/MonoGame/wiki/T ... d-packages
As the tutorial says, they can be installed from the package manager.
If they are not in the list, add a custom repository. Instructions can be found here: http://badgerports.org/
Note that the "default" package manager didn't see the monogame packages, so, as they write, Synaptic is needed.
You need the "monodevelop" package and everything that contains "monogame" (that's 4 packages: Assemblies, Development files, IDE integration, Documentation).
(By the way, http://monogame.net/ is currently down.)

* Open the file "PrinceOfPersia.net (Windows).sln" with MonoDevelop.
You will get an error saying "This project type is not supported by MonoDevelop.".
(And another about the Setup project, but I think we don't need that.)
To fix this, right-click the project (that is marked with a red circle), select Tools -> Edit File.
Find the ProjectTypeGuids line and replace it with this:

Code: Select all

    <ProjectTypeGuids>{9B831FEF-F496-498F-9FE8-180DA5CB4258};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
Save the file. (You might get a message about line endings. Click Convert.) Close the tab.
Right click on the project, select Reload.

* Configuring:
Right click on the "PrinceOfPersiaContentContent" project, select Settings.
In the list, select "Compiling -> Compiler". There is a dropdown list that says "PSM". Set it to "Linux".
Click OK.
(You might get a message about file formats, just click OK.)
There is a dropdown list at the top of the screen, set that to "Linux" as well.

* Compiling:
Right-click the solution (the first item in the solution panel), select "Compile" (the first item).
At this step I got 718 errors! :shock:
Some (most?) errors are about missing files. (Mostly .png images.)
Perhaps the downloadable source is incomplete?

* Workarounds:
I removed the references to all missing files.

The "Failed to create processor" errors:
I did some search-and-replace in the content project:
- MGTextureProcessor -> TextureProcessor
- MGSoundEffectProcessor -> SoundEffectProcessor
- MGSpriteFontDescriptionProcessor -> FontDescriptionProcessor

There are some weird errors about the mp3 files:

Code: Select all

Microsoft.Xna.Framework.Content.Pipeline.PipelineException: Processor 'SoundEffectProcessor' had unexpected failure! ---> System.NotSupportedException: Pcm has not been implemented on this platform
Perhaps mp3 is not implemented, but why does it say "Pcm"?
So I removed references to mp3 files.

The font errors:
Somehow the compiler thinks that the given FontName is a filename.
So make it happy: open the two .spritefont files, and replace "Arial" with the full path of a font file.
(You can find fonts in /usr/share/fonts/truetype/ )

After that, I got an error about some "nvtt":

Code: Select all

System.DllNotFoundException: nvtt
  at (wrapper managed-to-native) Nvidia.TextureTools.Compressor:nvttDestroyCompressor (intptr)
  at Nvidia.TextureTools.Compressor.Finalize () [0x00000] in <filename unknown>:0 
So I installed all packages whose name contains "nvtt".

There are 2 errors I couldn't fix. (Actually 1 error and 1 warning.)
The first is: (the warning)

Code: Select all

Adding /home/nagy/Dokumentumok/pop-net/princeofpersia-35220/PrinceOfPersia.net/PrinceOfPersia.net/bin/x86/Debug/PrinceOfPersia.exe to Content Pipeline Assembly List
: Failed to load assembly '/home/nagy/Dokumentumok/pop-net/princeofpersia-35220/PrinceOfPersia.net/PrinceOfPersia.net/bin/x86/Debug/PrinceOfPersia.exe': Could not load file or assembly '/home/nagy/Dokumentumok/pop-net/princeofpersia-35220/PrinceOfPersia.net/PrinceOfPersia.net/bin/x86/Debug/PrinceOfPersia.exe' or one of its dependencies. The system cannot find the file specified.
Looks like the content project needs the game exe, but the game won't compile without the content!

The other is:

Code: Select all

error CS0006: Metadata file `/home/nagy/Dokumentumok/pop-net/princeofpersia-35220/PrinceOfPersiaContent/PrinceOfPersiaContent/PrinceOfPersiaContentContent/bin/$(MonoGamePlatform)/$(Configuration)/PrinceOfPersiaContentContent.dll' could not be found
There is no dll in that folder, only folders with .xml and .xnb files.

Any idea on how to proceed?
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Prince Of Persia.net written in C#

Post by salvadorc17 »

Yes, is not my mistake, polipo has made some changes from the source code and removed the content project files i think, you will need to wait until he put back online all working project, becuase the latest source is a xna csharp and not the monogame converted...
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5746
Joined: April 9th, 2009, 10:58 pm

Re: Prince Of Persia.net written in C#

Post by Norbert »

David wrote:Not the best way to spend an afternoon
You looked into this thoroughly. I sort of feel sorry that you made such an investment. Apparently it wasn't an enjoyable experience (I can imagine that). Also, if I'm not mistaken you only occasionally use Linux, and as more or less the only Linux user here I don't particularly care about getting anything .NET to run on my PC. I feel like my - no offense - marginal interest in PoP.NET ended up messing up one of your afternoons...
David wrote:Any idea on how to proceed?
Remove compiling PoP.NET under Linux from the TODO list? ;) If alternative implementations of .NET/XNA can't run the binary (which polipo would need to provide without the setup encapsulation) under Linux, then - whatever. Even looking at just PoP projects, getting this to run on non-Windows OS'es, I would say, is very low priority stuff.

I hope everything I wrote above was diplomatic enough, if not then I apologize.
David
The Prince of Persia
The Prince of Persia
Posts: 2850
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Prince Of Persia.net written in C#

Post by David »

Norbert wrote:ended up messing up one of your afternoons...
Don't worry, I don't feel *that* bad about that.
Norbert wrote:Remove compiling PoP.NET under Linux from the TODO list? ;)
You're probably right. :)
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Prince Of Persia.net written in C#

Post by salvadorc17 »

You should talk with the creator of this "polipo", because he is the one that can help you get this working on linux, also is not the best porting of prince game, but i really liked becasue i have expertise with xna games and net programming and now i want to make a kind of prince using it...
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Prince Of Persia.net written in C#

Post by salvadorc17 »

Thanks to Andrea Fallapi "polipo" for doing it, now the game is compatible with apoplexy.

Watch the video:


https://www.youtube.com/watch?v=eCkdHmp ... ILl1Q1-4gQ
polipo
Vizier
Vizier
Posts: 89
Joined: September 6th, 2012, 8:34 am

Re: Prince Of Persia.net written in C#

Post by polipo »

Hi to all,
i'm very surprise to see talks about my PrinceOfPersia.net, i have done :
-> some code optimizations,
-> support Apoplexy Editor
-> today PoP.net can finish the level and advance to the next!

I read the previus posts i "see" the goal to pass PrinceOfPersia.net in Linux world.
My excuses i have reuploaded all source code into the codeplex site, now i think there are all files.

PoP.net under Linux?
IT CAN BE! i will spend tomorrow....
polipo
Vizier
Vizier
Posts: 89
Joined: September 6th, 2012, 8:34 am

Re: Prince Of Persia.net written in C#

Post by polipo »

Mhh it's very (for me) complicated linux /ubuntu setup for monodevelop + monogame.
I'm not an expertise on linux world, i'm having some trouble how to understand the correct monodevelop+monogame version.

Someone can help me ? for setup a vm with ubuntu LUCID? 10.04.4

Yeah i'm done it to load into UBUNTU the monogame

1) USE THIS GUIDE -> USE OPTION 1
http://askubuntu.com/questions/348351/h ... 4-on-12-04

2) INSTALL ADDIN MONOGAME from
http://www.monogame.net/2013/03/03/monogame-3-3/
choose XAMARIN Add in and isntall into monodevelop 4

3) INSTALL OPENAL
https://monogame.codeplex.com/discussions/395280
Post Reply