Giter VIP home page Giter VIP logo

openvic's Introduction

OpenVic

Main Repo for the OpenVic Project

Quickstart Guide

For detailed instructions, view the Contributor Quickstart Guide here

System Requirements

Warning

If you are using Arch Linux, do not use the Arch repo package, it is known to break under some GDExtensions, use the official release file.

See System Requirements.

Repo Setup

  1. Clone the OpenVic Repo to a suitable folder using the git command git clone https://github.com/OpenVicProject/OpenVic.git
  2. Update the submodules by executing the git command git submodule update --init --recursive

Note that using a zip download instead of cloning means a lot of work in manually managing submodules individually. It is strongly recommended to use git to obtain the source code.

See Cloning.

Build/Run Instructions

  1. Install Godot 4.2.2 and scons for your system.
  2. Run the command git submodule update --init --recursive to retrieve all related submodules.
  3. Run scons in the project root, you should see a libopenvic file in game/bin/openvic.
  4. Open with Godot 4, click import and navigate to the game directory.
  5. Press "Import & Edit", wait for the Editor to finish re-importing assets, and then close the Editor without saving and reopen the project.
  6. Once loaded, click the play button at the top right, and you should see and hear the game application open on the main menu.

See Run, Build, and Export.

Project Export

  1. Build the extension with scons or scons target=template_debug. (or scons target=template_release for release)
  2. Open game/project.godot with Godot 4.
  3. Click Project at the top left, click Export.
  4. If you do not have the templates, you must download the templates, there is highlighted white text at the bottom of the Export subwindow that opens up the template manager for you to download.
  5. Click Export All:
    • If you built with the default or debug target you must export with Debug.
    • If you built with the release target you must export Release.
  6. Files will be found in platform specific directories in game/export:
    • On Windows run game/export/Windows/OpenVic.exe.
    • On Linux x86_64 run game/export/Linux-x86_64/OpenVic.sh.

See Run, Build, and Export.

Extension Debugging

  1. If in a clean build, build the extension with scons.
  2. Build with scons dev_build=yes.
  3. Setup your IDE so your Command/Host/Launching App is your Godot 4 binary and the Working Directory is the game directory.
  4. Start the debugger.

See Debugging.

openvic's People

Contributors

ben1152000 avatar brickpi avatar clarkecode avatar cptalansmith avatar diarmaidmckeagney avatar fakebyte avatar farmingtons9 avatar gone2daly avatar hop311 avatar isaiahwitzke avatar jarturog avatar junkjen avatar kaiserofnone avatar markomitos avatar nuruvilu avatar orwellian225 avatar rerum02 avatar spartan322 avatar typhion avatar wvpm avatar yourirombouts 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

openvic's Issues

SS-16 not documented

If no locale is specified by the user the application shall get the default locale from the system

`error C2440: '<function-style-cast>': cannot convert from 'initializer list' to 'ovdl::csv::grammar::ParseOptions<T>'` on Windows 11

Getting the below errors on Windows 11 when running 'scons' from the project root as instructed. Any ideas?

