sourcehold / sourcehold Goto Github PK
View Code? Open in Web Editor NEWOpen source re-implementation of Stronghold 1
License: MIT License
Open source re-implementation of Stronghold 1
License: MIT License
Hi. I remembered this project exists and thought that you might find those modding tools that I'm about to show you useful in this project.
Stronghold Image Toolbox: A program that can view and modify GM1 and TGX files. http://stronghold.heavengames.com/downloads/showfile.php?fileid=4474
Official Stronghold Crusader Modding Utilities: SHC Modding Utilities made by Firefly Studios themselves. This includes an AIV Editor, a BMP to TGX Converter, and a Text Compiling Tool for SHC. https://www.fileplanet.com/archive/p-78554/Stronghold-Crusader-Modding-Utilities/download (This is a download link I could find.)
Hello metalvoidzz,
i write a new GM2 Exporter/Importer for easier editing the Images in the files but i do something wrong when i load the ByteArray for the Images
I complete to load the:
File Header
Palette
Image offset list
Image sizes list
Image Headers
Images as ByteArray
As an example i have the anim_armourer.gm1 loaded, the first picture there is 760 bytes big, but the decoding is not working right, do i have there a big mistake, maybe u can help me?
Picture of my code for decoding the bytearray:
Add kerning table in Rendering/Font.cpp
The boxes used throughout the game to display messages (menu, victory screen, etc.).
Related functions can be found in GUI/MenuUtils.cpp
.
I want to access single-instance SDL objects from a singleton:
SDL runtime RAII wrapper
Hi,
all Bink videos are playing very fast when I run the game.
It occurs after changes of 2a1902d
I have figured out that the game loop doesn't used FPS rate of the video. Here is my fix:
UIState Startup::Begin()
{
...
while(Running()) {
...
switch(currentStartupState) {
...
case STARTUP_INTRO:
...
// respect FPS of Bink video (29.97fps)
if(delta > 1.0 / intro->Fps()*2) {
startTime = now;
intro->Update();
}
Fps getter have to be added to BinkVideo class too.
In my tests the video speed was correct but the audio track sounds not clear. In addition, I have no idea why the fps have to multiply by 2.
Perhaps it is better to implement a timer directly in the Update() function of the BinkVideo class.
Suggesion: xcpretty
Status Quo
Thesis
The tgx parser will encounter errors when parsing files from the
data/gfx8/
directory.
Add configs/tools and renormalize codebase
Hi,
I am not sure whether this applies to stronghold, but it may interest you to know that in Stronghold Crusader Extreme buildings are stored in an array with buildings offset from each other by a span of 0x32C. Some things that I do know are stored for buildings within their block are owner, workers, etc.:
{ "Buildings": { "address": "0x00F9C6CA", "type": "integer", "category": "building", "owneroffset": "0x4", "workersneededoffset": "0xC6", "workersworkingoffset": "0xC8", "workersmissingoffset": "0xCA", "snoozedoffset": "0x1C4", "offset": "0x32C" } }
The current .cfg file has no specification.
My proposal is as follows.
Syntax
# This line is a comment
MusicVolume=42
# Whitespaces are ignored
Tax = .05f
Username = "Lord Stronghold"
Types
See the Wiki for details
Hi,
is the launcher made to run under Linux? At this moment I could compile the Sourcehold launcher, but I run into an error: "There appears to be no settings.ini in your installation path!"
It seems like that the settings.ini is auto generated by installation of original game. I have the original game, but I cannot run the original setup on Linux. So I never will get the settings.ini file.
For data folder I used unshield (https://github.com/twogood/unshield) to extract the cab files from original game.
Is it possible that the Sourcehold launcher creates the settings file? Thanks.
Formats: RGBA8888 (1 byte R, 1 byte G, ..)
I'd like an API to control display and input/output devices
I think people will be more interested in testing this reimplementation and maybe collaborate with some code if you show its current state with some screenshots (even early ones!).
Currently part of the UI is not rendered at all. Corresponding actions are not performed.
Here is an action plan which allows make ingame UI more or less alive:
I don't know if you are aware, but there are other Stronghold re-implementations:
I wonder if there is something useful in that repositories or if the developers want to join forces with you.
For those who find it difficult to build a project on their own.
Hey, I'm not a contributor or something like this, I am closer of a potential user.
I am giving a look since months ago and now I realize that the last update was made 8 months ago.
Did you guys abandoned this project? It would be a great loss, the Stronghold series are one of these games that would benefit a lot of an open-source game engine re-implementation.
Don't give up now.
The current master has dependencies to C++17 libraries.
Either we upgrade the codebase to use C++17, or we need to find substitutes for the following dependencies:
I'd like a guideline or template to create scenes for the game.
make it easier to follow, where and when subsystems are initialized (SDL/OpenAL/FFMPEG/..)
I propose integrating clang-format into Travis CI, to keep pull requests in check.
I like Google style, but we can decide on a modified version.
Thoughts?
while the code works, it is hard to read at first sight.
compressing all of it into smaller functions should do the trick.
Add a basic menu (in the main menu) that can contain special worlds for testing functionality. Configs for those worlds should be loaded from an easy to edit file - for example json/xml/yml, or scripts - lua/js/ts/pyton which will return intermediate file.
After adding that - remove debug placeholders from in-game world loading.
See:
Lua: http://acamara.es/blog/2012/08/running-a-lua-5-2-script-from-c/
JS: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
TS: transpiling TS to JS at the runtime and then running it as the point above
Python: https://www.codeproject.com/Articles/820116/Embedding-Python-program-in-a-C-Cplusplus-code
Note - exposing API for modding is not part of this issue. Just execute scripts, get generated json/xml/yml as the result, check if it is valid, parse and load a world with the generated config.
The title pretty much says it all, Firefly Studios recently announced the release of the Stronghold Definitive Edition, which will (or at least is trying to be) be a remaster of Stronghold 1.
What do you think of that regarding this project specifically? Will you continue or is it already pretty much dead (looks like it)? The remaster will probably address all the points you wanted to improve upon on the original game. Well, maybe all except the open-source nature of course. And oh well, I hope they make a working game and don't just release another trashy game.
Vector3<float> Position(); void Position(Vector3<float> pos);
uint8_t/uint16_t/float
Stores all of the text strings, but also additional info, most likely
where the string appears.
I'd like to use a pipeline for manipulating data, instead of passing reference counted objects.
Would you like to cooperate with the Unofficial Stronghold Crusader patch?
If yes, then all the information on this link (https://github.com/Sh0wdown/UnofficialCrusaderPatch/issues)
And write @Sh0wdown he is the main developer ,or create a Topic.
I think the CMakeLists needs some tidying up, alas moving it to to a more modern version.
std::unique_ptr
After running the project, all the options in the game do not have text descriptions or options to enter the game. Is this normal? What should I do if I want the project to play normally
The Discord link on the README is invalid:
https://discordapp.com/invite/736X9H
Also, I just want to say, I'm excited to see this project. Really love Stronghold Crusader and I hope to be able to contribute.
Can someone tell me how to obtain the data file, or can you send me a copy directly. I'm stuck in the last step, God bless me
Create a very simple ECS
One that can be rewritten in the future, so implementation should be done in a separate folder and the main code should call API of ECS.
Add Deer entity
Add system that can render deer
Make it in a way that is can be easily used for other entities
Add system that is teleporting deers (nearby coordinates) on the map
The throw-away system will be removed in the future, just to make things blink for now.
I want to make a proper movement system as the follow-up.
If somebody has knowledge about spawn spread pattern, please write and discuss in the comments :)
(not part of this one - just discussion point, excluded for the future:)
As you know, I have started cleaning up CMakeLists.txt and while doing so added imported targets like this:
find_package(OpenAL REQUIRED)
add_library(OpenAL::OpenAL UNKNOWN IMPORTED)
set_target_properties(OpenAL::OpenAL PROPERTIES
IMPORTED_LOCATION ${OPENAL_LIBRARY}
INTERFACE_INCLUDE_DIRECTORIES ${OPENAL_INCLUDE_DIR})
As it turns out, on MacOS this will not fly, since it fails to link frameworks correctly.
As a result, I have found this solution:
find_package(OpenAL REQUIRED)
if(APPLE)
add_library(OpenAL::OpenAL INTERFACE IMPORTED)
set_target_properties(OpenAL::OpenAL PROPERTIES
APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${OPENAL_LIBRARY}
INTERFACE_INCLUDE_DIRECTORIES ${OPENAL_INCLUDE_DIR})
else()
add_library(OpenAL::OpenAL UNKNOWN IMPORTED)
set_target_properties(OpenAL::OpenAL PROPERTIES
IMPORTED_LOCATION ${OPENAL_LIBRARY}
INTERFACE_INCLUDE_DIRECTORIES ${OPENAL_INCLUDE_DIR})
endif()
MacOS should build fine now.
First of all, thank you very much for this project! Stronghold Crusader was a big part of my youth and even though I never really played Stronghold 1 itself, being able to play a FOSS version of it on my favorite OS (Linux) natively is absolutely awesome!
After linking my Stronghold 1 installation to the directory the application seems to expect (../data
), the game loads up fine. However, the console logs various parser errors.
[ GAME ] -> Starting version 0.1.4 (Linux)
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
[ GAME ] -> Detected edition: Stronghold HD
[ GAME ] -> Done
[ PARSERS ] -> Unable to open Gm1 file '../data/../data/gm/body_deer.gm1'!
[ PARSERS ] -> Unable to open Gm1 file '../data/../data/gm/body_lord.gm1'!
[ PARSERS ] -> Unable to open Gm1 file '../data/../data/gm/tree_apple.gm1'!
[ PARSERS ] -> Unable to open Gm1 file '../data/../data/gm/tree_birch.gm1'!
[ PARSERS ] -> Unable to open Gm1 file '../data/../data/gm/Tree_Chestnut.gm1'!
[ PARSERS ] -> Unable to open Gm1 file '../data/../data/gm/tree_oak.gm1'!
[ PARSERS ] -> Unable to open Gm1 file '../data/../data/gm/tree_pine.gm1'!
[ PARSERS ] -> Unable to open Gm1 file '../data/../data/gm/tree_shrub1.gm1'!
[ PARSERS ] -> Unable to open Gm1 file '../data/../data/gm/tree_shrub2.gm1'!
[ PARSERS ] -> Unable to open Tgx file '"../data/gfx/logo2.tgx"'!
Is this to be expected in the current stage of development and should I just have patience, or is something going wrong here?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.