Author Topic: Warlock of Firetop Mountain version 1.0.0 RC 06  (Read 22343 times)

corremn

  • Rogueliker
  • ***
  • Posts: 700
  • Karma: +0/-0
  • SewerJack Extraordinaire
    • View Profile
    • Demise RogueLike Games
Warlock of Firetop Mountain version 1.0.0 RC 06
« on: October 31, 2018, 01:00:19 PM »
LATEST VERSION

Hi, after some inpiration by Virtua Sinner and his Youtube play through (which is awesome btw) - Video - I have released a new version. And added a Save feature. :o  Fixed a bunch of stuff and what not.  I am close to an official 1.0 version. Cheers

So I present to you the new and improved adaptation of The Warlock of Firetop Mountain.

Deep in the caverns beneath Firetop Mountain lies an untold wealth of treasure, guarded by a powerful Warlock, or so the rumour goes.
Several adventurers like yourself have set off for Firetop Mountain in search of the Warlock's hoard. None have ever returned. Do you dare follow them?

You take the role of an adventurer on a quest to find the treasure of a powerful Warlock, hidden deep within Firetop Mountain.
People from a nearby village advise that the treasure is stored in a chest with two locks, and that the keys are guarded by various creatures within the dungeons.
You approach the shadow of the great mountain.

The local villages have warned you that the entrance is well guarded...

Good luck!


Homepage:
Files




I personally think it looks beautiful - done with the freetype2 lib

FYI

version 1.0.0 RC 06 31/10/2018
==============================
- Added Save/Load game
- Fixed in game help command list
- 'Continuous run' halts on different conditions
- Fixed cave levels not looking like a cave
- Removed 'x' as cancel in inventory
- Fixed poison resistance armour
- Luck can save you from poison death
- Status line changes colour to reflect ailment
- Tower shield renamed to cresent shield
- Added bats
- Added rotten planks (bridge)
- Modified dog
- Small chance teleports disappear on use
- Experience level starts at level 1
- More experience required to level up
- You no longer have the option to choose not to rest
corremn's Roguelikes. To admit defeat is to blaspheme against the Emperor.  Warhammer 40000 the Roguelike

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Warlock of Firetop Mountain version 1.0.0 RC 06
« Reply #1 on: November 01, 2018, 07:22:03 AM »
It's a nice looking game, but has some input problems which are always so pesky. In Finnish keyboard I get only '<' letter when I input the name of character, which is kind of hilarious, but it fires an exception at the end when trying to quit, when it tries to load(?) the file with that name. Then obviously the usual problems with keys like ? and > which also don't work, because in Finnish keyboard layout they both require shift keypress.

corremn

  • Rogueliker
  • ***
  • Posts: 700
  • Karma: +0/-0
  • SewerJack Extraordinaire
    • View Profile
    • Demise RogueLike Games
Re: Warlock of Firetop Mountain version 1.0.0 RC 06
« Reply #2 on: November 01, 2018, 08:16:53 AM »
Thanks Krice. The input issues will be looked at next release, I will replace all non alpha-numeric + Shift.

