Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411423 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 18, 2024, 11:34:33 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsPanacea - an alchemy/farming/defense roguelike
Pages: [1] 2 3 ... 6
Print
Author Topic: Panacea - an alchemy/farming/defense roguelike  (Read 27392 times)
sublinimal
Level 8
***



View Profile
« on: October 25, 2011, 01:50:33 PM »


I guess I'll make a devlog after all. Mainly to keep track of my checkpoints, so you probably can't expect frequent updates.

So I'm working on this text-based game in Python. I've got a clear outline of what I'm going for. The concept is that everything revolves around farming herbs and mixing potions out of them. For example, you don't wield items or use magic, combat is handled by drinking/throwing potions. Different species of herbs multiply by the rules of different cellular automata, and selective breeding is required to get the most out of them (increases in effects, fertility, resistance to weather conditions...).



You start from two villages, each focusing on an elementary herb, one growing Rhoadasin (a healing herb) and the other Hyazine (a poisonous herb). As you proceed, you'll discover new herbs and potion recipes. The progression is clear: For each friendly region, there's a cave filled with monsters and a boss enemy, and passing through brings you to the next area. Monsters from these caves attack the nearby area at night, and protecting your farms is part of the survival.



A lot of the challenge lies in the strictly limited amount of potions you can carry. It's not possible to conquer a cave simply by manufacturing a ton of cannon fodder potions, you'll have to farm and mix efficiently. Villages can be defended more easily, as you have the townsfolk to help you. Doing your duty to guard your current residence also improves your trading opportunities there. (But of course, hardcore players would farm in the wild alone, with more room, no taxes, better soil & weather.)



During the weekend, I've made some progress after a while, mainly working on inventory management, alchemy and menus.



Right now the project is roughly 1700 lines of code spread across 7 files, but I'm going to have to rewrite chunks of it.
« Last Edit: October 26, 2011, 09:32:09 AM by sublinimal » Logged
sublinimal
Level 8
***



View Profile
« Reply #1 on: October 26, 2011, 09:32:32 AM »

I think I've got a good working title for this game.

Panacea, the Greek goddess of healing, and the name of a cure-all medicine alchemists sought. It rolls off the tongue, sounds somewhat mysterious, and is quite fitting. I gave a shot at making a stylized ASCII title for it.



Rewriting my pathfinding code at the moment, and working on some music loops - nostalgic, classy, a bit on the JRPG side.
Logged
sabajt
Level 1
*



View Profile WWW
« Reply #2 on: October 26, 2011, 12:02:48 PM »

wow, that title graphic is metal  Hand Metal Left Mock Anger Hand Metal Right

Quote
Different species of herbs multiply by the rules of different cellular automata, and selective breeding is required to get the most out of them

like this, very cool.

are you using a curses library for the ascii graphics?
Logged

sublinimal
Level 8
***



View Profile
« Reply #3 on: October 26, 2011, 12:45:24 PM »

are you using a curses library for the ascii graphics?

No. But I probably should be.
Logged
sublinimal
Level 8
***



View Profile
« Reply #4 on: October 28, 2011, 08:08:39 AM »

Struggling with bullshit errors, such as classes refusing to behave like OOP and prompts being displayed inconsistently. Structure-wise, the new code is cleaner and generalized, so I guess the net sanity will be positive. I think I'll just work around them for now.

Some song stubs here.
Logged
sabajt
Level 1
*



View Profile WWW
« Reply #5 on: October 28, 2011, 11:17:36 AM »

are you using a curses library for the ascii graphics?

No. But I probably should be.

I'll suggest: http://inventwithpython.com/pygcurse/

If you're just using a command line right now and want to switch over, it would probably mean a total re-write of your code ... but might be worth looking into if you're not too far in. Here's why I say that:

