3D Starchart - Teaser 1: Rendering Planets
-
So, finally, I managed to include models in Starchart. I know it’s nothing new and I admit that without access to the sources of the UTF editor I couldn’t have done it but I hope that this combination of system, planets and models is at least something.
And, as promised, it’s all open source.
Get the code here -
I uploaded a built version to sourceforge: https://sourceforge.net/projects/flapi/files/
You will need the .NET Framework 4 and the XNA Redistributables 4
It can take quite some time to start and will use ca. 600mb ram at startup and much more if you switch between several systems until it will crash due to low memory. Well, it’s pre pre pre alpha
Controls:
press the right mouse button and move the mouse to look around
change position with arrow keys
left-klick on a system on the sector map to go there (does not work too well)
press h or j to show/hide jumphole/jumpgate connections on the sector map -
So, i have tried it
Works great for vanilla freelancer, i have switch 10 times in different systems without crash.I’ve tried it on a modded freelancer -> application won’t load.
I think it’s because some files are not BINI encrypted, in the mod, universe.ini and some systems INIs are in .ini and not in BINI encrypted format. Not sure about that.It can be a great tool for previewing new systems or to see if a modul s corectly positionned with a base, or to make some “tactics videos”
Keep it Up
-
Did you get an error message? if yes, what did it say?
Theoretically, text inis shouldn’t be a problem. On startup, Starchart looks for the freelancer registry entry, then parses freelancer.ini to get the data path and the name of universe.ini and solararch.ini, then parses these and all inis and utfs refrenced there. Of course I could have made some mistakes (better: I know I did, adoxa already pointed out) so any further info could halp me fix that.
Nice to know it works with vanilla on other machines, though. Could you post some data about your pc and how you experienced the performance of Starchart? Thanks for testing!
-
I was wondering why it wouldn’t work at all on my mechine, you just answered my my question though, I never installed FL on this desktop. I just dragged and dropped the install folder from another drive, so there is no registry entry.
-
So, when i rename my modded FL in “Freelancer” to make your soft parsing my files, no errors, the soft doen’t load, it say “Starchart a cesé de fontionner” (in english i think its’s equal to “starchart have stopped running”) this is the Details :
Description :
Stopped workingSignature du problème :
Nom d’événement de problème: CLR20r3
Signature du problème 01: starchart.exe
Signature du problème 02: 0.0.0.1
Signature du problème 03: 4d835042
Signature du problème 04: FlApi
Signature du problème 05: 0.0.0.1
Signature du problème 06: 4d835028
Signature du problème 07: 17
Signature du problème 08: 565
Signature du problème 09: System.InvalidCastException
Version du système: 6.0.6002.2.2.0.768.3
Identificateur de paramètres régionaux: 1036I’m on Vista 32bit.
proc: t7500
Ram: 3Go
GC: 8600M GT
Animation when orientating systems and moving around are smooth zoom in and out too. Switching system take about 3 secondes. i will make more test to see how many times i can switch systems.Hope details can help you to found problem, but i thing to a cast error like saying in the details, are you casting some values, or just manipulate them ? Good luck.
I cant take a look at your source code for now, cause i havn’t my compiler installed in this computer. -
yep, I just installed JFLP after adoxa pointed out that “I don’t like it”
Starchart, or rather my FLApi library are very strongly typed. The invalid cast is because in JFLP many values that are floats in vanilla are integers, and the parser handles this correctly but the api assumes other types.Will try to fix that soon
-
OK good news so
Oh, just a suggestion :
is there an easy way for you to let the user point at the FL folder instead of reading the registry ? So that, we can choose if we want load vanilla FL or a modded one :), By asking the user to point at the universe.ini or the freelancer.ini r the FL Folder.It can be a cool option for your future release.
-
No not an editor really, more a system viewer, well, a star chart
But Starchart really is just a frontend for FLApi, a library im working on to access Freelancer data. The api could be eqipped with editing functions (I plan to, some time in the distant future), so then it can be used to build editors. Starchart itself could evolve into a new engine for Freelancer, but that is far far off. I’m just scratching at the surface.
-
Found another problem caused by JFLP. I use the longer “En Dash” (U+2013) for the gate “arrows”. This character isn’t present in the sprite font, so another exception is thrown. Solution is simple, add s = s.Replace(‘\x2013’, ‘-’); before MeasureString in drawString in SystemMap.cs. Well, simple for that particular problem, but there could be other missing characters, so a more robust solution is needed.
-
So i have maked some other tests :
Performaance seems to be good, i can change 25+ times of systemes, but some systems are unable, if you click on the map, nothing append, and on some systems, soft crach with the “system.exception” throwed.
And always this “cast exception” on a modded freelancer.But the god side is that the perfprmance is rather good and system swytch are fast, on my computer.
-
@Ezekiel:
OK, thank you for testing. I’m glad performance is good, and it should be considering almost all data is loaded at startup (resuting in the immense memory usage). That some systems don’t react when clicking on them is because the click detection is done really “quick-and-dirty”.
And the CastException, yeah well…. ^^@Adoxa:
My “solution” yesterday, well two days ago, was only a quick fix. I hoped it would solve some problems with JFLP, maybe it did but of course not all. I’ll need some time looking over the code, testing with various installations and trying out your suggestions. Especially the casting issues… ^^So, I dont know how long it’ll take, how much time I can make in the week(s) to come. This post was, after all, only meant to be a preview. But suggestions are always appeciated of course, so thanks to everyone.
-
I’ve taken the liberty of attaching an updated version. It should fix all problems reading ini files, as well as reducing memory usage (I could previously only visit three systems before running out). It also lets you hold down control to move five times quicker. Note: this is just the binaries, you still need the Content directory. Source patch included (from revision 109).
-
build 0.0.0.4 online: https://sourceforge.net/projects/flapi/files/
Includes the changes by Adoxa (thanks man^^) except for the Tradelane Names workaroud (I want to do it right, might take time though)
Now includes a FolderBrowserDialog at startup so you can select a custom Freelancer install
Edit: Turns out I made more new errors than I fixed old ones in 0.0.0.3, so here is number 4.
Just realised the EN-Dash problem was is Jumpgate names, not Tradelannes, silly me…
Anyway, fixed now.