As for the exception I guess if your character name is an invalid windows filename (i.e ">>>>" then things will go bad.  You can probably edit name in the savegame.dat file.

Hey Krice, while you are being nice, can you re-download the game and see if the '<' and '>' and '?' work for you?
« Last Edit: November 01, 2018, 12:54:56 PM by corremn »
corremn's Roguelikes. To admit defeat is to blaspheme against the Emperor.  Warhammer 40000 the Roguelike

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Warlock of Firetop Mountain version 1.0.0 RC 06
« Reply #3 on: November 02, 2018, 07:27:06 AM »
Doesn't work. Also noticed when it's asking the name if you press shift it will also type < letter, but that's how low level key routines tend to work. My get key routine in SDL2 takes out modifier keys as normal key presses, so they don't cause confusion.

Btw, when I randomly look at your code I noticed things like this:
Code: [Select]
Coord * pos = player->getPosition();
Coord new_pos;
new_pos.x = pos->x;
new_pos.y = pos->y;

switch (run_dir)
{
case dNorth: new_pos.y--; break;
case dEast:  new_pos.x++; break;
case dSouth: new_pos.y++; break;
case dWest:  new_pos.x--; break;

case dNorthEast: new_pos.x++; new_pos.y--; break;
case dSouthEast: new_pos.x++; new_pos.y++; break;
case dSouthWest: new_pos.x--; new_pos.y++; break;
case dNorthWest: new_pos.x--; new_pos.y--; break;

case dWait: return 2;
}

And that stuff is repeating so many times! What you should do is first make a constructor for Coord that takes pos as argument, so you can copy x,y in constructor and don't have to set them manually like that. Then create a function Coord::MoveToDirection(int direction) which will handle those directions to Coord changes. Make it return true if the position was changed so you can check special cases like that dWait. And while I'm at it, change stuff like dWait (hungarian or whatever notation) to namespace. I'm using 'way' as namespace for directions, it's sweet and short.

I think you really should have a keyboard get routine that handles that VK keys array. Maybe one to turn keys into ascii and other to return gameplay command type etc. When I look at StartScreen::GetName I don't know why it changes everything to < (maybe that pName.append, it looks suspicious) but I think the shift key if should be if (shift && i < 65) rather than ||.
« Last Edit: November 02, 2018, 08:31:56 AM by Krice »

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Warlock of Firetop Mountain version 1.0.0 RC 06
« Reply #4 on: November 02, 2018, 10:05:20 AM »
Here is how I would rewrite this part of GetName. You did know that std::string can take char when you just push_back it?

Code: [Select]
    char c=-1;
 
    for (int i = 48; i < 123; i++) //alpha keys only
    {
        if (keys[i])
        {
            c=(char)i;
            break;
        }
    }

    if (c==-1) return 0;

    if (shift && c>='a') c-=32;

    pName.push_back(c);
    length++;

corremn

  • Rogueliker
  • ***
  • Posts: 700
  • Karma: +0/-0
  • SewerJack Extraordinaire
    • View Profile
    • Demise RogueLike Games
Re: Warlock of Firetop Mountain version 1.0.0 RC 06
« Reply #5 on: November 02, 2018, 11:14:25 AM »
Thanks Krice, just so you know this code is 12 years old and there is a lot of really bad code. I mean this game is really what I used to teach me C++. Now I am just trying to finish a game release. I am trying not to re-factor code.  As you can see no one should ever be looking at this code to learn how to program in C++.

Anyway, I have updated the binary to fix  your issues. They '>' issue was actually from me ironically trying to fix your finish keyboard issues at some time or another.  Instead of trying to fix it I have given alternative keys for help and stairs, 'h' for help and 'E' to enter levels.
corremn's Roguelikes. To admit defeat is to blaspheme against the Emperor.  Warhammer 40000 the Roguelike

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Warlock of Firetop Mountain version 1.0.0 RC 06
« Reply #6 on: November 02, 2018, 11:51:56 AM »
Thanks Krice, just so you know this code is 12 years old and there is a lot of really bad code.

Only 12 years? That's still fresh code for a roguelike. Even my secondary new roguelike Teemu is already 10 years old project. Anyway, you should always rewrite bad code, it's not a good excuse if the code is "old". Of course, sometimes refactoring is not needed if the code works and doesn't become a maintaining problem (it can later become that).

corremn

  • Rogueliker
  • ***
  • Posts: 700
  • Karma: +0/-0
  • SewerJack Extraordinaire
    • View Profile
    • Demise RogueLike Games
Re: Warlock of Firetop Mountain version 1.0.0 RC 06
« Reply #7 on: November 02, 2018, 12:33:36 PM »
I have refactored this code, many times over, this is mostly my original code from 12 years ago.  The game is 99% done and does not warrant drastic changes IMHO.

That being said I totally agree with you, this just happens to be a project from the past I want to be done with.

I want to leave this world with completed roguelike game. My tombstone will say "He didn't do much, but at least left the world one completed roguelike."
corremn's Roguelikes. To admit defeat is to blaspheme against the Emperor.  Warhammer 40000 the Roguelike

Tzan

  • Rogueliker
  • ***
  • Posts: 193
  • Karma: +0/-0
    • View Profile
Re: Warlock of Firetop Mountain version 1.0.0 RC 06
« Reply #8 on: November 02, 2018, 04:46:50 PM »
"He didn't do much, but at least left the world one completed roguelike."

  :)

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Warlock of Firetop Mountain version 1.0.0 RC 06
« Reply #9 on: November 03, 2018, 11:58:26 AM »
I have refactored this code, many times over, this is mostly my original code from 12 years ago.  The game is 99% done and does not warrant drastic changes IMHO.

