Comments (17)
I've considered converting to MonoGame for exactly that reason. However, I rely on a couple of Win32 calls via p/invoke (for the HDD serial, GFX loading, and logging functions at the very least) that wouldn't be able to port over.
Unless you know of a way that I could make those p/invoke calls from MonoGame on alternate platforms?
from endlessclient.
You could try using a Unique ID for Device, instead of HDD ID, and there's no native function to Load GFX? Logging is pretty easy, just use some filesystem class.
from endlessclient.
Yeah take a look at GFXLoader.cs - that's my primary concern since it's kind of important to have graphics :)
Regarding HDD ID, I'm not super concerned about replacing it for some platform independence.
For logging, I use native calls for getting Process/Thread IDs. Those could also probably be converted or removed pretty easily, I don't think they're super important.
from endlessclient.
http://www.mono-project.com/docs/advanced/pinvoke/
http://www.gamedev.net/topic/640849-port-xna-to-ios-step-by-step-using-monogame/?view=findpost&p=5047730
from endlessclient.
That's all well and good, but the GFX are stored as compiled resources that are Windows specific. There are no cross-platform libraries (again that I know of) that provide implementations of the Windows LoadLibrary
, LoadImage
, FreeLibrary
, and DeleteObject
that are in use by GFXLoader.
from endlessclient.
LoadLibrary + FreeLibrary => http://dimitry-i.blogspot.com.br/2013/01/mononet-how-to-dynamically-load-native.html
For LoadImage, what's about Porting from Wine (open-source) or ReactOS
And looks like Mono's GdiPlus supports DeleteObject
from endlessclient.
Interesting. I'll look into this when I get more time and try setting up a Linux VM with monogame. I didn't know there were open implementations of those functions
from endlessclient.
I'm running into a lot of issues while porting the code base to monogame (running in an Ubuntu 15.04 VM). I may consider porting to monogame on Windows first and then getting it running on Linux separately.
This issue will remain open but is very low priority (cross-platform compatibility is not the primary focus of this project).
from endlessclient.
You really should try on Windows first. The ".exe" that is generated on Windows (via Mono), works on Linux too hehe
from endlessclient.
MonoGame:
After killing a NPC, the NPC fades in and out in front of the player, even after walking O.O
from endlessclient.
Yeah I thought it was kind of funny :)
Not sure why that happens yet though. I'm working on getting the development environment set up and working on my Ubuntu 15.04 VM, then I'll focus on any bugs that have come into play.
from endlessclient.
Any updates?
from endlessclient.
Haven't had a chance to work on it recently - I'm hoping to make some time tonight or Saturday.
I'm running up against a content generation issue on Ubuntu. So I may put that on hold until I can get a dedicated Ubuntu machine (running a VM right now)
from endlessclient.
I've been investigating getting this built on Ubuntu 15.04. As expected, there are a few problems I've come across, mostly related to dependencies on the Windows API via P/Invoke:
- GFX Files are Win32 PE Files. There is no native / built-in way to load images from these files on Linux - P/Invoke is used to load them on Windows, which works in mono because Kernel32.dll exists on Windows regardless of how the C# executable is built. GFX images would have to be extracted from the original files, or a custom PE loader would have to be written. This would either break support for the existing client (option a) or be extremely difficult (option b).
- XNAControls uses a Win32 Keyboard hook (via P/Invoke) for input processing in text boxes. I haven't investigated very much, but using the native XNA/Monogame support would be less natural as far as typing is concerned, although very possible when compared with the GFX file problems.
- Background music uses a System.Windows.Media.MediaPlayer object to play the MIDI files, which is basically a Windows Media Player instance. This is obviously not on Linux. Background music isn't essential to the game, but it is definitely nice to have. I don't know a good replacement for this yet, playing MIDI files is not supported in XNA.
- SpriteFonts aren't building correctly. I'm sure I'm just doing something wrong with the project setup, but for whatever reason the content builds the PNG images just fine and throws a vague error for the fonts.
- Other P/Invoke functions - I think there are other P/Invoke functions used that would have to be replaced with different functionality on non-windows platforms. One example is the hard drive ID; things like this would be trivial to replace but more investigation is needed.
Fortunately I took out support of GDI drawing (System.Drawing.Graphics) in XNAControls and replaced it with native XNA stuff (SpriteBatch.DrawString), so this removes a lot of uncertainly. However, item 1 on the above list is a big enough problem that I don't think a cross-platform client is feasible without some serious work.
Edit: I'm closing this issue since it isn't possible to feasibly implement cross-platform support at this time. I'll keep working on it though and see if I can resolve the issues mentioned above, since this would be a really cool thing to have.
from endlessclient.
Stay tuned for Ubuntu support, I've written an open-source cross-platform PE loader (here) that should work on Ubuntu and doesn't rely on the P/Invoke functions LoadLibrary/LoadImage/etc.
Assuming I can replace all the windows-specific P/Invoke function calls, there should be a working Linux build in the near future!
from endlessclient.
Looks good, keep up!
from endlessclient.
Finally got this working in Ubuntu! See PR #81
Sample:
https://cdn.discordapp.com/attachments/666280326938755072/669796361318694921/unknown.png
from endlessclient.
Related Issues (20)
- Unnecessary DLLs are included in build drops
- Reports are not implemented HOT 1
- Fast NPC animations sometimes jump around
- Missing "out of drop range" chat message
- Missing sound effect when giving "safety comment" for dropping a large amount of gold HOT 2
- Implement credits/checksum generation
- Character Misalignment on Chair Without Character initially sat HOT 2
- Visual glitch with chairs facing "Up" direction HOT 2
- EHF file parsing and display
- Implement quest switcher functionality
- PVP - Visuals HOT 2
- Rendering gold for example near bank locker HOT 1
- Use and enforce "server settings" during Welcome exchange
- Send WALK_SPEC when ghosting players
- Implement "freeze" walk packets
- Admins hiding does not play effect
- Chat bugs and inconsistencies
- Changing password HOT 1
- Sound handling in EOLib
- .net 8.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from endlessclient.