Giter Site home page Giter Site logo

opensoldat / polyworks Goto Github PK

View Code? Open in Web Editor NEW
25.0 10.0 8.0 3.49 MB

Map editor for the game OpenSoldat

Home Page: https://forums.soldat.pl/index.php?topic=35195.0

License: MIT License

HTML 1.88% NSIS 1.45% Batchfile 0.67% VBA 95.99%
soldat mapeditor mapmaker visualbasic6 map-editor vb6 vb6-application opensoldat

polyworks's Introduction

OpenSoldat

OpenSoldat is a unique 2D (side-view) multiplayer action game. It has been influenced by the best of games such as Liero, Worms, Quake, Counter-Strike, and provides a fast-paced gaming experience with tons of blood and flesh.

This repository contains the source code of the so-called 1.8 version. Compared to the original version, the code has undergone many changes but is not in a finished state. We hope that by open-sourcing Soldat we can empower our community to improve the game at a faster pace.

Dependencies

Building OpenSoldat

OpenSoldat compiles on Windows, Linux and macOS.

Compilation using CMake

This approach automates some build steps. OpenSoldat's assets will be downloaded for you, and you will not have to worry about downloading pre-built libraries. This is the simplest way to build OpenSoldat for Linux.

CMake 3.14+ is required.

Build steps for Linux (Ubuntu)

  1. sudo apt-get install build-essential g++ cmake git fpc libprotobuf-dev protobuf-compiler libssl-dev libsdl2-dev libopenal-dev libphysfs-dev libfreetype6
  2. mkdir build && cd build
  3. cmake ..
  4. make

Build steps for Windows

  1. Install freepascal 3.2.2
  2. Install Visual Studio with C++ compiler/build tools and vcpkg
  3. Open Developer command prompt for Visual Studio
  4. vcpkg.exe --triplet x64-windows install sdl2 physfs openssl protobuf freetype openal-soft
  5. set PATH=%PATH%;C:\fpc\3.2.2\bin\i386-win32
  6. set OPENSSL_ROOT_DIR=C:\vcpkg\installed\x64-windows
  7. set PHYSFSDIR=C:\vcpkg\installed\x64-windows
  8. mkdir build
  9. cd build
  10. cmake -G "NMake Makefiles" -DCROSS_WINDOWS_64=1 -DCMAKE_TOOLCHAIN_FILE="C:\vcpkg\scripts\buildsystems\vcpkg.cmake" -DSDL2_BUILDING_LIBRARY=1 ..
  11. nmake

Build steps for macOS

  1. brew install openssl@3 protobuf fpc cmake sdl2 physfs freetype2
  2. mkdir build && cd build
  3. export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/opt/openssl@3/lib/pkgconfig
  4. cmake -DOPENSSL_ROOT_DIR=$(brew --prefix openssl@3) ..
  5. make

Available flags

The build can be customized by passing flags to cmake command. For example, you can choose whether you want to build the client, the server, or both. You can decide if you want to include OpenSoldat's assets in the build. There are also options for cross-compilation.

Check the CMakeLists.txt files in this repository to see the available options and their default values.

Example: cmake .. -DCMAKE_BUILD_TYPE=Release -DADD_ASSETS=1 -DBUILD_CLIENT=0 to get a release build of the server with OpenSoldat's assets

Compilation using other methods

If you decide to follow the approaches below, you will have to download OpenSoldat's assets and pre-built libraries for the game to work.

  1. Download pre-built libraries. The best way would probably be to download libraries from the latest build of OpenSoldat (from Github Actions, or Releases). You can download latest from here (includes libraries for 3 platforms - pick the ones you need) 2. Copy libraries to client/build and server/build
  2. Get soldat.smod file from base repository. You can either download the file from the latest release (recommended), or generate the .smod file yourself following the provided instructions
  3. Copy soldat.smod file to client/build and server/build
  4. Download play-regular.ttf file from base repository from the latest release
  5. Copy play-regular.ttf file to client/build

Compilation using Lazarus IDE

  1. Install Lazarus IDE
  2. Open server/opensoldatserver.lpi with Lazarus, press CTRL + F9 to compile the server
  3. Open client/opensoldat.lpi with Lazarus, press CTRL + F9 to compile the game client

Running OpenSoldat

You need to start the server first, and then join the game with client.

  1. Run opensoldatserver
  2. Run opensoldat -join 127.0.0.1 23073 (more generically -join ip port)

polyworks's People

Contributors

exhunter avatar shoozza 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

polyworks's Issues

