Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 4 5 [6] 7

Author Topic: Let's make a roguelike, amateur programming at its... finest?  (Read 21477 times)

Lectorog

  • Bay Watcher
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #75 on: October 21, 2012, 12:18:30 am »

Pretty neat. However, I find pointless item variety in the environment to be annoying. I don't want to have to choose between the 7 differently-shaped sticks on the ground. Items being generated with little variety is better there. But perhaps you can make it work better than I've seen. Item variety and change in inventory is a good thing.
Logged

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #76 on: October 21, 2012, 12:32:09 am »

Well there's not much reason to make sticks different.  Actually there is.  At higher level skills you might gather larger branches more easily, so at the start of the game you can only grab size 2's and 3's.  At later levels, you can grab like 7's and 9's.  The thing is, these are very like items.  So instead of "stick (2), stick (3), stick (2), stick (4)" and so on, these like items will just be lumped into a single item of "sticks (19)" because that distinction doesn't matter.  Then you split the stack when you use an amount.

Other areas do matter.  Like, a fishing net might have important stats like durability or size.  You may want to use the good net in the river rapids and toss the poor nets in the pond.  Weapons and armor have obvious importance.  Logs would have specific sizes since this matters a bit more with crafting and with fuel for fires.  Besides, you're probably not carrying around 30 logs, but you very well might have 50 bundles of sticks.

dennislp3

  • Bay Watcher
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #77 on: October 21, 2012, 12:38:41 am »

Ideally, I want most item stats to be variable in-game.  On the most basic level, there's 'sword' with an attack power of 5, and then there's 'rusty sword' with an attack power of 4.  This could happen during use though, probably during repair.  If the sword hits, say, 0/15 durability, then you can repair it to 15/15, but it has a chance to lower it to 14/14 or to inflict a poor status, depending on your sharpening skill and the quality of the grindstone.  In this way, items become more fluid.  You don't have "a sword or no sword" you have "an old sword or you can spend your only money to get a shiny new sword" and other such item-specific issues.

The most "efficient" way to maybe do this would be to have item stats tied to durability...for example

sword at 50/50 durability does 5 damage (base damage x base durability....in this case 5.0 x 1.0)
sword at 40/50 durability does 4 damage (5.0 x 0.8 = 4)
a sword with 100/100 durability (skills modify the max durability of a weapon or item when crafted. 5.0 x 2.0 = 10)

With this system everything can revolve around "durability"...which could perhaps become "quality" or quality is simply the value given on creation (IE the max durability)

Regardless...the price, quality, and stats could all be tied to the durability stat which means you need to only set the base stats one time and have everything alter based on the current durability.


in short
base stats x (current durability/50) = end stat

/50 is of course assuming 50 durability is an "average" item with 100 being the cap for a "legendary" item

a slightly more complex system that could also work is
(base stats x quality) x (durability/50)

Initial quality (which sets max durability) would be determined by skills on creation. This could result in a poorly made sword that can be "sharpened" (increased max quality) but never truly made better without making a new one (max durability capped by initial quality value). Nothing of course would stop someone from "reinforcing" a weapon or "rebuilding" it to increase max durability.

Hope that makes sense...I am tired lol
Logged

Lectorog

  • Bay Watcher
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #78 on: October 21, 2012, 02:20:40 am »

The sticks were just an example. Another is the shops in Adventure Mode in Dwarf Fortress. There are dozens of different types of meats (or whatever, corresponding to the shop), with no actual benefit of one over another. It makes the menu difficult to navigate without providing anything. From what you've detailed, it doesn't look like there will be a painful level of minute variation, so... keep at what you're proposing to do.
Logged

Another

  • Bay Watcher
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #79 on: October 21, 2012, 03:01:20 am »

