Temple of The Roguelike Forums
Announcements => Traditional Roguelikes (Turn Based) => Topic started by: chooseusername on March 15, 2014, 09:25:27 PM
-
See the Incursion news page (http://www.incursion-roguelike.org/news.html).
Source code is available in bitbucket incursion-roguelike repo (https://bitbucket.org/rmtew/incursion-roguelike).
github repo deleted.
-
I guess it's interesting to see how bad it is. And is someone able to fix any of it.
-
looks like good news to me, hopefully we can see some good things come out of it
-
EEEEK!
1) Am I dreaming or what?
2) It's happening!
3) Oh my god, he's even mentioned Veins of the Earth!
*promptly faints*
-
This is a good thing. I would like to think this will get ultimately situated, considering what people have managed with Cataclysm 1(which was also considered to be very hacked together) after the fact.
-
Some sources (https://groups.google.com/forum/#!topic/incursion/VqMTcEMYC2Y) have been released. I'll try and get them into a working form, and upload them to github at some later stage.
I wouldn't guarantee that it will ever work. Note that Incursion contains a custom scripting language, and compiles it into C++ as I understand it. It's a little more complicated than Cataclysm would have been.
-
Some sources (https://groups.google.com/forum/#!topic/incursion/VqMTcEMYC2Y) have been released. I'll try and get them into a working form, and upload them to github at some later stage.
I wouldn't guarantee that it will ever work. Note that Incursion contains a custom scripting language, and compiles it into C++ as I understand it. It's a little more complicated than Cataclysm would have been.
I've got it compiling and working, in a cobbled together form. Once I've ensured that the cobbled together form is correct, will check something into github.
In the meantime, here are the compilation instructions:
- Get Incursion-0.6.9H3s.rar. Extract the contents of the included folder in D:\incursion.
- Get More-0.6.5B.rar. Extract the contents of the included folder in D:\incursion.
- Add the rle.c/.h and lz.c/.h source files and header to the VC project.
- Remove the step that regenerates yygram.cpp/yygram.h, as this requires the modified accent tool which is not yet provided by Julian. Ensure you still have the pregenerated src/yygram.cpp and inc/yygram.h that came with the rar.
- Add return types to all the function definitions to in yygram.cpp, as times have changed and these are now needed.
- Get allegro-msvc9-4.2.3.zip and extract so bin and lib are under the d:\incursion\allegro directory.
- Get from allegro site dx70_min.zip and extract. Add lib and bin paths to project.
- Build. Fix the trivial other errors.
- Copy D:\incursion\Glyphs.bmp (from the earlier More-0.6.5B.rar) to d:\incursion\NGlyphs.bmp
- Make the directory d:\incursion\save (or it will crash when the directory is used)
- Make the directory d:\incursion\log (or it will crash when the directory is used)
- Copy the directory d:\incursion\mod from the 0.6.9I binary release. You can compile the lib\*.irh files by running your built incursion into a mod, but that mod will trip assertions and will seem to be faulty.
- Run and you'll see something like the following. You can debug it and it will find the files in the right place (under D:\incursion)
You can add the font bmp onto the executable with exedat, which is an allegro thing (accessed via a call to load_datafile('#')). If you do this, it won't need to be placed in the given directory as NGlyphs.bmp.
Getting it working as well as the latest release bugs:
- There is slight font character corruption. Given we have Glyphs.bmp, and the code wants NGlyphs.bmp, I suspect there is a newer missing version of this file. The updated bmp can be extracted from the 0.6.9I exe using the allegro grabber executable.
- The module in the mod directory does not compile in a bug free fashion, and crashes. The borrowed one from the official later release works..
(http://i.imgur.com/4DlaJsZ.jpg) (http://imgur.com/4DlaJsZ)
Edit: This has been updated with minor changes according to what I've learnt.
-
Great, wasn't expecting the sources so soon.
Can't wait to see the source on git.
-
200k lines of code, including scripts. I am impressed.
-
That is wonderful news.
As always,
Minotauros
-
Wow, you work fast! It's really cool to see a community like this.
-
Fast? No, typically getting projects working that are somewhat old and use a toolkit like allegro or SDL, is quite easy. The work required was the basic stuff.
Here's the github project: https://github.com/rmtew/incursion-roguelike (https://github.com/rmtew/incursion-roguelike)
Note that there's no code there yet, adding the code is the most complicated part, if I want to contrive a version history. And Julian might come up with other versions of the code to factor in yet.
-
Must download the zip first chance I get.
I bet there's a lot of awesome goodness in those 200k lines of code.
-
I bet there's a lot of awesome goodness in those 200k lines of code.
A lot of mess, I'd say. Sure, there must be *something* buried deep inside, some great design work, but it would be probably impossible to read by anyone except the author of the code. Hell, it turned out to be impossible to read by the author himself (he called it "very tangled"). It's probably better to analyse the game, not the code, if you want to learn something.
-
Fast? No, typically getting projects working that are somewhat old and use a toolkit like allegro or SDL, is quite easy. The work required was the basic stuff.
Here's the github project: https://github.com/rmtew/incursion-roguelike (https://github.com/rmtew/incursion-roguelike)
Note that there's no code there yet, adding the code is the most complicated part, if I want to contrive a version history. And Julian might come up with other versions of the code to factor in yet.
I've checked in the source code. Anyone who wants to compile it and is using Windows, may do so. Instructions are provided in the README file.
Cheers.
-
What sources are those actually? Tell me when it's released so I can check it out.
-
What sources are those actually? Tell me when it's released so I can check it out.
It's released: https://github.com/rmtew/incursion-roguelike (https://github.com/rmtew/incursion-roguelike)
-
It's C++, but has lots of bad programming styles. Looking at couple of source code files I noticed at least these:
-lots of nested blocks
-no comments of any kind (seriously!)
-bad, cryptic variable names
-raw arrays
-string class (at least, there may be more those)
-repeating blocks of source code that could be a function
The usual stuff. The lack of comments is odd and it goes really badly with those cryptic names.
-
Any poor newbie going for the (copy-paste) kill is up for a surprise and a lot of wasted time :) Game-centric approach as mentioned by TheCreator looks best for such a behemoth, if even possible.
-
I find all the comments about the source code to be overly dramatic. Anyone hoping for copy-paste to work, is definitely a newbie to start with. I know of few programs where cut and paste will work easily in that way. The code, while not meeting today's standards, is actually pretty good for what it is. I've worked with a lot worse, and this project is relatively easy to follow so far.
I've got bugs to fix in other non-gaming projects, and I'm looking forward to working on the Incursion bugs as it is going to be a lot more straightforward.
Said as someone who has actually worked on the code.
-
I've worked with a lot worse, and this project is relatively easy to follow so far.
The structure of the source doesn't seem to be that bad actually, from the small fraction I've seen, even though I just noticed that there are also pure C parts. It sure could be worse, but when you know thing or two about bad programming styles it's obvious to comment about them. Raw arrays alone, there seem to be them everywhere. Not smart, from my experience it's array overflows that produce those difficult to find memory corruption bugs.
-
I find all the comments about the source code to be overly dramatic. Anyone hoping for copy-paste to work, is definitely a newbie to start with. I know of few programs where cut and paste will work easily in that way. The code, while not meeting today's standards, is actually pretty good for what it is. I've worked with a lot worse, and this project is relatively easy to follow so far.
I've got bugs to fix in other non-gaming projects, and I'm looking forward to working on the Incursion bugs as it is going to be a lot more straightforward.
Said as someone who has actually worked on the code.
Great.
As it's on git, I'd appreciate it if people who understand the code put comments in. I like the way the tunneling code is set up, with human-readable cardinal directions, but I'm having problems with making heads or tails of it, let alone more complex things.
-
Great.
As it's on git, I'd appreciate it if people who understand the code put comments in. I like the way the tunneling code is set up, with human-readable cardinal directions, but I'm having problems with making heads or tails of it, let alone more complex things.
When you find the person who is going to write these comments for you, they're welcome to submit a pull request :)
-
Add magic numbers to the list. From sources it looks like Incursion was developed during 1999-2003, but wasn't it released much later?
-
Are you sure you're not referring to the generated source, whether from flex or accent? Those tools will likely have their own comments, dates and so forth unrelated to when incursion was written.
-
Are you sure you're not referring to the generated source, whether from flex or accent? Those tools will likely have their own comments, dates and so forth unrelated to when incursion was written.
No, you're right.
D:\VCS\GIT\Roguelike\incursion-roguelike\src\Tokens.cpp(474):/* TOKENS.LEX -- Copyright (c) 1999-2003 Julian Mensch
D:\VCS\GIT\Roguelike\incursion-roguelike\src\yygram.cpp(3):/* GRAMMAR.ACC -- Copyright (c) 1999-2003 Julian Mensch
D:\VCS\GIT\Roguelike\incursion-roguelike\inc\Api.h(1):/* API.H -- Copyright (c) 1999-2003 Julian Mensch
D:\VCS\GIT\Roguelike\incursion-roguelike\inc\Base.h(1):/* BASE.H -- Copyright (c) 1999-2003 Julian Mensch
D:\VCS\GIT\Roguelike\incursion-roguelike\inc\Creature.h(1):/* CREATURE.H -- Copyright (c) 1999-2003 Julian Mensch
D:\VCS\GIT\Roguelike\incursion-roguelike\inc\Defines.h(1):/* DEFINES.H -- Copyright (c) 1999-2003 Julian Mensch
D:\VCS\GIT\Roguelike\incursion-roguelike\inc\Events.h(1):/* EVENTS.H -- Copyright (c) 1999-2003 Julian Mensch
D:\VCS\GIT\Roguelike\incursion-roguelike\inc\Feature.h(1):/* FEATURE.H -- Copyright (c) 1999-2003 Julian Mensch
D:\VCS\GIT\Roguelike\incursion-roguelike\inc\Globals.h(1):/* GLOBALS.H -- Copyright (c) 1999-2003 Julian Mensch
D:\VCS\GIT\Roguelike\incursion-roguelike\inc\Incursion.h(1):/* INCURSION.H -- Copyright (c) 1999-2003 Julian Mensch
D:\VCS\GIT\Roguelike\incursion-roguelike\inc\Inline.h(1):/* INLINE.H -- Copyright (c) 1999-2003 Julian Mensch
D:\VCS\GIT\Roguelike\incursion-roguelike\inc\Item.h(1):/* ITEM.H -- Copyright (c) 1999-2003 Julian Mensch
-
The latest version of incursion pushed to github has a new libtcod backend to replace the existing allegro one.
Anyone planning to compile this needs to know that it requires a libtcod with slight modifications, namely to #ifdef out the basic type definitions in libtcod with TCOD_SKIP_ELEMENTARYTYPES.
Anyone hoping to play this needs to know that they need to compile their own binaries and that as seen in the image, there is some colour loss. This will be tracked down at some stage, but the game should be otherwise as playable as the allegro version was + this problem.
(http://i.imgur.com/kFgVyRM.png) (http://imgur.com/kFgVyRM)
-
I wish I could compile this *resumes glaring at Visual Studio 2008 and its sheer size*
-
I wish I could compile this *resumes glaring at Visual Studio 2008 and its sheer size*
What's wrong with the size of Visual Studio? I installed the Express version with the installer years ago and its only a couple hundred meg. The ISO linked is large because it's the only version of 2008 that can still be downloaded. If you've got another later version of VS installed, I don't see why it shouldn't work as well.
If I recall, the only reason we're using VS2008 is that Julian's addon for his incursionscript only works with it. BUT Julian hasn't provided the addon, so that's a moot point. And besides, it wouldn't work with the Express versions anyway, as they don't allow addons or plugins.
There's no reason you can't make a makefile and use mingw or whatever to compile for that matter.
-
Note, I've moved my repo of the source code from github to bitbucket.
The new incursion-roguelike (https://bitbucket.org/rmtew/incursion-roguelike) bitbucket repo.
-
"Only a couple hundred meg" is A LOT for me and I don't have any other versions of VS.
If I got instructions on how to compile with mingw or something, I'd be very happy (note, the only game I compiled was Oolite and I got very clear instructions, otherwise I suck at it)
-
"Only a couple hundred meg" is A LOT for me and I don't have any other versions of VS.
If I got instructions on how to compile with mingw or something, I'd be very happy (note, the only game I compiled was Oolite and I got very clear instructions, otherwise I suck at it)
Well, you could go to a library and use the internet there for larger downloads. It's what I do.
I can't help with compiling with mingw. I suggest you look into writing a makefile, and just go from there. Could be a nice learning experience for you. It's pretty basic stuff.
-
"Only a couple hundred meg" is A LOT for me and I don't have any other versions of VS.
Downloading is the problem or disk space? You must have an old PC. My VS2010 folder seems to take 379Mb, it's not that big in modern perspective. Code::Blocks is 250Mb so it's almost in the same scale.
-
Downloading, not disk space...
-
I had to try and compile this (on and for Linux).
I take it the current sources come with everything needed to later run it as well?
I used vcproj2cmake to get a make instructions for Linux going (I am kinda clueless when it comes to porting and writing Makefiles from scratch).
I had to comment out a program.i source (which seems to should get generated during the build process?) also the NOTES stuff.
I actually got to the point where it gave me the shiny Incursion executable but alas it segfaults right after opening the Options.Dat (which I had to copy from the latest official binary release).
FWIW: I am using libtcod 1.5.1
EDIT: Similar "success" with winelib.
also FWIW: added "#include <unistd.h>" to Wlibtcod.cpp
-
The instructions in README.md contain all the necessary instructions for building it on Windows. Following those, nothing else is needed that is not detailed in that file.
options.dat did not come with the latest binaries. It is generated by incursion to store your options data - the defaults are programmed into the source code, so there is no need to distribute this.
program.i is irrelevant. I believe it is part of the module compilation, and you should be able to delete it's entry from the makefile. Incursion when built can make it on demand, when the user compiles the module in a debug build from the main menu. And it is not used in compiling incursion itself.
I cannot help you otherwise as I do not have the required information. But thanks for trying to compile it -- you're the first to try as far as I know.
-
In the debugger it looked like the Segfault occured somewhere around "0xb7fbaf7c in TCOD_sys_get_current_resolution ()"
That led me to look into the way I dealt with that again and swap libtcod.so in the final linking for the (slightly edited) -llibtcod (just leaving out the lib part because another "lib" is getting prefixed) man-page: "The linker searches a standard list of directories for the library, which is actually a file named liblibrary.a"
The reason might be that I do not actually have libtcod properly installed I am only adding the path I built libtcod.so in with LD_LIBRARY_PATH.*
What is a bit weird is that with the libtcod.a instead of libtcod.so approach to the final linking it now does not produce the binary but complains about undefined references to the ACCENT things (yygrammar yyerror ...).
EDIT: * actually I do not think that is an issue, the gcc man-page further says on the topic of the -l library switch: "The linker handles an archive file by scanning through it for members which define symbols that have so far been referenced but not defined."
So, this seems to be the reason it is now more strict when linking everything into the final executable.
You wrote: "Remove the step that regenerates yygram.cpp/yygram.h, as this requires the modified accent tool which is not yet provided by Julian. Ensure you still have the pregenerated src/yygram.cpp and inc/yygram.h that came with the rar." So I take it ACCENT is optional and would only be needed if say own custom mods should work?
And an ACCENT that does not have some edits Julian made to it would be of no use to me?
There is my segfault happening, Wlibtcod.cpp :360
" theGame = new Game();
{
AT1 = new libtcodTerm;
AT1->SetIncursionDirectory(executablePath);
T1 = AT1;
// ww: otherwise we segfault checking options
T1->SetPlayer(NULL);
T1->Initialize();
//T1->Title();
}
"
Hmm, or more like line 677 "TCOD_sys_get_current_resolution(&res_w,&res_h);" debugger turned that up with what seems to have been a more proper go at it
"Added support for libtcod backend as an alternative to Allegro4.2. Currently some colour loss, but otherwise appears to work. Requires slightly modified libtcod & SDL2 to work."
I had built libtcod 1.5.1 against libSDL not libSDL2, tried libSDL2 but something did not work out, well I would be missing any modifications to SDL2 whatsoever. The libtcod patch you provided was applied either way. Is there one for SDL2, too?
Oh, okay there is a libSDL.so in the libtcod archive. But it also wants other libs (directfb and fusion and quite old versions of those).
Meh, using that supplied libSDL.so and giving it the newer dependency libs instead of the old ones it is expecting still segfaults at that TCOD function call at 677 in Wlibtcod
enough for now
-
In the debugger it looked like the Segfault occured somewhere around "0xb7fbaf7c in TCOD_sys_get_current_resolution ()"
Yes, this is a problem with how you've built libtcod, or something. I can't really help with that.
Note that libtcod uses a specific SDL2 version, and comes with makefiles to build against it.
Accent is not needed at all, and we do not have the modified version anyway.
-
Hi, which version of the lib do you mean, 1.5.1 as well?
Yes, my current problem lies somewhere with or beyond libtcod.
Lots of things to try left and if all fails going back to allegro is another option.
Really hope on getting a natively compiled-on-my-box version of the sources running.
Now the overdue:
Thanks for your work on them.
-
Hi, which version of the lib do you mean, 1.5.1 as well?
I use a messy modified version (https://bitbucket.org/rmtew/libtcod). But any version should work.
-
It's running. ;D
Built the debug libtcod and then was fortunately led to the good advice on the net to add
SDL_Init(SDL_INIT_VIDEO);
before
const SDL_VideoInfo* vInfo = SDL_GetVideoInfo();
and calls to ->current_w;
in src/sys_sdl_c.c of libtcod.
But the Incursion.mod I took from 0.6.9H4L apparently does not work with this version (which gets displayed as Y1 in the menu although I cloned when Y2 was already commited. *shrugs* (I'm on 85bff5d420f2839c8e11bc004a522b9c6f51a8a1, I dealt with case-sensitiveness in quite a haphazard way so it is a bit more work pulling in your latest additions).
It is not able to built the file either. Maybe because I did not put the irh files anywhere?
"Incursion when built can make it on demand, when the user compiles the module in a debug build from the main menu."
Darn I cannot, I guess other module files from other versions may not help either.
Thanks again.
EDIT: Seems that module issue has to do with the setting of the IncursionDirectory apparently not being portable? (The culprit may actually be in the Registry.cpp, dunno)
I got it halfway working with slotting that in the IncursionDirectory part in Wlibtcod
char *str2 = strrchr(argv[0], '\\');
if (str == NULL) {
IncursionDirectory = getcwd(str2, 256);
IncursionDirectory += "/";
Which of course is not portable either, also I think I am producing the segfault which happens in the 'Compile Resources' menu entry with that maybe somehow.
-
Recently compiled a good new version on Windows.
(The commits in the repo after the last uploaded release were finally bait/lure enough, also incorporated the open PR and a variant to a suggestion from another issue regarding attribute training).
Thanks once more for all the great work, always feels good to stand on the shoulders of giants. :D
Here it is (just an unofficial release without the source, though):
https://fastupload.io/zk1gvLZIpKYg6fo/file
SHA-256 69b47b930521823be76b024584c8078205d5caa77e5fd0a607f6f0d09fd5c2ae
SHA-512 f71484b715d3c2ae7d17c89a141f2e58d143d28bd65a70bf7dcf3767c65b71b3e98e9b6d12224dd3d4d4a9d118f5519989247df38994ac84da2a7cf409760882
Also, while I supply checksums here I did not scan it for malware on my build machine or online specifically before uploading it there.
'[...] "AS IS" [...]' as they say.
EDIT: Got the journal table with exploration stats to display properly again as well (this is not included in the linked to download, which will no longer function in a few days anyway unless it keeps getting some traffic).