[Initial build] cl /Foextension\src\openvic-extension\singletons\GameSingleton.obj /c extension\src\openvic-extension\singletons\GameSingleton.cpp /TP /std:c++20 /nologo /utf-8 /Zc:preprocessor /MD /O2 /DTYPED_METHOD_BIND /DNOMINMAX /DWINDOWS_ENABLED /DDEBUG_ENABLED  /DDEBUG_METHODS_ENABLED /DNDEBUG /D_HAS_EXCEPTIONS=0 /Igodot-cpp\gdextension /Igodot-cpp\include /Igodot-cpp\gen\include /Iextension\deps\openvic-simulation\src /Iextension\deps\openvic-simulation\deps\openvic-dataloader\include /Iextension\deps\gli /Iextension\deps\gli\external /Iextension\src
[Initial build] scons: *** [extension\deps\openvic-simulation\src\openvic-simulation\military\Unit.windows.template_debug.x86_64.obj] Error 2
cl /Foextension\src\openvic-extension\singletons\LoadLocalisation.obj /c extension\src\openvic-extension\singletons\LoadLocalisation.cpp /TP /std:c++20 /nologo /utf-8 /Zc:preprocessor /MD /O2 /DTYPED_METHOD_BIND /DNOMINMAX /DWINDOWS_ENABLED /DDEBUG_ENABLED /DDEBUG_METHODS_ENABLED /DNDEBUG /D_HAS_EXCEPTIONS=0 /Igodot-cpp\gdextension /Igodot-cpp\include /Igodot-cpp\gen\include /Iextension\deps\openvic-simulation\src /Iextension\deps\openvic-simulation\deps\openvic-dataloader\include /Iextension\deps\gli /Iextension\deps\gli\external /Iextension\src
GameSingleton.cpp
extension\deps\openvic-simulation\deps\openvic-dataloader\src\openvic-dataloader\csv/CsvGrammar.hpp(176): error C2440: '<function-style-cast>': cannot convert from 'initializer list' to 'ovdl::csv::grammar::ParseOptions<T>'
extension\deps\openvic-simulation\deps\openvic-dataloader\src\openvic-dataloader\csv/CsvGrammar.hpp(176): note: The target type has no constructors
extension\deps\openvic-simulation\deps\openvic-dataloader\src\openvic-dataloader\csv/CsvGrammar.hpp(178): error C2440: '<function-style-cast>': cannot convert from 'initializer list' to 'ovdl::csv::grammar::ParseOptions<T>'
extension\deps\openvic-simulation\deps\openvic-dataloader\src\openvic-dataloader\csv/CsvGrammar.hpp(178): note: The target type has no constructors
extension\deps\openvic-simulation\deps\openvic-dataloader\src\openvic-dataloader\csv/CsvGrammar.hpp(180): error C2440: '<function-style-cast>': cannot convert from 'initializer list' to 'ovdl::csv::grammar::ParseOptions<T>'
extension\deps\openvic-simulation\deps\openvic-dataloader\src\openvic-dataloader\csv/CsvGrammar.hpp(180): note: The target type has no constructors
extension\deps\openvic-simulation\deps\openvic-dataloader\src\openvic-dataloader\csv/CsvGrammar.hpp(182): error C2440: '<function-style-cast>': cannot convert from 'initializer list' to 'ovdl::csv::grammar::ParseOptions<T>'
extension\deps\openvic-simulation\deps\openvic-dataloader\src\openvic-dataloader\csv/CsvGrammar.hpp(182): note: The target type has no constructors
extension\deps\openvic-simulation\deps\openvic-dataloader\src\openvic-dataloader\csv/CsvGrammar.hpp(184): error C2440: '<function-style-cast>': cannot convert from 'initializer list' to 'ovdl::csv::grammar::ParseOptions<T>'
extension\deps\openvic-simulation\deps\openvic-dataloader\src\openvic-dataloader\csv/CsvGrammar.hpp(184): note: The target type has no constructors
extension\deps\openvic-simulation\deps\openvic-dataloader\src\openvic-dataloader\csv/CsvGrammar.hpp(188): error C2440: '<function-style-cast>': cannot convert from 'initializer list' to 'ovdl::csv::grammar::ParseOptions<T>'
extension\deps\openvic-simulation\deps\openvic-dataloader\src\openvic-dataloader\csv/CsvGrammar.hpp(188): note: The target type has no constructors
extension\deps\openvic-simulation\deps\openvic-dataloader\src\openvic-dataloader\csv/CsvGrammar.hpp(190): error C2440: '<function-style-cast>': cannot convert from 'initializer list' to 'ovdl::csv::grammar::ParseOptions<T>'
extension\deps\openvic-simulation\deps\openvic-dataloader\src\openvic-dataloader\csv/CsvGrammar.hpp(190): note: The target type has no constructors
extension\deps\openvic-simulation\deps\openvic-dataloader\src\openvic-dataloader\csv/CsvGrammar.hpp(192): error C2440: '<function-style-cast>': cannot convert from 'initializer list' to 'ovdl::csv::grammar::ParseOptions<T>'
extension\deps\openvic-simulation\deps\openvic-dataloader\src\openvic-dataloader\csv/CsvGrammar.hpp(192): note: The target type has no constructors
extension\deps\openvic-simulation\deps\openvic-dataloader\src\openvic-dataloader\csv/CsvGrammar.hpp(194): error C2440: '<function-style-cast>': cannot convert from 'initializer list' to 'ovdl::csv::grammar::ParseOptions<T>'
extension\deps\openvic-simulation\deps\openvic-dataloader\src\openvic-dataloader\csv/CsvGrammar.hpp(194): note: The target type has no constructors
extension\deps\openvic-simulation\deps\openvic-dataloader\src\openvic-dataloader\csv/CsvGrammar.hpp(196): error C2440: '<function-style-cast>': cannot convert from 'initializer list' to 'ovdl::csv::grammar::ParseOptions<T>'
extension\deps\openvic-simulation\deps\openvic-dataloader\src\openvic-dataloader\csv/CsvGrammar.hpp(196): note: The target type has no constructors
LoadLocalisation.cpp
scons: *** [extension\deps\openvic-simulation\deps\openvic-dataloader\src\openvic-dataloader\csv\Parser.windows.template_debug.x86_64.obj] Error 2
scons: building terminated because of errors.