Clever use of item grouping and showing the player only important bits while keeping track of all properties internally is also a possible path.
Like "35 bars of yellow metal". How many of them are gold and weight of each one may be expanded into a list upon request (or maybe be left this way if the player doesn't have skill at distinguishing metal types or scales).
The idea is hierarchical grouping in user interface and expanding only upon request. If the task you are attempting to do requires a minimum weight or something the game may silently choose most appropriate (or first, or random among sufficient) item from the unexpanded stack.
Logged

kääpiö

  • Bay Watcher
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #80 on: October 21, 2012, 09:10:04 am »

I was also debating imps, goblins, demigods, and other mystical beings, which would all play a more economic role, like bribing the spirit of the rain to improve your crops, but would play a fairly backseat deal, while the main goal was to deal with your dirt and your rocks.
They could be likeTomtes, If you don't give them their natural rights, e.g. if you don't feed the barntomte, he will set your barn to fire.
Logged

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #81 on: October 21, 2012, 10:42:12 am »

The sticks were just an example. Another is the shops in Adventure Mode in Dwarf Fortress. There are dozens of different types of meats (or whatever, corresponding to the shop), with no actual benefit of one over another. It makes the menu difficult to navigate without providing anything. From what you've detailed, it doesn't look like there will be a painful level of minute variation, so... keep at what you're proposing to do.
One problem I always had with DF Adventure mode, and Skyrim for that matter, is the way that items are displayed.  Skyrim especially, I'm looking for soul gems.  Greater Soul Gem and Petty Soul Gem are at the top of the list and the bottom of the list, because it's alphabetical.  If they were listed as Soul Gem (Petty) or Soul Gem - Grand then things suddenly become WAY more convenient.  The same applies to meats and metals and DF Adventure Mode, although I think that DF actually lists items semi-randomly so even that wouldn't help.

sword at 50/50 durability does 5 damage (base damage x base durability....in this case 5.0 x 1.0)
sword at 40/50 durability does 4 damage (5.0 x 0.8 = 4)
a sword with 100/100 durability (skills modify the max durability of a weapon or item when crafted. 5.0 x 2.0 = 10)
This is fine in theory, but if nothing else I would make it (base_damage * (durability_faction * .5)) so that in this case, if your sword was 50/50 then it does 5 damage.  If your sword is 40/50 it would do (5*(.8*.2)) or some math that I can't quite conjure right now.  It wouldn't do 4 damage, it would do 4.5, so the minimum damage a weapon could do would be 1/2 of its base damage.  If it tapers off all the way to zero, then weapons become very useless very fast.

Beyond that, I'm not sure I really care for the whole idea of having a base value and quality.  More likely, the price of an item will be something like (attack * current_durability * material * cost_modifier).  So maybe... a sword has attack 5, it's made out of copper 2, has 20/25 durability, and sword items have a value modifier of 1.2.  That sword would be worth (5*2*20*1.2)=240.  Meanwhile, a steel blade might get an attack of 7, durability of 80, steel worth 10, and swords are still 1.2, so (7*10*80*1.2)=6,720.  Or something like that.  Since durability will likely be the biggest number, it'll likely involve some square roots or something to buff small items and nerf big items.

Lectorog

  • Bay Watcher
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #82 on: October 21, 2012, 11:35:32 am »

5.0*.8*.2 makes for .8 damage, so that's certainly not the operation you're looking for; and 5.0*.8*.5 = 2. I think you'll want [ base_damage * durability + ( [ base_damage - ( base_damage * durability ) ] * .5 ) ] = 5 * .8 + ( ( 5 - ( 5 * .8 ) ) * .5 ) = 4 + ( ( 5 - 4) * .5 ) = 4 + ( 1 * .5 ) = 4 + .5 = 4.5. Yay programming.

Will you be doing different damage types - for example, slash and blunt damage? If so, you'll want to have slashing damage able to go down to nearly zero, scaling with the current durability, but blunt damage won't ever reduce until the weapon breaks. Unless durability doesn't also represent the sharpness of the weapon.
Logged

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #83 on: October 21, 2012, 12:25:22 pm »

I think I'll be taking much the DF route, dealing blunt and sharp damage, and then different penetrations to make it a stab or a slash.  And blunt damage will lose a bit of power as the weapon grows more damaged, but not nearly as much as edged damaged.  Like, maybe 10% damage loss from full to zero durability, while edges would lose 50%.

dennislp3

  • Bay Watcher
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #84 on: October 21, 2012, 09:01:20 pm »

Math...my major weakness XD it will be my greatest hurdle in programming but I am looking forward to all I will learn from it eh?
Logged

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #85 on: October 21, 2012, 09:06:02 pm »

You don't need to know that much math.  That's what computers are for, really.  If you were doing the math, it'd be a tabletop.  The trick is just to make the computer do all the math, and you just work on structure.  Programming is more art than engineering.

dennislp3

  • Bay Watcher
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #86 on: October 21, 2012, 09:23:40 pm »

naturally...but I still have to come up with formulas and what not for the computer to run.

Either way...I am procrastinating to much >.< need to program more...
Logged

GalenEvil

  • Bay Watcher
    • View Profile
    • Mac-Man Games
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #87 on: October 22, 2012, 01:19:36 pm »

Very interesting project! PTW :D Good Luck!
Logged
Fun is Fun......Done is Done... or is that Done is !!FUN!!?
Quote from: Mr Frog
Digging's a lot like surgery, see -- you grab the sharp thing and then drive the sharp end of the sharp thing in as hard as you can and then stuff goes flying and then stuff falls out and then there's a big hole and you're done. I kinda wish there was more screaming, but rocks don't hurt so I guess it can't be helped.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #88 on: November 05, 2012, 10:32:49 pm »

So how is this going?
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #89 on: November 06, 2012, 02:50:21 pm »

Any suggestion on how to handle inventory for multiple creatures?  I'm thinking just tagging it on as a list in the object definition would be easiest.
Pages: 1 ... 4 5 [6] 7