Let's Build a Roguelike

New to FreeBASIC? Post your questions here.
j_milton
Posts: 458
Joined: Feb 11, 2010 17:35

Postby j_milton » Aug 24, 2010 18:05

Jocke The Beast wrote:Cool. Works well here and seems to reproduce "winable maps" over & over again (no dead-ends).


Thanks. I spent a lot of time alpha testing the basic map generator prior to adding secret doors. I'm confident that the "recursive splitting" routine which generates the floor plan is free of bugs.
Jocke The Beast
Posts: 272
Joined: May 28, 2005 10:21
Contact:

Postby Jocke The Beast » Aug 25, 2010 20:22

Rick: Any news you can share? How's the other Inventory-widgets turning out?
Regards.
rdc
Posts: 1725
Joined: May 27, 2005 17:22
Location: Texas, USA
Contact:

Postby rdc » Aug 26, 2010 21:34

Jocke The Beast wrote:Rick: Any news you can share? How's the other Inventory-widgets turning out? Regards.


Getting there. I have been trying to make a list of things we need in the game so I can include them in. For example, I need something to replenish mana for the spells, lanterns, etc. I have a working list of armor and weapons, just trying to come up with some magical effects for them.
Jocke The Beast
Posts: 272
Joined: May 28, 2005 10:21
Contact:

Postby Jocke The Beast » Aug 27, 2010 6:36

That is nice to hear :)
Magic for weapon & armour. More then cursed, not cursed or enchanted? Most roguelikes just features those for weapon & armours.
Interesting :)
j_milton
Posts: 458
Joined: Feb 11, 2010 17:35

Postby j_milton » Aug 30, 2010 0:37

Jocke The Beast wrote:Cool. Works well here and seems to reproduce "winable maps" over & over again (no dead-ends).


More progress in my little demo, but still so much to do... No weapons, armor, or loot yet, though the bones for all that are there in the code, but you can go hand to hand combat with a single creature type, take and inflict hit points, kill and be killed.

Addressed the LOS glitch problem by "pruning" it so that player sight lines do not extend past one open door in any given direction, seemed reasonable

DL here:
http://code.google.com/p/arlg/downloads/list

Note, data files not compatible with the earlier version, delete them prior to running the new one.

@rdc At the risk of jumping ahead in your series, how do you address the issue of differences in movement rates between the player and various AI's?
rdc
Posts: 1725
Joined: May 27, 2005 17:22
Location: Texas, USA
Contact:

Postby rdc » Aug 30, 2010 10:52

j_milton wrote:@rdc At the risk of jumping ahead in your series, how do you address the issue of differences in movement rates between the player and various AI's?


For a turn-based game you can keep a counter in your actor object and a threshold amount that indicates when it should turn next. If it is twice as slow as the @ then the count would be accumulated until the threshold is met. For faster actors use negative values and move until the threshold is 0. This is how I handled actor movement in DDD. (You can also use a percentage value, i.e., .5 as use that as the rate, but I prefer integers since they are faster and work just as well.)

You can use this technique for the player character as well. In my QuickRogue there was a slow potion, so all the monsters got a movement boost which made the player character move slower in comparison.

For a real-time game, use a timer and threshold value. Check the time in each loop and when the time passed has reached the actor threshold, then move the actor. This is how I handled real-time movement in Lab42.
Ryan
Posts: 695
Joined: Jun 10, 2005 2:13
Location: Louisville, KY
Contact:

Postby Ryan » Sep 01, 2010 12:56

Off topic, but Jocke if you're gonna fly to the U.S., I can say that Mexico's beaches are nicer than Florida's (except maybe Key West) and Paris is a nicer city than New York (just not as big : ). I'd visit out West, hit the Rocky Mountains and Grand Canyon, and if you follow it South you can visit Rick in Texas. ; )

Alternatively, you might visit California and drive up the West coast... maybe all the way to Portland, OR to see the Columbia River Gorge and Mount Saint Helens. The Pacific Northwest is probably my favorite part of the country at the moment.

Of course, if you want to check out horse / bourbon country, you'd always be welcome in Louisville, KY. : D
j_milton
Posts: 458
Joined: Feb 11, 2010 17:35

Postby j_milton » Sep 01, 2010 16:29

New demo available here:
http://code.google.com/p/arlg/downloads/list