Workspace issues

  1. When opening PW for the first time after instalment, the workspace is in the middle of the screen instead of being nicely in the edges of PW's frame. See picture: http://i.imgur.com/3wyEyCz.png
  2. To get your workspace nicely along the edges you can do Window --> Workspace --> Reset Window Locations. This creates no error messages. However, if you are in restored window (as opposed to maximized) while doing this it's another story. Your window frames will change, workspace will move the the edges of that frame, and there will be an error message. See picture: http://i.imgur.com/sPJVcZB.png Notice that the - □ x symbols are almost above your screens edge. Now, if you were to close and reopen PW, the - □ x symbols will be completely gone above your screens edge and you will have no other option than to reinstall PW. See picture: http://i.imgur.com/NgoY6LG.png
  3. Maximizing/Restoring PW create an error message: http://i.imgur.com/CbIEwOK.png The maximizing/restoring will still have effect though. *This issue is not directly related to the two issues above

NSIS script is broken

the NSIS script is broken so I cant install Polyworks

log:
MakeNSIS v3.05 - Copyright 1999-2019 Contributors
See the file COPYING for license details.
Credits can be found in the Users Manual.

Processing config: C:\Program Files (x86)\NSIS\nsisconf.nsh
Processing default plugins: "C:\Program Files (x86)\NSIS\Plugins\x86-ansi*.dll"

  • Banner::destroy
  • Banner::getWindow
  • Banner::show
  • BgImage::AddImage
  • BgImage::AddText
  • BgImage::Clear
  • BgImage::Destroy
  • BgImage::Redraw
  • BgImage::SetBg
  • BgImage::SetReturn
  • BgImage::Sound
  • Dialer::AttemptConnect
  • Dialer::AutodialHangup
  • Dialer::AutodialOnline
  • Dialer::AutodialUnattended
  • Dialer::GetConnectedState
  • InstallOptions::dialog
  • InstallOptions::initDialog
  • InstallOptions::show
  • LangDLL::LangDialog
  • Math::Script
  • StartMenu::Init
  • StartMenu::Select
  • StartMenu::Show
  • System::Alloc
  • System::Call
  • System::Copy
  • System::Free
  • System::Get
  • System::Int64Op
  • System::Store
  • System::StrAlloc
  • TypeLib::GetLibVersion
  • TypeLib::Register
  • TypeLib::UnRegister
  • UserInfo::GetAccountType
  • UserInfo::GetName
  • UserInfo::GetOriginalAccountType
  • VPatch::GetFileCRC32
  • VPatch::GetFileMD5
  • VPatch::vpatchfile
  • advsplash::show
  • nsDialogs::Create
  • nsDialogs::CreateControl
  • nsDialogs::CreateItem
  • nsDialogs::CreateTimer
  • nsDialogs::GetUserData
  • nsDialogs::KillTimer
  • nsDialogs::OnBack
  • nsDialogs::OnChange
  • nsDialogs::OnClick
  • nsDialogs::OnNotify
  • nsDialogs::SelectFileDialog
  • nsDialogs::SelectFolderDialog
  • nsDialogs::SetRTL
  • nsDialogs::SetUserData
  • nsDialogs::Show
  • nsExec::Exec
  • nsExec::ExecToLog
  • nsExec::ExecToStack
  • nsisdl::download
  • nsisdl::download_quiet
  • splash::show

!define: "MUI_INSERT_NSISCONF"=""

Changing directory to: "C:\Users\kruse\Downloads\polyworks-develop\pwinstall"