The source code available is old code? Besides, roguelikes are never 99% done, at most they are 50% done which is always the case. Refactoring can be seen as "bad" thing to do, but I think it's not just refactoring and waste of time, it's also becoming a better programmer when you find out new, better ways to do things. In C++ particular creating a "foundation" class library of small data type classes (like Coord class for location of objects etc.) with required functionality is never a waste of time, because you can reuse that code easily in new projects.

corremn

  • Rogueliker
  • ***
  • Posts: 700
  • Karma: +0/-0
  • SewerJack Extraordinaire
    • View Profile
    • Demise RogueLike Games
Re: Warlock of Firetop Mountain version 1.0.0 RC 06
« Reply #10 on: November 03, 2018, 12:44:24 PM »
The sourceforge code is current. This was my first roguelike project in 2006 and has been resurrected a couple of times over the years, there is no point in refactoring this code because the game is essentially done.  Hence the version 1.0 Release Candidate 6.

By my reckoning it takes around 12 years to finish a "proper" rougelike.
corremn's Roguelikes. To admit defeat is to blaspheme against the Emperor.  Warhammer 40000 the Roguelike

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Warlock of Firetop Mountain version 1.0.0 RC 06
« Reply #11 on: November 03, 2018, 05:42:00 PM »
there is no point in refactoring this code because the game is essentially done.

You may think it's done...

Skeletor

  • Rogueliker
  • ***
  • Posts: 580
  • Karma: +0/-0
  • villains ftw
    • View Profile
Re: Warlock of Firetop Mountain version 1.0.0 RC 06
« Reply #12 on: November 04, 2018, 07:08:27 AM »
I want to leave this world with completed roguelike game. My tombstone will say "He didn't do much, but at least left the world one completed roguelike."

Ha I wish we could see this more often.
What I enjoy the most in roguelikes: Anti-Farming and Mac Givering my way out. Kind of what I also enjoy in life.

corremn

  • Rogueliker
  • ***
  • Posts: 700
  • Karma: +0/-0
  • SewerJack Extraordinaire
    • View Profile
    • Demise RogueLike Games
Re: Warlock of Firetop Mountain version 1.0.0 RC 06
« Reply #13 on: November 05, 2018, 10:50:29 AM »
I want to leave this world with completed roguelike game. My tombstone will say "He didn't do much, but at least left the world one completed roguelike."

Ha I wish we could see this more often.

What, more dead roguelike developers?


And I have to ask Krice what is with all the constructive feedback? Surely you have not mellowed with age?
« Last Edit: November 05, 2018, 12:10:27 PM by corremn »
corremn's Roguelikes. To admit defeat is to blaspheme against the Emperor.  Warhammer 40000 the Roguelike

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Warlock of Firetop Mountain version 1.0.0 RC 06
« Reply #14 on: November 05, 2018, 09:48:25 PM »
Surely you have not mellowed with age?

It feels like I'm now more distant to humankind and maybe some day I will reach enlightenment. Fear and hate are fading and being replaced by growing understanding of this world and people with their unfortunate limitations.