Changes:
- Bug fixes in monster movement and map display code
- Better handling of the "unconscious player" situation
- Locked doors, and the ability to lockpick them or smash them
- Player gets thirsty. (but can't drink yet, so you will die of thirst if you explore long enough. Obviously this will be fixed)
- Differential movement & attack rates between player and monsters. (uses a random check against the ratio of player speed factor to monster speed factor) As with most things in ARLG, player and monster performance degrades when injured.
- Monsters now have "personality", see below.

In addition to the Strength, Agility, and Health stats that are shared by both the player and monster monsters have 3 additional stats that determine how they will respond to the player. These are: "Fear radius", "Aggression radius", and "Self preservation factor".

In the current demo these are used to generate 3 different forms of monster. They all have the same Strength, Agility, and Health, but changes in the other stats produce different behavior modes.

One type is timid, they will always seek to avoid the player, and will not attack first

Another type will avoid the player if possible, but will become aggressive if the player gets too close or if they have been wounded. If seriously injured they will attempt to retreat.

Finally there is a "nasty" form. It will always seek to close with and attack the player. It will fight to the death. If the player manages to outrun it and get out of it's field of view it will resort to "scent based" tracking to hunt the player down.
(By default the player leaves a scent trail on tiles they have recently occupied.)

There are 4 of these generated on each level of the demo, beware!
Last edited by j_milton on Sep 01, 2010 16:30, edited 1 time in total.
Jocke The Beast
Posts: 272
Joined: May 28, 2005 10:21
Contact:

Postby Jocke The Beast » Sep 01, 2010 16:30

Well hello there Ryan :) Always a pleasure!

Well, we (me & my girlfriend and our little daughter) has been thinking about U.S for a long time now. I mean: Sometime I just have to visit the country that has everything! Every movie I've seen since I was a kid has given me a picture of what U.S is like. It would be great fun to see with my own eyes.

As for Mexico, you might be right. I have one friend who's been there and he loved it. But Florida seems good enough and after 2 weeks of sun & water sports we might go to N.Y.
Well, that's where we stand right now. Who knows, in a week or two we might have our sight set at Iceland or another cold country ;)
Take care!

On topic:
Ryan, have you been doing some RL-stuff lately? If not = do it :)
rdc
Posts: 1725
Joined: May 27, 2005 17:22
Location: Texas, USA
Contact:

Postby rdc » Sep 01, 2010 19:45

Chapter 14: Character Inventory II. See first post.
Jocke The Beast
Posts: 272
Joined: May 28, 2005 10:21
Contact:

Postby Jocke The Beast » Sep 02, 2010 9:48

Rick: Best chapter so far :) Very good writing and the code works perfect!
And like you stated, now we're not far away from a real playable game. Feel proud of your work, it's a milestone in roguelike development! First real tutorial for making a roguelike and it's very solid & well made!
Thanks again!
rdc
Posts: 1725
Joined: May 27, 2005 17:22
Location: Texas, USA
Contact:

Postby rdc » Sep 02, 2010 14:11

Thanks man.
j_milton
Posts: 458
Joined: Feb 11, 2010 17:35

Postby j_milton » Sep 12, 2010 8:54

New demo available here (Sept 12):
http://code.google.com/p/arlg/downloads/list

Quite a few changes:

- Did a rewrite / cleanup of the high level flow control, and file handling code, much cleaner now
- Debugged the tracking ability of the monsters some more
- Dungeon levels now come in 2 flavors, the rectilinear one that I started with and one with a more "cave like" feel to it, levels still fit on 1 screen
- Taking and discarding items now works
- Map legend screen
- Player stats screen
- Weapon, armor, and shield use in combat, at a very basic level

Using items other than weapons not yet implemented, so still no way of avoiding death by dehydration, that will be next on the list, but you should be able to explore down several levels as things stand now.

Still looking for someone to try and compile it with linux, how to compile info. is in the "readme"...

Cheers
Jocke The Beast
Posts: 272
Joined: May 28, 2005 10:21
Contact:

Postby Jocke The Beast » Sep 12, 2010 20:58

Nice update.
The first thing you should fix is the message-box. When fighting a monster the text (Hero attacks Rat for 4 dmg etc.) could easily be located on the game main screen. Kind of annoying when the map disapears now...
Discarding items work but they should really just be "dropped" not destroyed in my opinion.
Cool with some semi-passive monsters that don't attack until they're self attacked or affraid.
Keep the good work up!
j_milton
Posts: 458
Joined: Feb 11, 2010 17:35

Postby j_milton » Sep 13, 2010 13:18

Jocke The Beast wrote:Nice update.
The first thing you should fix is the message-box. When fighting a monster the text (Hero attacks Rat for 4 dmg etc.) could easily be located on the game main screen. Kind of annoying when the map disapears now...
Discarding items work but they should really just be "dropped" not destroyed in my opinion.
Cool with some semi-passive monsters that don't attack until they're self attacked or affraid.
Keep the good work up!


Thanks for the alpha testing you are doing Jocke, and for the suggestions.

I had always intended that the combat messages would be on the main map page, just had not gotten around to it. I have now implemented that, you will see it in the next update (not yet uploaded).

As far as dropping vs discarding of items goes I had considered both options, and at this point it's a game design decision to go with discarding. It adds another layer of decision making for the player, and also allows me to avoid some awkward issues around item stacking on tiles.

I want to stick to the major idioms of the old school classic games pretty much for ARLG, that includes monsters not stacking on a tile with an item. I don't want the player to be able to drop a small item on a tile to create a "monster road block" etc.

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 4 guests