Processing script file: "C:\Users\kruse\Downloads\polyworks-develop\pwinstall\pw.nsi" (ACP)
!define: "PRODUCT_NAME"="Soldat PolyWorks"
!define: "PRODUCT_VERSION"="1.5.0.13"
!define: "PRODUCT_PUBLISHER"="Copyright Anna Zajaczkowski"
!define: "PRODUCT_WEB_SITE"="http://forums.soldat.pl"
!define: "PRODUCT_DIR_REGKEY"="Software\Microsoft\Windows\CurrentVersion\App Paths\Soldat PolyWorks.exe"
!define: "PRODUCT_UNINST_KEY"="Software\Microsoft\Windows\CurrentVersion\Uninstall\Soldat PolyWorks"
!define: "PRODUCT_UNINST_ROOT_KEY"="HKLM"
!include: "C:\Program Files (x86)\NSIS\Include\MUI.nsh" (ACP)
!include: "C:\Program Files (x86)\NSIS\Contrib\Modern UI\System.nsh" (ACP)
NSIS Modern User Interface version 1.81 - Copyright 2002-2019 Joost Verburg (C:\Program Files (x86)\NSIS\Contrib\Modern UI\System.nsh:13)
!include: closed: "C:\Program Files (x86)\NSIS\Contrib\Modern UI\System.nsh"
!include: closed: "C:\Program Files (x86)\NSIS\Include\MUI.nsh"
!define: "MUI_ABORTWARNING"=""
!define: "MUI_ICON"="PW.ico"
!define: "MUI_UNICON"="PW.ico"
!insertmacro: MUI_PAGE_WELCOME
!insertmacro: end of MUI_PAGE_WELCOME
!insertmacro: MUI_PAGE_LICENSE
!insertmacro: end of MUI_PAGE_LICENSE
!insertmacro: MUI_PAGE_DIRECTORY
!insertmacro: end of MUI_PAGE_DIRECTORY
!insertmacro: MUI_PAGE_INSTFILES
!insertmacro: end of MUI_PAGE_INSTFILES
!insertmacro: MUI_PAGE_FINISH
!insertmacro: end of MUI_PAGE_FINISH
!insertmacro: MUI_UNPAGE_INSTFILES
!insertmacro: end of MUI_UNPAGE_INSTFILES
!insertmacro: MUI_LANGUAGE
!insertmacro: end of MUI_LANGUAGE
!define: "SHCNE_ASSOCCHANGED"="0x8000000"
!define: "SHCNF_IDLIST"="0"
Name: "Soldat PolyWorks 1.5.0.13"
OutFile: "PWSetup.exe"
InstallDir: "$PROGRAMFILES\Soldat PolyWorks"
InstallRegKey: "HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\Soldat PolyWorks.exe"
ShowInstDetails: show
ShowUnInstDetails: show
Section: "MainSection" ->(SEC01)
SetOutPath: "$INSTDIR"
SetOverwrite: ifnewer
File: "Soldat PolyWorks.exe" -> no files found.
Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
/oname=outfile one_file_only)
Error in script "C:\Users\kruse\Downloads\polyworks-develop\pwinstall\pw.nsi" on line 55 -- aborting creation process

Please help!!

Scenery preview doesn't update

The scenery preview on your cursor does not update unless you move your cursor around. It's rather annoying when browsing through your list of scenery to find the one you're looking for. I just notice that you can use the preview in the ''scenery'' window, this one updates fine. However the mouse cursor is the way most people would see the preview. See picture: http://i.imgur.com/ynvGTjv.png

Actual Size center at cursor position

Short version:
View --> Actual Size will center you at cursor position instead of using the same center point as Reset View

Long version:
If you press (View --> Reset View) you end up looking nicely in the center of your working area.
This is great, but...
If you press (View --> Actual Size) you end up looking at the center of where your mouse cursor was, witch would be where the ''Actual Size'' button was at the time you pressed it.
Instead PW should use the same center position as Reset View does. Alternatively PW should center whatever is currently selected.

See image: http://i.imgur.com/QsQVgsO.png

Errors when loading map with broken waypoints

There are 2 issues:

  1. loading map with waypoints on
    • after loading there is an error message
    • after the first error message try to zoom then to get the second error message
  2. loading map with waypoints off
    • after loading enable waypoint display there to get the error message

ctf_Wonderland.zip

Leftover config files from previous install cause crash

C:\Users<YOUR_USER_NAME_HERE>\AppData\Local\VirtualStore\Program Files (x86)\Soldat PolyWorks

This folder will contain an old version of the polyworks.ini files even after uninstall.

Due to changes in the ini (default skin is now called default instead of gfx) the application will crash with following error.
image

Workaround delete this folder:
C:\Users<YOUR_USER_NAME_HERE>\AppData\Local\VirtualStore\Program Files (x86)\Soldat PolyWorks

Suggested fix:
Additional checks for ini settings should auto heal the ini file.

Replace all mentions of soldat with opensoldat after rebranding

The free and open source version of soldat is now called opensoldat to distance itself from the commercial version of soldat which was acquired recently and seems to become proprietary with a new rewrite.

In order to make sure people can differentiate between the commercial and the floss version a renaming was necessary.

All mentions of soldat in the application should therefore mention opensoldat instead.

Support for 4K HD textures

If anyone knows, what exactly needs to be done here, please comment. Otherwise I will try to figure it out by myself.

PW can't find Soldat directory

After installing PW you need to manually set the directory of Soldat in settings, otherwise you get an error message. This error message is not very explaining and I can imagine the frustration of someone who wants to try PW for the first time.

Error: http://i.imgur.com/EwdUTRD.png
Settings: http://i.imgur.com/rDvhnLY.png

I can understand if PW can't find the directory when it's installed somewhere else, but if it is installed in Soldat directory it should be able to find it. And the error message needs to be more explaining in cases where PW is installed elsewhere.

Fix other skinning issues

Elements in need of fixing:

main window:

  • Position label color

properties window:

polygon and scenery properties:

  • opacity input background color
  • bounciness input background color

Light properties

  • range input background color

preferences window:

  • other section background color
  • other section user 4 verts for scenery text cut off
  • other section user 4 verts for scenery label color

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.