It's a curses library that uses pygame, so it would be a totally different approach and would require you to also learn pygame, but might scale easier for a large project AND would allow you to manipulate your graphics like images instead of text: meaning easy manipulation of size, rotation, added color, alpha values.  On top of that, you would have access pygame itself, and if you take a look at the pygame documentation (http://www.pygame.org/docs/) you'l get an idea of what that would give you.

I haven't used the Pygcurse, but the guy who made it (Al Sweigart) also wrote a great book teaching python programming from the ground up using pygame, so I'm sure Pygcurse is a well organized and functional tool, as he knows the tech forwards and backwards.  If you know python well enough to write what you've done so far, learning pygame would be no problem.

So yeah, not sure if you want to take it that direction at all, but just sharing what I know, good luck!
Logged

sublinimal
Level 8
***



View Profile
« Reply #6 on: October 28, 2011, 12:10:39 PM »

It's a curses library that uses pygame, so it would be a totally different approach and would require you to also learn pygame, but might scale easier for a large project AND would allow you to manipulate your graphics like images instead of text: meaning easy manipulation of size, rotation, added color, alpha values. 

Ah, I'm actually quite experienced with Pygame already, it's my default choice of library when I'm doing games or graphical stuff with Python. As for Panacea, I'm using it for real-time keyboard input and music playback.