Let me know if you need any extra info from me. Thanks!

SS-68 not documented

If no locale is specified by the user the application shall get the default locale from the system

This is partially implemented as of now.

SS-10 not documented

The user shall be presented with saved settings if a user has previously set them

SS-60 not documented

If a translation for a certain locale isn't implemented it shall fall back to the language's default locale

SS-14 not documented

The user shall be able to open the Game Lobby Menu for singleplayer gameplay from the main menu

Scons tries to use GCC instead of MSVC on Windows 11

MSVC v143
SCons v4.6.0
OpenVic
following output when scons is run

scons: Reading SConscript files ...
Auto-detected 12 CPU cores available for build parallelism. Using 11 cores by default. You can override it with the -j argument.
Building for architecture x86_64 on platform windows
Auto-detected 12 CPU cores available for build parallelism. Using 11 cores by default. You can override it with the -j argument.
Building for architecture x86_64 on platform windows
Auto-detected 12 CPU cores available for build parallelism. Using 11 cores by default. You can override it with the -j argument.
Building for architecture x86_64 on platform windows
Auto-detected 12 CPU cores available for build parallelism. Using 11 cores by default. You can override it with the -j argument.
Building for architecture x86_64 on platform windows
Auto-detected 12 CPU cores available for build parallelism. Using 11 cores by default. You can override it with the -j argument.
Building for architecture x86_64 on platform windows
scons: done reading SConscript files.
scons: Building targets ...
[Initial build] g++ -o godot-cpp\src\godot.windows.template_debug.x86_64.o -c -fno-exceptions -std=c++17 -Wwrite-strings -O2 -fvisibility=hidden -DHOT_RELOAD_ENABLED -DWINDOWS_ENABLED -DDEBUG_ENABLED -DDEBUG_METHODS_ENABLED -DNDEBUG -Igodot-cpp\gdextension -Igodot-cpp\include -Igodot-cpp\gen\include godot-cpp\src\godot.cpp
[Initial build] g++ -o godot-cpp\src\classes\editor_plugin_registration.windows.template_debug.x86_64.o -c -fno-exceptions -std=c++17 -Wwrite-strings -O2 -fvisibility=hidden -DHOT_RELOAD_ENABLED -DWINDOWS_ENABLED -DDEBUG_ENABLED -DDEBUG_METHODS_ENABLED -DNDEBUG -Igodot-cpp\gdextension -Igodot-cpp\include -Igodot-cpp\gen\include godot-cpp\src\classes\editor_plugin_registration.cpp
[Initial build] g++ -o godot-cpp\src\classes\low_level.windows.template_debug.x86_64.o -c -fno-exceptions -std=c++17 -Wwrite-strings -O2 -fvisibility=hidden -DHOT_RELOAD_ENABLED -DWINDOWS_ENABLED -DDEBUG_ENABLED -DDEBUG_METHODS_ENABLED -DNDEBUG -Igodot-cpp\gdextension -Igodot-cpp\include -Igodot-cpp\gen\include godot-cpp\src\classes\low_level.cpp
[Initial build] g++ -o godot-cpp\src\classes\wrapped.windows.template_debug.x86_64.o -c -fno-exceptions -std=c++17 -Wwrite-strings -O2 -fvisibility=hidden -DHOT_RELOAD_ENABLED -DWINDOWS_ENABLED -DDEBUG_ENABLED -DDEBUG_METHODS_ENABLED -DNDEBUG -Igodot-cpp\gdextension -Igodot-cpp\include -Igodot-cpp\gen\include godot-cpp\src\classes\wrapped.cpp
[Initial build] g++ -o godot-cpp\src\core\class_db.windows.template_debug.x86_64.o -c -fno-exceptions -std=c++17 -Wwrite-strings -O2 -fvisibility=hidden -DHOT_RELOAD_ENABLED -DWINDOWS_ENABLED -DDEBUG_ENABLED -DDEBUG_METHODS_ENABLED -DNDEBUG -Igodot-cpp\gdextension -Igodot-cpp\include -Igodot-cpp\gen\include godot-cpp\src\core\class_db.cpp
[Initial build] g++ -o godot-cpp\src\core\error_macros.windows.template_debug.x86_64.o -c -fno-exceptions -std=c++17 -Wwrite-strings -O2 -fvisibility=hidden -DHOT_RELOAD_ENABLED -DWINDOWS_ENABLED -DDEBUG_ENABLED -DDEBUG_METHODS_ENABLED -DNDEBUG -Igodot-cpp\gdextension -Igodot-cpp\include -Igodot-cpp\gen\include godot-cpp\src\core\error_macros.cpp
[Initial build] g++ -o godot-cpp\src\core\memory.windows.template_debug.x86_64.o -c -fno-exceptions -std=c++17 -Wwrite-strings -O2 -fvisibility=hidden -DHOT_RELOAD_ENABLED -DWINDOWS_ENABLED -DDEBUG_ENABLED -DDEBUG_METHODS_ENABLED -DNDEBUG -Igodot-cpp\gdextension -Igodot-cpp\include -Igodot-cpp\gen\include godot-cpp\src\core\memory.cpp
[Initial build] g++ -o godot-cpp\src\core\method_bind.windows.template_debug.x86_64.o -c -fno-exceptions -std=c++17 -Wwrite-strings -O2 -fvisibility=hidden -DHOT_RELOAD_ENABLED -DWINDOWS_ENABLED -DDEBUG_ENABLED -DDEBUG_METHODS_ENABLED -DNDEBUG -Igodot-cpp\gdextension -Igodot-cpp\include -Igodot-cpp\gen\include godot-cpp\src\core\method_bind.cpp
[Initial build] g++ -o godot-cpp\src\core\object.windows.template_debug.x86_64.o -c -fno-exceptions -std=c++17 -Wwrite-strings -O2 -fvisibility=hidden -DHOT_RELOAD_ENABLED -DWINDOWS_ENABLED -DDEBUG_ENABLED -DDEBUG_METHODS_ENABLED -DNDEBUG -Igodot-cpp\gdextension -Igodot-cpp\include -Igodot-cpp\gen\include godot-cpp\src\core\object.cpp
[Initial build] g++ -o godot-cpp\src\variant\aabb.windows.template_debug.x86_64.o -c -fno-exceptions -std=c++17 -Wwrite-strings -O2 -fvisibility=hidden -DHOT_RELOAD_ENABLED -DWINDOWS_ENABLED -DDEBUG_ENABLED -DDEBUG_METHODS_ENABLED -DNDEBUG -Igodot-cpp\gdextension -Igodot-cpp\include -Igodot-cpp\gen\include godot-cpp\src\variant\aabb.cpp
[Initial build] scons: *** [godot-cpp\src\godot.windows.template_debug.x86_64.o] The system cannot find the file specified
g++ -o godot-cpp\src\variant\basis.windows.template_debug.x86_64.o -c -fno-exceptions -std=c++17 -Wwrite-strings -O2 -fvisibility=hidden -DHOT_RELOAD_ENABLED -DWINDOWS_ENABLED -DDEBUG_ENABLED -DDEBUG_METHODS_ENABLED -DNDEBUG -Igodot-cpp\gdextension -Igodot-cpp\include -Igodot-cpp\gen\include godot-cpp\src\variant\basis.cpp
scons: *** [godot-cpp\src\classes\editor_plugin_registration.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: *** [godot-cpp\src\classes\low_level.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: *** [godot-cpp\src\classes\wrapped.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: *** [godot-cpp\src\core\class_db.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: *** [godot-cpp\src\core\error_macros.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: *** [godot-cpp\src\core\memory.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: *** [godot-cpp\src\core\method_bind.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: *** [godot-cpp\src\core\object.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: *** [godot-cpp\src\variant\aabb.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: *** [godot-cpp\src\variant\basis.windows.template_debug.x86_64.o] The system cannot find the file specified
scons: building terminated because of errors.

SS-59 not documented

If no locale is specified by the user the application shall get the default locale from the system

SS-9 not documented

The user shall be presented with default settings if none have been previously set

Add Clickmasks to Victoria 2 GUIs

Victoria 2's panels are not all rectangular, most prominently the topbar panel, in Godot this can present a problem if not actively mitigated as Godot conventionally makes it Control nodes operate as rectangles. Since most of the topbar itself also uses strange non-regular shapes for its panels, the easiest way then to handle the UI mouse interactions is with a two-dimensional clickmask bit array (Godot calls it a BitMap) much like how TextureButton's click_mask functions. It needs to generate a BitMap based on a combination of the panel images with proper offsets.

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.