Bay 12 Games Forum

Please login or register.

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

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

Girlinhat

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

I'd highly suggest swapping to Pyhton.  The syntax is similar enough that you can swap over if you already know C++, but everything is so much easier to write.  Storing map data and object/creature lists is particularly streamlined.  C++ uses rather strict memory management - everything has its slot and if you want more slots you have to make more slots.  Python is more fluid here - everything falls into a list and if you want to add something to the list you just add it, the list will grow to accommodate.  This makes it exceptionally easy to just spawn a creature out of the blue, or to delete a dead creature, and more importantly when your crops produce new fruit, it can add new items to the master list without any worry.

Not to mention that Python can import libraries infinitely more easily than C++, and that the libtcod library/module is designed to help people make a roguelike, then you have all the good tools right there.  Tile data, color, FOV, and pathfinding come straight with libtcod, you just call "draw FOV" and it does, don't have to make your own function to do something that's already rather well understood.

Sheb

  • Bay Watcher
  • You Are An Avatar
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #16 on: October 15, 2012, 02:56:37 pm »

PTW. You should definitely make it moddable to a point, at least having objects and reactions in a .xml somewhere, so we can help.
Logged

Quote from: Paul-Henry Spaak
Europe consists only of small countries, some of which know it and some of which don’t yet.

Lectorog

  • Bay Watcher
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #17 on: October 15, 2012, 02:59:45 pm »

I'm slowly making a roguelike myself. I have to have both the time and desire to work on it, so it advances rarely. I'm using C++ because I like doing things the hard way? C++ is not a good language if you want to make a roguelike (or roguelikelike). You made a good switch. I hope you have more dedication than I do as well, because this could be quite interesting.
Logged

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #18 on: October 15, 2012, 04:05:12 pm »

C++ feels too much like work.  Python is definitely the way to go.  :)  Good luck GirlInHat!
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout

dennislp3

  • Bay Watcher
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #19 on: October 15, 2012, 04:06:53 pm »

I'd highly suggest swapping to Pyhton.  The syntax is similar enough that you can swap over if you already know C++, but everything is so much easier to write.  Storing map data and object/creature lists is particularly streamlined.  C++ uses rather strict memory management - everything has its slot and if you want more slots you have to make more slots.  Python is more fluid here - everything falls into a list and if you want to add something to the list you just add it, the list will grow to accommodate.  This makes it exceptionally easy to just spawn a creature out of the blue, or to delete a dead creature, and more importantly when your crops produce new fruit, it can add new items to the master list without any worry.

Not to mention that Python can import libraries infinitely more easily than C++, and that the libtcod library/module is designed to help people make a roguelike, then you have all the good tools right there.  Tile data, color, FOV, and pathfinding come straight with libtcod, you just call "draw FOV" and it does, don't have to make your own function to do something that's already rather well understood.

I am dabbling in Python as well...I suppose I just haven't picked one and gone with it so I will do this. I was actually using libtcod with C++ (it can be used with multiple languages).

I personally like the concept of the control C++ offers but I can fiddle with it in the future. Even if that means starting a completely new rogue-like or whatever.

Usually it's too easy - once you set your wheat in the ground then the game's over.  You've got infinite free food and bears are the most dangerous thing that doesn't hunt you so you can just not go into caves and do perfectly fine.

Biggest thing here is a total lack of "economy"

I have been researching into farming and the like as I have many ideas similar to your for my roguelike project. Medieval farmers had to worry about every manner of crop destroying things and having your entire years harvest ruined because of a single bad weather day was not unheard of.

Without natural decay, illnesses (both to plant and animal/person), and other random and rather harsh realities it will become to easy.

no matter the focus of the game it needs to maintain a balanced "economy"

Items need to go in, be combined into something useful, and eventually exit the system. No exit = over abundance and too easy.

I am planning on having most items (tools mainly) break after random amount of uses based on the quality of the components. Repairing will take materials and buildings will have the same system. This also creates a bit of a soft cap where you cant build a fortress as one man as eventually you will be spending so much time and resources on repairs and making tools that you won't be able to sustain it.
« Last Edit: October 15, 2012, 04:37:01 pm by dennislp3 »
Logged

Girlinhat

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

Oh-ho, you make some delicious points~

