Author Topic: My roguelike in BASIC  (Read 5043 times)

0 Members and 1 Guest are viewing this topic.

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 3.470
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2636
  • Likes Given: 1566
Re: My roguelike in BASIC
« Reply #25 on: 10:21, 07 October 19 »
Remember some UbiSoft intro music like Zombi and M'Enfin!, really nice tunes programmed in BASIC.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline PAQUITO

  • CPC464
  • **
  • Posts: 44
  • Country: es
  • Liked: 58
  • Likes Given: 7
Re: My roguelike in BASIC
« Reply #26 on: 14:14, 07 October 19 »
Yes, I know it can be done for intros and stuff. I was thinking in background music.

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 2.921
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1091
  • Likes Given: 2305
Re: My roguelike in BASIC
« Reply #27 on: 14:24, 07 October 19 »
Yes, I know it can be done for intros and stuff. I was thinking in background music.

Yes, can also be done relative easy using the approach I described. Just have an ON SQ() GOSUB in your game loop.

Offline Morri

  • CPC6128
  • ****
  • Posts: 284
  • Country: nz
  • Liked: 237
  • Likes Given: 215
Re: My roguelike in BASIC
« Reply #28 on: 02:03, 08 October 19 »
@PAQUITO I have made a few 100% BASIC games with background music (Written by @mr_lou ) . CoolBox is a good example on CPCpower - https://www.cpc-power.com/index.php?page=detail&num=13102

Keeping it Kiwi since 1977

Offline PAQUITO

  • CPC464
  • **
  • Posts: 44
  • Country: es
  • Liked: 58
  • Likes Given: 7
Re: My roguelike in BASIC
« Reply #29 on: 02:43, 08 October 19 »
@PAQUITO I have made a few 100% BASIC games with background music (Written by @mr_lou ) . CoolBox is a good example on CPCpower - https://www.cpc-power.com/index.php?page=detail&num=13102
Pretty cool game. And awesome music. I remember faking vertical scrolls in Basic using a return in the last row (thus, letting the machine do the rest :P) How do you do it in Basic?

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.721
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 957
  • Likes Given: 1678
Re: My roguelike in BASIC
« Reply #30 on: 13:05, 10 October 19 »
Pretty cool game. And awesome music. I remember faking vertical scrolls in Basic using a return in the last row (thus, letting the machine do the rest :P ) How do you do it in Basic?


I think it was some OUT statements to Roll the Screen and use WINDOW on the sides to delete the scenery from appearing on the other side of the screen and draw the new scenery in its place.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline asertus

  • CPC664
  • ***
  • Posts: 73
  • Country: es
  • Liked: 58
  • Likes Given: 206
Re: My roguelike in BASIC
« Reply #31 on: 17:16, 10 October 19 »
Actually, when it is done I'd try to embed 8bp library. You'd get an amazing game with it.

Offline PAQUITO

  • CPC464
  • **
  • Posts: 44
  • Country: es
  • Liked: 58
  • Likes Given: 7
Re: My roguelike in BASIC
« Reply #32 on: 01:31, 11 October 19 »
First post updated with new DSK and some minor changes. Just a little mid-week update, nothing major. Check it!

Offline PAQUITO

  • CPC464
  • **
  • Posts: 44
  • Country: es
  • Liked: 58
  • Likes Given: 7
Re: My roguelike in BASIC
« Reply #33 on: 02:14, 12 October 19 »
New update! You can now finally face some enemies and strike some blows. It costed my blood and sweat to make it work, but there it is.SDK updated in the first post.

Offline PAQUITO

  • CPC464
  • **
  • Posts: 44
  • Country: es
  • Liked: 58
  • Likes Given: 7
Re: My roguelike in BASIC
« Reply #34 on: 05:01, 14 October 19 »
New update!
The monsters generation system had to be almost rewritten, but now it´s much more easy to edit for future updates.
This update contains some extra things, some visual incorporations, bug fixes and, in general, everything starts to be much more functional.

DSK updated in the first post!

Offline PAQUITO

  • CPC464
  • **
  • Posts: 44
  • Country: es
  • Liked: 58
  • Likes Given: 7
Re: My roguelike in BASIC
« Reply #35 on: 00:10, 16 October 19 »
I need help with one question I can´t make it work.
I want to print two values in the format x/x.

I mean, about the hit points, if I have 150 hps left from a total of 300. Is there a way to print "150/300"?
I know I can always do PRINT hp;"/";hpmax. But it would give me something like "150 / 300" (with blank spaces when I want all the characters side by side) Is this possible?