I like to do things the hard way, since self-imposed limitations tend to boost creativity, but sometimes I'm not sure myself if I'm just being stubborn. Pygcurse could come in handy though (I'm looking at the colored text and non-flickery output), so thanks for the heads-up.
Logged
sublinimal
Level 8
***



View Profile
« Reply #7 on: October 29, 2011, 11:50:33 AM »

Most of the boring stuff is rewritten, and it seems to hold together so far. You can explore the world, talk/trade with people, use alchemy, plant some herbs. After this, it'll be time to brainstorm the gameplay more precisely.

I'm going to think out loud a bit: You start in a cave with some ready-made potions in your inventory. It works as a sort of combat tutorial, but in the loosest sense of the word: I don't mean pop-ups and "now move over here", just a short glimpse of what it's like. It throws you straight in the action, which is fitting because you'll have to start over regularly, and it also increases the 'wow' factor when you find out there's more to the game than dungeon dwelling. I figure caves wouldn't go down/up like in the usual roguelike style, they'd be connected in 1-4 cardinal directions. That style hasn't been explored in roguelikes very often, so there's a lot of new ground to cover and quirks to invent, such as enemies holding keys to the doors in each direction. In the end you'd arrive at the overworld with the two villages I mentioned earlier.

Each village has privately owned farms. You need to book yourself in a village, which will allow you to farm/sleep/store items there. Certain villages only support certain plants depending on the climate and some other restrictions - as for the first two villages, one only accepts Rhoadasin and the other only Hyazine. Their culture revolves around farming, and they have a love-hate relationship. Before the nearby bridge broke down, they were frequently under attack, and they needed each other's products for defending.

The first thing to do is to rebuild the bridge so you can reach the first "real" cave. Enemies don't invade villages until the bridge's up; it makes sense plot-wise and reduces the amount of mechanics thrown at a new player's face. A merchant travels back and forth between the villages, bringing one town's goods to the other. His business has been slow without the monster attacks, so he secretly wants an outsider to rebuild it. He'll sell you some black market bridge-building equipment once you have enough valuables. The economy is purely trade-based, so you'll have to learn how to grow and mix stuff before you can proceed.

I'm thinking of the design in the terms of an average player and a hardcore one who goes for self-imposed challenges. The first could acquaintaince themselves with the villages, talk to the people and so on, the latter might just want to speedrun for the bridge by growing stuff in the starter cave (which is risky and requires more micromanaging but is more productive). Rather than hard-coding a "normal" and a "hard" mode, I'd like to embed the choices in the gameplay that way.

I've posted quite a few teaser screenshots, but I'm hoping to have something playable up soon.
Logged
Ashkin
Guest
« Reply #8 on: October 29, 2011, 12:28:08 PM »

This sounds fun! I like games about farming.
Logged
Starflier
Level 2
**


I can't see how this could possibly go wrong...


View Profile WWW
« Reply #9 on: October 29, 2011, 12:49:00 PM »

I love the concept of roguelikes, but tend to be very bad at them. I'ma keep my eye on this one though, it sounds like fun Smiley
Logged

Metal Snail Idea Workshop - Hey, there's actually a website there now X(
Cats in the Kitchen - It's a comic about cooking, and the cooks that do it...
sublinimal
Level 8
***



View Profile
« Reply #10 on: October 30, 2011, 06:39:15 AM »

Toying around with the Pygcurse library. While it's convenient, all the fonts I've tried so far look incredibly ugly. Forced anti-alias and absurd spacing, which is disappointing for a text-based library.



The good thing is, it doesn't seem to demand massive rewriting if I chose to use it.
« Last Edit: October 30, 2011, 06:54:30 AM by sublinimal » Logged
delete me
Level 0
***

This account is very old, I don't use it.


View Profile
« Reply #11 on: October 30, 2011, 07:59:22 AM »

Looking good so far dude. I like the idea, title, and colors so far.
Logged
agersant
Level 4
****



View Profile
« Reply #12 on: October 30, 2011, 08:03:39 AM »

Your title artwork is great and the concept is cool too (even though I don't play roguelikes nor crafting games). Keep up the good work !
Logged
Pineapple
Level 10
*****

~♪


View Profile WWW
« Reply #13 on: October 30, 2011, 10:10:34 AM »

This looks excellent, it seems like you're making this into a genuinely interesting game  Grin Hand Thumbs Up Right
Logged
sublinimal
Level 8
***



View Profile
« Reply #14 on: October 30, 2011, 01:43:17 PM »

Trying to implement a decent system for dialogue/event trees.

In a typical discussion, you have a choice between "news", "small talk", and "trade". "Trade" does what it says on the tin: if both parties have items and are willing to trade, the trade screen pops up. The value of items is influenced by your charisma and reputation. "Small talk" is generally unchanging information about the area, the game lore, or the character itself. NPCs have small, unique phrase pools from which one comment is pulled at a time.

"News" is the most flexible one. It contains quests, events, and timely information. A good example in the starting villages is how citizens will tell you to go see the mayor on your first visit. He in turn asks you if you want to get booked, which lets you create a farm and access the village's services. After that event is over, citizens in that village move on to the next subject. News aren't just about hard-coded, plot-related events, NPCs will also comment on the latest invasion and such.

I'll do this step by step, checkpoint by checkpoint. I've got ideas for some more complex NPC behaviour (such as maintaining a farm), but at the moment I'm just working to get the basics right. The first release you'll see will probably just consist of walking around, chatting and farming, with no specific goal. If everything won't crash and burn, it's probably time for the combat framework.

Speaking of crashing and burning, I've screwed up my module organization. I thought I'd transfer some functions to new modules for clarity and availability, but then familiar global variables turned into undefined ones, and fixing one problem introduced two more. Everything just escalated from there, and I can't seem to get anything to work now.
Logged
Pineapple
Level 10
*****

~♪


View Profile WWW
« Reply #15 on: October 30, 2011, 02:16:48 PM »

fix it
fix itttt
Logged
sublinimal
Level 8
***



View Profile
« Reply #16 on: October 30, 2011, 03:50:44 PM »

I already did. Don't worry, it'll take more than this to stop me. But I did resort to some nasty in-function importing, so I have a feeling this'll boomerang back at me later on.

Better record some event testing while it is still working. We start with some small talk, and the "news" option gives you the choice of booking. The line breaks in dialogue are awkward, that much I can tell.



The bigger the farm, the more taxes you'll have to pay.  

Before someone asks: The numbers under your selected item are (respectively) the herb's optimal light level/hydration/temperature and dominance - each on a scale of 1-10. The closer you are to an individual herb's optimal conditions, the better its offspring will be. Dominance just means that when two herbs are trying to occupy the same cell while spreading, the one with a higher number wins. It's why you don't farm poisonous herbs in the same place as healing herbs.

Twiddling with the numbers would already offer a fair amount of micromanaging, but I'm dreaming of some fancy gene-based system that allows talented breeders to create monster plants.
« Last Edit: October 30, 2011, 03:57:08 PM by sublinimal » Logged
sublinimal
Level 8
***



View Profile
« Reply #17 on: October 31, 2011, 01:56:29 PM »

The fundamental breeding system is just about done, I just need to decide how to best handle births/deaths/conflicts with different herb species and tinker with inheritance. These are design issues, not programming ones. For example, do I want cross-species breeding, or several isolated cellular automata running simultaneously? I'm thinking of going with the latter until I implement genes. Survival takes into account all neighbouring herbs (a matter of space), while birth required the same species (a matter of inheritance).

Age is also taken into account. The life cycle should be something like seed -> sprout -> ripe -> mature -> withering -> dead, spread over a time period depending on the species. The harvesting age affects the results of alchemy. Carelessly bred herbs will eventually have retarded growth, but overbreeding can lead into dying before you can reap the benefits. Which is only a realistic danger when a species already has a low natural lifespan.

Out of the starter herbs, Hyazine takes 2 or 3 neighbours to survive, and an empty cell takes 4 Hyazine neighbours to give birth to a new one. Rhoadasin is the same except more fertile, a birth only requires 3 neighbours. Both age fast enough to spread each night by default. Some more demanding herbs will take several days to grow and spread, and thrive in very specific conditions.

You might have noticed that Rhoadasin's rules are identical to Conway's Game of Life:



The closer you are to optimal conditions, the safer, more predictable farming is. The further you are from optimal conditions, the more randomness you'll see in the attributes. But of course, take it to the extremes and you won't get crops at all. It's only logical: when a herb is in the conditions it's best suited for, it has the least need for mutations. Selective breeding is required to increase their potential. A village's conditions are optimal for the herb it specializes in. This means that if you want mutations (-> stronger herbs), you'll have to farm outside of the comfort zone. The risk and difficulty are higher but so are the rewards.

In the start of the game, you don't have the equipment to create farms without villagers' help. If simply keeping your crops alive isn't enough and you want to be efficient as well, you're going to have to micromanage. That is, reap & re-sow herbs at the right time, pay attention to the attributes, learn to get the most out of trading. Later on, you'll learn how to create farms pretty much anywhere; it offers more responsibility in choosing a location and demands more maintenance. Caves are some of the most hardcore places for farming. Caves have naturally occuring plantations in difficult conditions - strong invasions with nobody to help, plus it's dark, cold and dry. They're also where you might discover new species of herbs.
Logged
Pineapple
Level 10
*****

~♪


View Profile WWW
« Reply #18 on: October 31, 2011, 03:08:06 PM »

honestly I don't think cellular automata is the best way to go about plant breeding behavior. it seems cool conceptually but it feels like it's a little too unrealistic to the point where it contrasts with the idea of considering such things like genetics.
Logged
sublinimal
Level 8
***



View Profile
« Reply #19 on: October 31, 2011, 03:49:50 PM »

It just seems like the most straightforward way of making growth in a tile-based world deterministic, interesting, and sometimes even beautiful. To the point where I'm struggling to think of alternatives. I'm not really worried about realism since the magical nature of the plants is part of my plot sketches.

But I do see your point, the breeding system is too mechanical. Contraptions like automatic glider guns are over the top. I'm planning to round the corners by introducing more variables. For example, a plant would only multiply (and be counted as a neighbour) when it reaches a certain age.
Logged
Pages: [1] 2 3 ... 6
Print
Jump to:  

Theme orange-lt created by panic