Many games fail to include decay at all.  Although it would be fairly easy to add.  Cataclysm shows the style the best - every X multiple of turns, you make a check on certain things that aren't time sensitive.  Like, every half hour you could check the decay rates on items and reduce it by 1.  When it hits zero, rot it, or collapse it or break it or whatever.  This could of course be tweaked for any number of things.  If it's outside, give it a decay of 2 per tick.  If it's inside, give it 1 per tick.  If it's in a basement, give it 50% chance for 1 tick.  If it's in a basement in a barrel and it's salted, give it 10% chance for 1 tick.

Tools could incur a very slow natural decay, but also add to their decay on use, which could get interesting.  Iron tools may have a high durability, but if left outside they incur rapid decay due to rust.  Meanwhile copper could be relatively soft and weak, but incurs a very slow decay rate outdoors, because copper doesn't rust.  If I were going to handle tool decay (and I will) then AI would probably make an influence too.  Agility/Dexterity may allow a user to avoid a decay roll, so that skilled people are less likely to mangle their tools.  So you'd probably end up with that one employee, strong as an ox, loyal to the core, but... you don't quite want to give him the shiny new steel shovel.

Disease of crops and animals will definitely be in.  Burning cow corpses is a high probability, that's the only way to make sure it won't spread.  *Shrug* or leave the cow corpse out.  Maybe the neighborhood night terror will eat it and become sick and not visit you as often!  Not as many fun options with crops though.  Just gotta burn the field I guess!

In other news though, I've managed to make the map follow the player now!  It was unusually tricky to find the math for this, but it looks much better.

The Darkling Wolf

  • Bay Watcher
  • Arf!
    • View Profile
    • Cataclysm - Dark Days Ahead
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #21 on: October 15, 2012, 05:14:07 pm »

Posting to watch and such.
Logged
My cabbages!
[Thunderfury, Blessed Blade of the Windseeker]

I am fat, eating is my great joy.

Lectorog

  • Bay Watcher
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #22 on: October 15, 2012, 05:26:20 pm »

Please include disease. I want to fling corpses at my business competitors.
Logged

dennislp3

  • Bay Watcher
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #23 on: October 15, 2012, 05:44:58 pm »

Oh-ho, you make some delicious points~ *SNIP*

I was also considering having soil nutrients in game...I haven't decided how detailed I want to go with stats...but I certainly want a nutrition system in for the PC/NPCs that can be affected by soil nutrition.

I am of course aiming towards a pretty hardcore simulator more than anything. Closer to a...sim village? type thing. may not even have a player but instead a DF like overview. Obviously I want to make it different from DF/Towns/Gnomoria/etc and have many ideas to make that happen.

This allows things like silly peasants that can wallow in poor health and few food options while the town mayor can be fat and jolly for example. That of course has much potential to tie in with AI triggers of whatever nature.
« Last Edit: October 15, 2012, 05:54:43 pm by dennislp3 »
Logged

Girlinhat

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

I've actually been debating soil nutrients as well, and how to implement them politely.  The main conclusion that I came to, is that when you're defining a farm plot and what to plant, you'd get a list of available seeds and get a red flag on the ones that would handle the nutrients poorly.  Crop rotation is fun, and it's realistic, but in the real world people have had thousands of years to figure out, "Ok, peanuts THEN cotton!" while in-game, you'll play for a few hours and get frustrated.  Having the assumed knowledge displayed in a way that the player can easily use it would be best.  You could have a book somewhere that states "it's a good idea to rotate crops" but then the player's just running back and forth from field to book and using notepad to remember details.  That's not very fun.  It's slightly less realistic and hardcore, but I believe infinitely more playable if the info on what crops would work poorly and which would work well was displayed as you plant them.  It would tell you "It's spring, so plant potatoes because this soil is good for them."  It would not tell you "Plant potatoes now, then peanuts, then tobacco." because that's a little too much hand-holding.  The player should be able to pay attention and devise a method of crop rotation to suit them, or just wing it and plant whatever the game highlights in green.

Coincidentally, the more I think about this, the more I imagine it as "first person DF" style.  You can give orders and everything, but only to things that you can see.