I´ve been trying with PRINT USING but it doesn´t seem to be the way.
EDIT: I tried STR$, which converts a numeric value to a literal value, but it still generates a blank space at the beggining of the string :(
« Last Edit: 00:28, 16 October 19 by PAQUITO »

Offline Fessor

  • CPC6128
  • ****
  • Posts: 199
  • Country: de
  • Liked: 164
  • Likes Given: 40
Re: My roguelike in BASIC
« Reply #36 on: 00:59, 16 October 19 »
As there was no function to trim a string you have to do something like this to get rid of the first char of the string.
Code: [Select]
hp$=str$(hp):hp$=right$(hp$,len(hp$)-1)

Offline PAQUITO

  • CPC464
  • **
  • Posts: 44
  • Country: es
  • Liked: 58
  • Likes Given: 7
Re: My roguelike in BASIC
« Reply #37 on: 01:32, 16 October 19 »
As there was no function to trim a string you have to do something like this to get rid of the first char of the string.
Code: [Select]
hp$=str$(hp):hp$=right$(hp$,len(hp$)-1)
Yes, I used that string trimming approach to generate the gameboard out of a bunch of DATA lines. I will try that.
EDIT: Yay! it totally works! Thanks!

« Last Edit: 01:54, 16 October 19 by PAQUITO »

Offline PAQUITO

  • CPC464
  • **
  • Posts: 44
  • Country: es
  • Liked: 58
  • Likes Given: 7
Re: My roguelike in BASIC
« Reply #38 on: 01:58, 16 October 19 »
Actually, when it is done I'd try to embed 8bp library. You'd get an amazing game with it.
I´ll make sure to give you a touch when it´s finished.

Offline PAQUITO

  • CPC464
  • **
  • Posts: 44
  • Country: es
  • Liked: 58
  • Likes Given: 7
Re: My roguelike in BASIC
« Reply #39 on: 21:25, 17 October 19 »
New version! A lot of new things and interesting things. Check it in the first post.

Offline PAQUITO

  • CPC464
  • **
  • Posts: 44
  • Country: es
  • Liked: 58
  • Likes Given: 7
Re: My roguelike in BASIC
« Reply #40 on: 00:44, 18 October 19 »
Quick question: The game is by now in Spanish. Are you having trouble understanding it? I can change it to english if you want.

Offline VincentGR

  • 6128 Plus
  • ******
  • Posts: 1.132
  • Country: gr
    • Parts from the past.
  • Liked: 627
  • Likes Given: 1589
Re: My roguelike in BASIC
« Reply #41 on: 09:44, 18 October 19 »
Quick question: The game is by now in Spanish. Are you having trouble understanding it? I can change it to english if you want.


That would be great.

Offline PAQUITO

  • CPC464
  • **
  • Posts: 44
  • Country: es
  • Liked: 58
  • Likes Given: 7
Re: My roguelike in BASIC
« Reply #42 on: 21:29, 18 October 19 »

That would be great.
Done. Please find the updated link to the DSK now in english in the first post.

Offline VincentGR

  • 6128 Plus
  • ******
  • Posts: 1.132
  • Country: gr
    • Parts from the past.
  • Liked: 627
  • Likes Given: 1589
Re: My roguelike in BASIC
« Reply #43 on: 21:43, 18 October 19 »
Thanks!!!


Can't wait for the final release  :)

Offline PAQUITO

  • CPC464
  • **
  • Posts: 44
  • Country: es
  • Liked: 58
  • Likes Given: 7
Re: My roguelike in BASIC
« Reply #44 on: 23:57, 18 October 19 »
Sadly, I only can invest a few hours after work, so it´s growing slowly. This weekend I want to code an AI to make enemies that actually chase you (not only walk around at random like the rats)

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.721
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 957
  • Likes Given: 1678
Re: My roguelike in BASIC
« Reply #45 on: 00:05, 19 October 19 »
Sadly, I only can invest a few hours after work, so it´s growing slowly. This weekend I want to code an AI to make enemies that actually chase you (not only walk around at random like the rats)



The last example of code I posted in my Collision Detection thread is from an old AA Type-In called Lawn Mower Simulator, in that game there is a Person who follows the Lawn Mower around the screen which maybe of some help if you want things chasing you.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline PAQUITO

  • CPC464
  • **
  • Posts: 44
  • Country: es
  • Liked: 58
  • Likes Given: 7
Re: My roguelike in BASIC
« Reply #46 on: 00:14, 19 October 19 »



The last example of code I posted in my Collision Detection thread is from an old AA Type-In called Lawn Mower Simulator, in that game there is a Person who follows the Lawn Mower around the screen which maybe of some help if you want things chasing you.

The real challenge will not be monsters chasing you, but monsters chasing you and finding a way through obstacles

Offline VincentGR

  • 6128 Plus
  • ******
  • Posts: 1.132
  • Country: gr
    • Parts from the past.
  • Liked: 627
  • Likes Given: 1589
Re: My roguelike in BASIC
« Reply #47 on: 00:32, 19 October 19 »
Can't wait to play when it's done, don't worry  ;D

Offline PAQUITO

  • CPC464
  • **
  • Posts: 44
  • Country: es
  • Liked: 58
  • Likes Given: 7
Re: My roguelike in BASIC
« Reply #48 on: 20:52, 20 October 19 »
I´m having a very dense research task this whole weekend, since finding a way to make the enemies chase you while avoiding obstacles is being really tricky.After taking a look at some classic maze solving programming methods, I´m starting to find a way to calculate paths between two squares of the game grid. I think I have something. Right now I´m trying to write a pathfinder program to see if it works as expected so I can implement it in the game.
Anyways it´s being really interesting to develop. It involves things like tracing primary paths from the two points, checking for intersections, etc... Let´s see if I can make it work :)


Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.242
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 992
  • Likes Given: 2285
Re: My roguelike in BASIC
« Reply #49 on: 21:28, 20 October 19 »
Have you considered the A* pathfinding algorithm?