Author Topic: Rogue-Like (work in progress)  (Read 10046 times)

0 Members and 1 Guest are viewing this topic.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Rogue-Like (work in progress)
« Reply #30 on: November 23, 2021, 02:20:23 pm »
I'd be intereseted in seeing this run, but it is throwing an error:

Unhandled Error #258
Line: 268 (in main module)
Invalid handle
Continue?
[Yes] [No]

I'm currently running QB64 2.0.0 - should I be using a different version?
Any other ideas?
Thanks...

No idea.  Line 268 in the main module is a blank line.  I can't fathom why it'd toss an error.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: Rogue-Like (work in progress)
« Reply #31 on: November 23, 2021, 06:26:13 pm »
I'd be intereseted in seeing this run, but it is throwing an error:

Unhandled Error #258
Line: 268 (in main module)
Invalid handle
Continue?
[Yes] [No]

I'm currently running QB64 2.0.0 - should I be using a different version?
Any other ideas?
Thanks...

be sure you get the 7z file in a previous post. you might be missing the PNG file.
Granted after becoming radioactive I only have a half-life!

Offline xra7en

  • Seasoned Forum Regular
  • Posts: 284
    • View Profile
Re: Rogue-Like (work in progress)
« Reply #32 on: November 23, 2021, 07:45:54 pm »
definitely following this:
rogue games have been my passion back in the day, thanks for reviving it


same unhandled error all over :-)
I just like re-writing old DOS book games into modern QB64 code - weird hobby, I know!

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: Rogue-Like (work in progress)
« Reply #33 on: November 23, 2021, 09:08:33 pm »
same unhandled error all over :-)

so the error is coming up for you as well?

That is odd, runs fine for me. You do have the TTF and PNG files right?
Granted after becoming radioactive I only have a half-life!

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Rogue-Like (work in progress)
« Reply #34 on: November 23, 2021, 10:02:21 pm »
There's only 2 files which need to be in the same folder as the BAS program -- Sprites.png and courbd.ttf (and the font file is only needed if you're not a Windows user as QB64 will find it automatically for you with windows). 

You might want to check to see if the OUTPUT EXE TO SOURCE FOLDER option is checked in the IDE for you, or not, as it can make a difference if you're compiling from the "Rogue Like" folder which the zip file extracted everything into.   
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline madscijr

  • Seasoned Forum Regular
  • Posts: 295
    • View Profile
Re: Rogue-Like (work in progress)
« Reply #35 on: November 23, 2021, 11:19:55 pm »
There's only 2 files which need to be in the same folder as the BAS program -- Sprites.png and courbd.ttf (and the font file is only needed if you're not a Windows user as QB64 will find it automatically for you with windows). 

You might want to check to see if the OUTPUT EXE TO SOURCE FOLDER option is checked in the IDE for you, or not, as it can make a difference if you're compiling from the "Rogue Like" folder which the zip file extracted everything into.

Thanks for your reply - I'll check all that when I'm back at my PC & let you all know what works..,

Offline madscijr

  • Seasoned Forum Regular
  • Posts: 295
    • View Profile
Re: Rogue-Like (work in progress)
« Reply #36 on: November 24, 2021, 12:52:06 pm »
There's only 2 files which need to be in the same folder as the BAS program -- Sprites.png and courbd.ttf (and the font file is only needed if you're not a Windows user as QB64 will find it automatically for you with windows). 

You might want to check to see if the OUTPUT EXE TO SOURCE FOLDER option is checked in the IDE for you, or not, as it can make a difference if you're compiling from the "Rogue Like" folder which the zip file extracted everything into.

It turns out I didn't have the "courbd.ttf" and "Sprites.png" files,
and the "OUTPUT EXE TO SOURCE FOLDER" option was not selected.
I changed the option and downloaded 'Rogue Like.7z"
(instead of using the code from the forum post)
and it works like a charm. Thank you!

This is a very neat implementation of the game so far -
thanks for sharing it.

PS Are there any instructions?
Here's what I determined from reading the code:
Code: QB64: [Select]
  1. KEY         ACTION
  2. up          move north
  3. down        move south
  4. left        move west
  5. right       move east
  6. space       skip turn
  7. <           climb ladder
  8. +           turn lantern up
  9. =           turn lantern up
  10. -           turn lantern down
  11. _           turn lantern down
  12. SHIFT+up    increase scale
  13. SHIFT+down  decrease scale
  14. SHIFT+left  decrease font size
  15. SHIFT+right increase font size

FYI I tried playing it and got to a ladder, and when I pressed "<" the game seemed to lock up
(I waited about a minute and nothing happened so I killed it.)

