Author Topic: Incursion source release is here!  (Read 44819 times)

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Pending Incursion source release
« Reply #15 on: March 19, 2014, 08:40:08 AM »
What sources are those actually? Tell me when it's released so I can check it out.

Zireael

  • Rogueliker
  • ***
  • Posts: 604
  • Karma: +0/-0
    • View Profile
Re: Pending Incursion source release
« Reply #16 on: March 19, 2014, 09:31:07 AM »
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

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Pending Incursion source release
« Reply #17 on: March 19, 2014, 12:37:29 PM »
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.
« Last Edit: March 19, 2014, 12:42:08 PM by Krice »

reaver

  • Rogueliker
  • ***
  • Posts: 207
  • Karma: +0/-0
    • View Profile
Re: Pending Incursion source release
« Reply #18 on: March 19, 2014, 01:07:40 PM »
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.

chooseusername

  • Rogueliker
  • ***
  • Posts: 329
  • Karma: +0/-0
    • View Profile
    • Email
Re: Pending Incursion source release
« Reply #19 on: March 19, 2014, 06:19:15 PM »
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.

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Pending Incursion source release
« Reply #20 on: March 19, 2014, 06:39:22 PM »
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.

Zireael

  • Rogueliker
  • ***
  • Posts: 604
  • Karma: +0/-0
    • View Profile
Re: Pending Incursion source release
« Reply #21 on: March 19, 2014, 07:08:08 PM »
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.

chooseusername

  • Rogueliker
  • ***
  • Posts: 329
  • Karma: +0/-0
    • View Profile
    • Email
Re: Pending Incursion source release
« Reply #22 on: March 20, 2014, 12:29:30 AM »
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  :)

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Pending Incursion source release
« Reply #23 on: March 20, 2014, 10:07:30 AM »
Add magic numbers to the list. From sources it looks like Incursion was developed during 1999-2003, but wasn't it released much later?

chooseusername

  • Rogueliker
  • ***
  • Posts: 329
  • Karma: +0/-0
    • View Profile
    • Email
Re: Pending Incursion source release
« Reply #24 on: March 20, 2014, 07:36:00 PM »
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.

chooseusername

  • Rogueliker
  • ***
  • Posts: 329
  • Karma: +0/-0
    • View Profile
    • Email
Re: Pending Incursion source release
« Reply #25 on: March 20, 2014, 08:02:00 PM »
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.
Quote
  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

chooseusername

  • Rogueliker
  • ***
  • Posts: 329
  • Karma: +0/-0
    • View Profile
    • Email
Re: Incursion source release is here!
« Reply #26 on: March 23, 2014, 10:23:02 PM »
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.


Zireael

  • Rogueliker
  • ***
  • Posts: 604
  • Karma: +0/-0
    • View Profile
Re: Incursion source release is here!
« Reply #27 on: March 24, 2014, 07:47:23 AM »
I wish I could compile this *resumes glaring at Visual Studio 2008 and its sheer size*

chooseusername

  • Rogueliker
  • ***
  • Posts: 329
  • Karma: +0/-0
    • View Profile
    • Email
Re: Incursion source release is here!
« Reply #28 on: March 24, 2014, 07:53:33 PM »
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.
« Last Edit: March 24, 2014, 07:56:33 PM by chooseusername »

chooseusername

  • Rogueliker
  • ***
  • Posts: 329
  • Karma: +0/-0
    • View Profile
    • Email
Re: Incursion source release is here!
« Reply #29 on: March 24, 2014, 08:27:18 PM »
Note, I've moved my repo of the source code from github to bitbucket.

The new incursion-roguelike bitbucket repo.