Giter VIP home page Giter VIP logo

librelancer's Introduction

Librelancer

A re-implementation of the 2003 Space Game Freelancer in C# and OpenGL.

Currently running on Windows and Linux (macOS pending maintainer) Pull Requests are welcome!

Support Librelancer on Patreon: https://www.patreon.com/librelancer

Download compiled binaries from https://librelancer.net/downloads.html

General Requirements

  • GPU must be capable of OpenGL 3.1+
  • A Freelancer installation (Vanilla recommended, some mods may work)

Build Instructions

Windows

Prerequisites:

  • 64-bit Windows 10 or newer
  • Visual Studio 2022 with:
    • .NET 8.0 SDK
    • Desktop C++ Development Workflow
  • CMake

Steps:

  1. Clone this repository with all submodules (Visual Studio's Team Explorer, Git bash, etc.)
  2. Run build.ps1 in Powershell. (Can be launched from cmd by powershell -File .\build.ps1)

Powershell security issues can be troubleshooted here.

Linux

Prerequisites:

  • .NET 8.0 SDK
  • SDL2
  • OpenAL
  • gcc and g++
  • CMake
  • GTK3, Pango and Cairo headers

Steps:

  1. Clone this repository with git clone --recursive https://github.com/Librelancer/Librelancer
  2. Run build.sh

Screenshots

See: https://librelancer.net/screenshots.html

librelancer's People

Contributors

ananace avatar bc46 avatar bjstarosta avatar callumdev avatar giperion avatar gnamra avatar gp-alex avatar haydntrigg avatar jimjamjamie avatar jmitchvii avatar johnwildkins avatar lazrius avatar mcgoober avatar mrmbernardi avatar regenhardt avatar splittydev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

librelancer's Issues

Editor: Reload resources

Materials/textures are loaded once but never updated upon modifying them. It should happen either automatically or a very least having a reload button in resources tab.

Btw VMeshData is also shareable resource like material/texture (but DFM's meshes aren't).

but what is freelancer?

You mention several times that librelancer is re-implementation of freelancer, but if one doesn't happen to know what freelancer is, one is none the wiser.

Implement selection reticle

Probably can't be implemented in Xml UI alone due to it needing to interact with 3d objects. Could use similar transformation logic though.

Linux support?

It is not clear in the README if Linux currently supported or not. Do you need people to test it?

Launcher: Re-design UI interactions

Having the Launcher process tied to the Game Instance produces some weird issues, Xwt is also entirely broken.

Move the game into its own process and create a winforms/gtk crash window without the use of Xwt. Make an Eto.Forms launcher that simply shells out the game process.

ALE renders wrong in most cases

This is too big to split into multiple issues. There's plenty of problems regarding transforms, as well as geometry not being created properly.

Geometry issues are in FxRectAppearance and FxPerpAppearance.

There's also issues with the ALE curves not being implemented correctly (see Utf/Ale/AlchemyCurveAnimation.cs) which while isn't noticeable for a lot of vanilla effects, does make a lot of values end up incorrect.

A good way to test this would be to create a Thn scene in the game intro with some custom alchemy effects each testing a specific element.

dt_flags crashes if it's a byte

Shown in this submitted screenshot:
devenv_2016-08-10_18-12-15

Apparently this works in vanilla. Investigate a single byte being used for Int32Data?

[From Freelancer Repack mod]

Linux build fails due to msbuild 15.0

At the moment the linux build fails with:

MSBuild auto-detection: using msbuild version '15.0' from '/usr/lib/mono/msbuild/15.0/bin'.
Error parsing solution file at /home/tom/tmp/Librelancer/src/LibreLancer.sln: Invalid Image
An error occurred when executing task 'Build'.
Error: One or more errors occurred.
        NuGet: Process returned an error (exit code 1).

Looking into this error leads here: NuGet/Home#7202 which suggests downgrading to msbuild 14.0 to fix it, unfortunately I don't know enough about mono or its build system to submit a PR that does this.

edit: I managed to downgrade to msbuild 14.0 by installing the package from Arch Linux's AUR, however the build system seems to ignore PATH and auto-detects the executable from /usr/lib/mono/msbuild/15.0/bin. I very crudely renamed the original file to force it to use msbuild 14.0 from /usr/bin/msbuild

Once I'd done that I got further but got the following errors:

Project "/home/tom/tmp/Librelancer/src/LibreLancer.sln" (1) is building "/home/tom/tmp/Librelancer/src/LibreLancer/LibreLancer.csproj.metaproj" (2) on node 1 (default targets).
/home/tom/tmp/Librelancer/src/LibreLancer/LibreLancer.csproj.metaproj : error MSB4025: The project file could not be loaded. Could not find file "/home/tom/tmp/Librelancer/src/LibreLancer/LibreLancer.csproj.metaproj"                                                                                                                                                                                                          
Done Building Project "/home/tom/tmp/Librelancer/src/LibreLancer/LibreLancer.csproj.metaproj" (default targets) -- FAILED.
Project "/home/tom/tmp/Librelancer/src/LibreLancer.sln" (1) is building "/home/tom/tmp/Librelancer/src/LibreLancer.Base/LibreLancer.Base.csproj.metaproj" (3) on node 1 (default targets).                       
/home/tom/tmp/Librelancer/src/LibreLancer.Base/LibreLancer.Base.csproj.metaproj : error MSB4025: The project file could not be loaded. Could not find file "/home/tom/tmp/Librelancer/src/LibreLancer.Base/LibreLancer.Base.csproj.metaproj"   

This happens for each subproject. There is no csproj.metaproj file and I'm not sure why it even looks for it as there is no reference to this file in LibreLancer.sln.

edit again: It appears to be to do with windows/linux slashes.

Running

sed -i -e 's/\\/\//g' src/LibreLancer.sln

Fixes that error but I now get stuck at:

"/home/tom/tmp/Librelancer/src/LibreLancer.sln" (Build target) (1) ->
"/home/tom/tmp/Librelancer/src/Editor/LancerEdit/LancerEdit.csproj.metaproj" (default target) (24) ->
"/home/tom/tmp/Librelancer/src/ImGuiNet.Build451/ImGuiNet.Build451.csproj.metaproj" (default target) (25) ->
"/home/tom/tmp/Librelancer/src/ImGuiNet.Build451/ImGuiNet.Build451.csproj" (default target) (26) ->
(CoreCompile target) -> 
  ../../extern/ImGui.NET/src/ImGui.NET/NativeIO.cs(59,37): error CS0443: Value or constant expected [/home/tom/tmp/Librelancer/src/ImGuiNet.Build451/ImGuiNet.Build451.csproj]
  ../../extern/ImGui.NET/src/ImGui.NET/NativeStyle.cs(121,39): error CS0443: Value or constant expected [/home/tom/tmp/Librelancer/src/ImGuiNet.Build451/ImGuiNet.Build451.csproj]

Which is less of an obvious issue.

Ships roll incorrectly

Current physics implementation is based on taking the Freelancer INI values and trying to shove them into bullet to make them work. This has produced ships that roll strangely. Figure out how freelancer handles roll + roll inertia to get better steering behaviour.

MIT Relicense

I'd like to relicense this project to be MIT.

@Giperionn
@gp-alex
Please comment here to give permission for your changes to be licensed under MIT.
I've emailed Malte Rupprecht for permission for their code, if that does not turn out fruitful the following files under src need to be rewritten and/or removed. As this is quite core code it may become quite a task:

  • ./LibreLancer.Compatibility/Ini/BooleanValue.cs
  • ./LibreLancer.Compatibility/Ini/Section.cs
  • ./LibreLancer.Compatibility/Ini/IniFile.cs
  • ./LibreLancer.Compatibility/Ini/IValue.cs
  • ./LibreLancer.Compatibility/Ini/Entry.cs
  • ./LibreLancer.Compatibility/Ini/StringValue.cs
  • ./LibreLancer.Compatibility/Ini/IniValueType.cs
  • ./LibreLancer.Compatibility/Ini/SingleValue.cs
  • ./LibreLancer.Compatibility/Ini/Int32Value.cs
  • ./LibreLancer.Compatibility/GameData/Characters/Accessory.cs
  • ./LibreLancer.Compatibility/GameData/Characters/CostumesIni.cs
  • ./LibreLancer.Compatibility/GameData/Characters/Bodypart.cs
  • ./LibreLancer.Compatibility/GameData/Characters/Costume.cs
  • ./LibreLancer.Compatibility/GameData/Characters/BodypartsIni.cs
  • ./LibreLancer.Compatibility/GameData/MouseIni.cs
  • ./LibreLancer.Compatibility/GameData/Solar/WeaponsPlatform.cs
  • ./LibreLancer.Compatibility/GameData/Solar/JumpGate.cs
  • ./LibreLancer.Compatibility/GameData/Solar/Waypoint.cs
  • ./LibreLancer.Compatibility/GameData/Solar/SolararchIni.cs
  • ./LibreLancer.Compatibility/GameData/Solar/Loadout.cs
  • ./LibreLancer.Compatibility/GameData/Solar/MissionSatellite.cs
  • ./LibreLancer.Compatibility/GameData/Solar/NonTargetable.cs
  • ./LibreLancer.Compatibility/GameData/Solar/LoadoutsIni.cs
  • ./LibreLancer.Compatibility/GameData/Solar/DockingRing.cs
  • ./LibreLancer.Compatibility/GameData/Solar/Star.cs
  • ./LibreLancer.Compatibility/GameData/Solar/TradelaneRing.cs
  • ./LibreLancer.Compatibility/GameData/Solar/Station.cs
  • ./LibreLancer.Compatibility/GameData/Solar/Sun.cs
  • ./LibreLancer.Compatibility/GameData/Solar/StararchIni.cs
  • ./LibreLancer.Compatibility/GameData/Solar/DestroyableDepot.cs
  • ./LibreLancer.Compatibility/GameData/Solar/JumpHole.cs
  • ./LibreLancer.Compatibility/GameData/Solar/Planet.cs
  • ./LibreLancer.Compatibility/GameData/Solar/Satellite.cs
  • ./LibreLancer.Compatibility/GameData/Solar/AirlockGate.cs
  • ./LibreLancer.Compatibility/GameData/Solar/CollisionGroup.cs
  • ./LibreLancer.Compatibility/GameData/Equipment/AbstractEquipment.cs
  • ./LibreLancer.Compatibility/GameData/Equipment/EquipmentIni.cs
  • ./LibreLancer.Compatibility/GameData/Equipment/Light.cs
  • ./LibreLancer.Compatibility/GameData/Universe/Zone.cs
  • ./LibreLancer.Compatibility/GameData/Universe/Band.cs
  • ./LibreLancer.Compatibility/GameData/Universe/JumpReference.cs
  • ./LibreLancer.Compatibility/GameData/Universe/Room.cs
  • ./LibreLancer.Compatibility/GameData/Universe/UniverseIni.cs
  • ./LibreLancer.Compatibility/GameData/Universe/Nebula.cs
  • ./LibreLancer.Compatibility/GameData/Universe/Encounter.cs
  • ./LibreLancer.Compatibility/GameData/Universe/StarSystem.cs
  • ./LibreLancer.Compatibility/GameData/Universe/Field.cs
  • ./LibreLancer.Compatibility/GameData/Universe/SystemObject.cs
  • ./LibreLancer.Compatibility/GameData/Universe/NebulaLight.cs
  • ./LibreLancer.Compatibility/GameData/Universe/ZoneReference.cs
  • ./LibreLancer.Compatibility/GameData/Universe/AsteroidField.cs
  • ./LibreLancer.Compatibility/GameData/Universe/EncounterParameter.cs
  • ./LibreLancer.Compatibility/GameData/Universe/TexturePanels.cs
  • ./LibreLancer.Compatibility/GameData/Universe/SystemPart.cs
  • ./LibreLancer.Compatibility/GameData/Universe/LightSource.cs
  • ./LibreLancer.Compatibility/GameData/Universe/Base.cs
  • ./LibreLancer.Compatibility/GameData/Universe/NamedObject.cs
  • ./LibreLancer.Compatibility/GameData/Universe/AsteroidBillboards.cs
  • ./LibreLancer.Compatibility/GameData/Universe/UniverseElement.cs
  • ./LibreLancer.Compatibility/GameData/Universe/DynamicAsteroids.cs
  • ./LibreLancer.Compatibility/GameData/Universe/ExclusionZone.cs
  • ./LibreLancer.Compatibility/GameData/Universe/LootableZone.cs
  • ./LibreLancer.Compatibility/GameData/Cursor.cs
  • ./LibreLancer.Compatibility/GameData/MouseShape.cs
  • ./LibreLancer.Compatibility/GameData/Archetype.cs
  • ./LibreLancer.Compatibility/Exceptions/FileVersionException.cs
  • ./LibreLancer.Compatibility/Exceptions/FileException.cs
  • ./LibreLancer.Compatibility/Exceptions/FileFormatException.cs
  • ./LibreLancer.Compatibility/Exceptions/FileContentException.cs
  • ./LibreLancer/Utf/AbstractConstruct.cs
  • ./LibreLancer/Utf/Dfm/DfmPart.cs
  • ./LibreLancer/Utf/Dfm/FaceGroup.cs
  • ./LibreLancer/Utf/Dfm/DfmFile.cs
  • ./LibreLancer/Utf/Dfm/DfmMesh.cs
  • ./LibreLancer/Utf/Dfm/Bone.cs
  • ./LibreLancer/Utf/Vms/VMeshData.cs
  • ./LibreLancer/Utf/Vms/TMeshHeader.cs
  • ./LibreLancer/Utf/Vms/VmsFile.cs
  • ./LibreLancer/Utf/RevConstruct.cs
  • ./LibreLancer/Utf/ConstructCollection.cs
  • ./LibreLancer/Utf/Cmp/CmpFile.cs
  • ./LibreLancer/Utf/Cmp/ModelFile.cs
  • ./LibreLancer/Utf/Cmp/VMeshRef.cs
  • ./LibreLancer/Utf/Cmp/RevoluteHardpointDefinition.cs
  • ./LibreLancer/Utf/Cmp/Part.cs
  • ./LibreLancer/Utf/Cmp/FixedHardpointDefinition.cs
  • ./LibreLancer/Utf/Cmp/HardpointDefinition.cs
  • ./LibreLancer/Utf/Mat/SphFile.cs
  • ./LibreLancer/Utf/Mat/MatFile.cs
  • ./LibreLancer/Utf/Mat/TxmFile.cs
  • ./LibreLancer/Utf/Mat/TextureData.cs
  • ./LibreLancer/Utf/Mat/Material.cs
  • ./LibreLancer/Utf/FixConstruct.cs
  • ./LibreLancer/Utf/Anm/Script.cs
  • ./LibreLancer/Utf/Anm/Frame.cs
  • ./LibreLancer/Utf/Anm/AnmFile.cs
  • ./LibreLancer/Utf/Anm/Channel.cs
  • ./LibreLancer/Utf/UtfFile.cs
  • ./LibreLancer/Utf/SphereConstruct.cs
  • ./LibreLancer/Utf/PrisConstruct.cs
  • ./LibreLancer/Utf/LooseConstruct.cs
  • ./LibreLancer/ConvertData.cs
  • ./LibreLancer/ChaseCamera.cs
  • ./LibreLancer/IDrawable.cs
  • ./LibreLancer/ILibFile.cs
  • ./LibreLancer/TextureShape.cs
  • ./LibreLancer/CrcTool.cs
  • ./Editor/SystemViewer/DebugCamera.cs
  • ./LibreLancer.ImageLib/TGA.cs

DDS Reader Broken

Does not work on all valid DDS files Freelancer accepts. Needs rewrite.

About contributing

I'd like to contribute somehow. Can I start with optimizing your C# code? like making things readonly where applicable and stuff.

Are there strict code conventions? I don't see an .editorconfig file, may I make one from the conventions I find in the code?

Tabs or spaces?

Editor: compound animation reset

Reset button to revert positions/orientations of parts into default state. Currently when animation script is finished all parts remain at their last keyframes until animation script is called again.

An equivalent project (a project with the same global properties and tools version) is already present in the project collection

hi,
I follow the README process test, in the running slngen.bat error :

An equivalent project (a project with the same global properties and tools version) is already present in the project collection, with the path "D:\dev\Librelancer\src\LibreLancer\LibreLancer.csproj". To load an equivalent into this project collection, unload this project first.
image

I search for information based on errors, but still do not solve the problem. stackoverflow

what can be prompted me? thanks

Editor: Collada importing of mixed FVF meshes

Imported data may have varying vertex properties resulting in different FVF configurations. As such importer will need to put them into different VMeshData not only according to LOD level but also by matching FVF. Also typical VMeshData name format is "%s.lod%d.%d.vms" (model/scene name, lod level, fvf).

Implement Projectile rendering and firing

Projectiles have a separate rendering path from ALE. Figure out the best way to manage projectiles, and preferably have the rendering output into the Billboards class.

Editor: Implement VMeshWire/VWireData

Draw lines from VWireData, which consists of pairs of vertex indices in VMeshData.
Ideally you may want from/to convert spline objects for Collada import/export, just have to play match spline knot to vertex position within some threshold (determine which mesh vertices to match against by spline object parent being target LOD mesh object).

macOS build broken

Code is unmaintained. It is possible to clean up the scripts + launcher to make it run though

How to launch the build?

I have the app crashing on Windows 10 after popup saying that I don't have Media Player installed.
Also, where should I put original game data?

[Feature Request] Language Support

I'm fully aware that this is likely to be out of scope for a long while, but it would be nice to be sure that the different (non-English) versions of the game can also be imported, and run correctly (which probably only pertains to making sure that special characters are handled).

Windows binary distribution

Freetype binaries (currently provided on SharpFont) depend on a different VC++ distributable than the rest of the engine, this causes pains and the binaries should be updated.

Also add functionality in the launcher to detect missing VC++ versions and offer to download+install them.

Crashes on hardware that does not support glMemoryBarrier

Low hanging fruit in LibreLancer.Base, make sure if getprocaddress delegate returns null then skip loading the function pointer. The main SystemRenderer class already checks for the extension and requires no changes

Quote from discoverygc.com forums:

Hm, i set on my potato all proper sausage: NET 4.7, required VC redistributables, ensured it have 3.3 OpenGl drivers, but still cant eat it.

Code:

Value cannot be null.
Parameter name: ptr
   at System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer(IntPtr ptr, Type t)
   at LibreLancer.GL.Load(Func`3 getprocaddress)
   at LibreLancer.Game.Run()
   at LancerEdit.Program.Main(String[] args)

Same for any exe, with respectively different bin name in last line. Have i any chances gain freedom from milkshape?

UPD: Solved, that was caused by usage of glMemoryBarrier (which appear only from OpenGL 4.2, and of course doesnt exist on my 3.3 potato) in SystemRenderer. (also funny it have comments about no needed, its indeed Big Grin).

[Feature Request] add subtitles support

freelancer game's plot animation is real-time calculus, only speech, no subtitles. For the hearing loss of the player is simply a pain, can add drama animation subtitles! This will benefit a lot of non-English players.
I have a game's all drama animated text , if you need

thank you

Crash reporting/window broken

The code for opening a window after the engine crashes does not work. May be better to spawn a different process for the crash window and let the launcher process terminate?

Implement proper Spring Camera

The ChaseCamera class is just a fixed offset. A spring-based camera should be implemented, taking into account the camera variables + constraints set in the ship ini file.

Attached lights billboard as coronas

Implement attachable solar/ship light billboards as coronas so they don't clip into nearby geometry. This probably means they need to be rendered in a separate layer. Many attached lights have view cone limits so they wouldn't be visible from behind. For obstructing objects check by collision hitboxes.

By the way system stars in Freelancer work in the same way they are rendered on a layer between HUD and everything else in scene. Besides they tend to consist of multiple billboards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.