Now for community input!  I'm debating how to handle traders.  Certain things shouldn't be easily available to the player, like ore and salt, because those require a certain type of gathering.  How should a trader function?  It could be a static place on the map where you can go to market, but I kind of like the idea of having a wagon show up too.  Wagon pathfinding may be tricky, so it may be more like a DF caravan.  The idea of highly busy trade fairs just seems like a lot of fun.

dennislp3

  • Bay Watcher
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #25 on: October 15, 2012, 07:22:34 pm »

I've actually been debating soil nutrients as well, and how to implement them politely....*SNIP*

I am also trying to deal with this too...I don't want anyone to need to leave the game for reference material. I have considered making crop rotations a "setting" or something that can be unlocked via technology....and the technology system is a whole new mess I am trying to untangle as best I can. It will probably be a fairly passive system with luck favoring into when techs unlock.

Now for community input!  I'm debating how to handle traders.

Both? Limited stock traders that are static and maybe a traveling trader? Traveling traders make the most sense in that a trader is not always available and must travel to sell and acquire new goods. Perhaps make them work in tandem. The static trader has X amount of coin that can be used to buy player goods. This gold is refreshed with the traveling trader as well as new goods being brought in and the option to buy from the traveling trader during short periods.

Would add a bit of trade strategy in there...

Do you sell your excess crops for coin which may rot or do you sell your other resources that take up room and may rot as well? Food for thought I suppose.

As a final point...I am personally opposed to the idea of a "universal and unlimited" trader. IE no single merchant you can sell everything to without limit or buy anything from.

Would love to hear other ideas from people.
Logged

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #26 on: October 15, 2012, 07:29:40 pm »

More than likely, NPC traders will get a defined box.  For nearby farmers, they may trade out of their storehouse, and sell their overflow, but also perhaps sell their winter food if you offer enough coin (or enough swords).  It would do a quick check on that farm's population and then check the food stock in the silo, and once you buy all the stock down to the "daily ration * days left" math, then it becomes incredibly expensive or simply refused.  Similar for their toolshed.  Traveling merchants would get a cargo to their pack animals or wagons, and would only carry a certain stock of items.  The wagon would have very high storage capacity, compared to say, a tool rack built inside a shed.  During a trade fair, then traders would set up a stand and put their goods in a square on the ground that you could browse.

Either way, you can only trade what the NPC actually has, no unlimited stock of HP potions!  Probably also buy workers too, along with the usual recruiting of drifters.

As for crop rotation, perhaps one of the rare items you can't produce yourself could be a Farmer's Almanac, which would describe pretty much everything you need to know to keep a farm running smooth.

NRDL

  • Bay Watcher
  • I Actually Like Elves
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #27 on: October 15, 2012, 07:34:59 pm »

PTW

A farming game, with zombies?

ABSOLUTE WIN
Logged
GOD DAMN IT NRDL.
NRDL will roll a die and decide how sadistic and insane he's feeling well you do.

Lectorog

  • Bay Watcher
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #28 on: October 15, 2012, 07:41:16 pm »

You could have occasional traveling traders (going by near your farm) that sell more rare / hard-to-get goods.

I think you should definitely implement trading in town. Unless you're going for some weird setting where there are no towns, only farms.
Logged

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Let's make a roguelike, amateur programming at its... finest?
« Reply #29 on: October 15, 2012, 07:53:59 pm »

I was actually thinking it more Haven and Hearth style - you spawn in the middle of nowhere, now start to panic!  Still unsure if I want a great deal of civilization or not, because I really like the idea of true wilderness survival.  If you're able to just pop over to town then it's not as hardcore.  Hmm... unless the town is militarian and the guards shoot you if you stay more than an hour...  Another possibility is to send a trader away, like how DF caravans work, so you could slowly send someone to fetch supplies from town, but do most of the trading locally.  I dunno, a tough balance between wilderness survival and economic trade.

It may do, to say that you've been given this plot of land to farm on, so you're not allowed to do things off your plot, but that seems a bit restrictive.  And then if you're able to do things anywhere, then what's to stop you from huddling just outside of town on easymode?  Hmm... maybe soil near town is very poor quality, and crops are tasteless and small?  You have to venture out to find fertile soil?

I'm also debating how to handle time.  365 day years would get rather boring rather fast, and players would probably quit before harvest came in.
Pages: 1 [2] 3 4 ... 7