PPS Some suggestions for future versions
  • pressing "?" shows help
  • keys for diagonal movement (I can do that myself, but just saying)
  • burn lamp fuel faster/slower if you turn the lamp up/down
  • line-of-sight algorithm (so player can't see through walls)
  • missile weapons (bow & arrow, sling, etc.) for ranged combat
  • a level editor (for the option to play user-created dungeons instead of randomly created ones)
  • hidden passageways

PPS As a guide for anyone who wants to try adding features, here are the commands listed in the the original Rogue manual on myabandonware.com
https://dl2.myabandonware.com:8443/f/p1z/Rogue_Manual_DOS_EN.pdf

Code: QB64: [Select]
  1. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. ROGUE COMMANDS REFERENCE CARD
  3. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4. The following is a complete list of all the commands used in the ROGUE program.
  5. Certain commands have several keys which perform the same function:
  6.  
  7. -------------------------------------------------------------------------------
  8. MOVEMENT/FIGHTING
  9. -------------------------------------------------------------------------------
  10. KEY(S)        COMMAND(S)
  11. , h           Moves you left one space.
  12. H             Moves you left until you run into a wall or door.
  13. f             Moves you left until you are near an object.
  14. , j           Moves you down one space.
  15. J             Moves you down until you run into a wall or door.
  16. f             Moves you down until you are near an object.
  17. , k           Moves you up one space.
  18. K             Moves you up until you run into a wall or door.
  19. f             Moves you up until you are near an object.
  20. , l           Moves you right one space.
  21. L             Moves you right until you run into a wall or door.
  22. f             Moves you right until you run into an object.
  23. Home, y       Moves you diagonally, up and to the left.
  24. Y             Moves you diagonally, up and to the left until you run into a wall or door.
  25. f Home        Moves you diagonally, up and to the left until you are near an object.
  26. End, b        Moves you diagonally, down and to the left.
  27. B             Moves you diagonally, down and to the left until you run into a wall or door.
  28. f End         Moves you diagonally, down and to the left until you are near an object.
  29. PgUp, u       Moves you diagonally, up and to the right.
  30. U             Moves you diagonally, up and to the right until you run into a wall or door.
  31. f PgUp        Moves you diagonally, up and to the right until you are near an object.
  32. PgDn, n       Moves you diagonally, down and to the right.
  33. N             Moves you diagonally, down and to the right until you run into a wall or door.
  34. f PgDn        Moves you diagonally, down and to the right until you are near an object.
  35.  
  36. NOTE: The above commands are also used for fighting monsters.
  37.  
  38. KEY(S)        COMMAND(S)
  39. s, Del        Search for hidden traps and secret doors in area adjacent to you.
  40. f             Find something. When followed by a direction, this will allow you to move continuously until you run into a wall or door.
  41. g             Go over. Allows you to step on an item without picking it up. Used as a prefix before a direction key.
  42. >, Ins        When standing on a staircase, this allows you to go down the staircase, deeper into the dungeon, to the next level.
  43. <             When standing on a staircase, this allows you to go up the staircase, out of the dungeon, to the next level.
  44. ^, F8         Identifies the trap type. (You will have to give the direction of the trap.)
  45. SCROLL LOCK   Fast Play Mode. When engaged, you move through the rooms and passageways continuously until you run into a door, monster, or other object. Also stops any count currently being performed.
  46.                          
  47. -------------------------------------------------------------------------------
  48. USING OBJECTS/FIGHTING
  49. -------------------------------------------------------------------------------
  50. KEY(S)        COMMAND(S)
  51. c, F5         Renames an object which you have not yet identified.
  52. d             Drop an object. To take something out of your pack and leave it on the dungeon floor.
  53. e             Eat food. Takes food out of your pack to eat.
  54. P             Put a ring on your hand.
  55. q             Quaff (drink) one of the potions you are carrying.
  56. r             Read one of the scrolls in your pack.
  57. R             Remove a ring you are wearing and put it back into your pack.
  58. t, +          Throw an object (i.e. arrow, dagger). (This command is followed by a direction.)
  59. T             Take off the armor you are currently wearing.
  60. w             Wield a new weapon.
  61. W             Wear a different piece of armor.
  62. z, –          Zap a monster with a wand or staff. (This command is followed by a direction.)
  63.  
  64. -------------------------------------------------------------------------------
  65. GENERAL (Function Keys)
  66. -------------------------------------------------------------------------------
  67. KEY(S)        COMMAND(S)
  68. F1, ?         Lists all the Commands (Help).
  69. F2, /         Lists all the symbols used in the game.
  70. F3, a         Repeat the last command given.
  71. F4, Ctrl r    Repeat message.
  72. F5, c         Rename object.
  73. F6, D         List items that have been discovered.
  74. F7, i         Inventory of all items in your pack.
  75. F8, ^         Identify type of trap. (This command is followed by a direction.)
  76. F9 Any key.   (Alt F9 defines this key to any command you wish to use.)
  77. F10, !        Clears the screen, and starts up a fake DOS. Hitting any function key or typing rogue will put you back in the game. (This can be used when playing Rogue at work when you shouldn't be!)
  78. Ctrl t        Terse message mode.
  79. Q             Quit and exit from ROGUE.
  80. S             Save the current game
  81. v             Prints the current version number.
  82. Esc           Cancels a command before you execute it.
  83. .             Allows you to rest and heal (regain hit points).
  84. 0-9           Number keys preceding a command allow you to repeat the command that number of times.
  85.  
« Last Edit: November 24, 2021, 01:15:04 pm by madscijr »