Subject: Tree / Photosynthesizer gameplay prototype Sun Feb 22, 2015 1:49 pm
So first please imagine you are playing the game as a tree. How is it fun? What do you do?
I think this is a pretty hard problem but here is my suggestion for a way to resolve it.
This is a prototype for gameplay as a photosynthesizing microbe, one which cannot move and just sits there, much as a tree would. The basic concept is that time is sped up a lot (you can see the sun whiz through the sky as the days pass) and you decide how to allocate your resources.
Here is the resource tree, it's just hypothetical, it's not, in any way, biologically accurate.
Spoiler:
Here is the video of me playing. The bars along the bottom show how much of something I have (the nut. is the nutrients in the sea). In the spring and autumn there are big boosts of nutrients so you have to get good growth then.
As for strategy the questions are do you make toxin? It costs valuable protein but can ward off attacks (I chose to). How big do you want to grow? The bigger you are the more compounds you can store and the better advantage you can take of the spring growth spurt.
How much do you repair? If your health falls to 0 you are dead but really what you want is reproductase. That's what lets you get back to the editor. If you don't get enough reproductase before you die of old age then you can't edit and have to play again.
The bars go blue when the process that makes that thing is active. You activate a process by pressing the key indicated beneath the bar.
I guess how this would become a full game mode is there would be a lot more bars (or however you wanted to display them) and playing would be a bit like playing an instrument.
The main problem with this prototype is it would require a radically different gui / control scheme from what we have now. However I think making fun gameplay for photosynthesizers is a hard problem and I actually felt good playing this (even though it is a very rough prototype). I felt like I really wanted to get the last bit of reproductase before the spring bloom was over otherwise I was worried I might not make it (especially if I sprung a leak while heavy with it!) and that makes me think it might work as engaging gameplay.
Though obviously it would be a lot of effort to incorporate a mode like this.
What do you think? All feedback welcome.
Code also in the prototypes git folder.
Code:
# A prototype for gameplay as a photosynthesizing microbe for Thrive
import pygame import math import random from pygame.locals import *
def rendermessage(message): message.append(' ') message.append('Press SPACE to dismiss this message') X = 100 Y = 100 pygame.draw.polygon(screen, (0,255,255), [(X,Y), (X + width - 200,Y), (X + width - 200,Y + height - 200), (X,Y + height - 200)], 0) for i in range(len(message)): label = myfont.render(message[i], 1, (0,0,0)) screen.blit(label, (X + 100, Y + 100 + 20*i)) pygame.display.flip() run = True while run: for event in pygame.event.get(): if event.type == pygame.QUIT: run = False elif event.type == KEYDOWN: if event.key == K_ESCAPE: run = False if event.key == K_SPACE: run = False
def displaybar(name, number, value, control, state): colour = (0,0,255) if state == False: colour = (255,0,0) X = int(100 + number*100) Y = int(height - 50) value = int(value) pygame.draw.polygon(screen, colour, [(X,Y), (X , Y - value), (X + 10,Y - value), (X + 10,Y)], 0) label = myfont.render(name, 5, colour) screen.blit(label, (X - 10, Y + 10)) label = myfont.render(control, 5, colour) screen.blit(label, (X , Y + 25)) label = myfont.render(str(int(value)), 5, colour) screen.blit(label, (X - 5, Y - 20 - value))
def displaytime(hour,sunlight, season): X_increment = (width - 200)/24 X = int(100 + X_increment*hour) Y = int(100) pygame.draw.circle(screen, (255,255,0), (X,Y), int(sunlight*100)) X = 100 Y = 100 label = myfont.render('Time : ' + str(int(hour)) + ':00', 5, (0,0,0)) screen.blit(label, (X , Y )) if season == 0: label = myfont.render('spring', 5, (0,0,0)) screen.blit(label, (X , Y + 20)) elif season == 1: label = myfont.render('summer', 5, (0,0,0)) screen.blit(label, (X , Y + 20)) elif season == 2: label = myfont.render('autumn', 5, (0,0,0)) screen.blit(label, (X , Y + 20)) elif season == 3: label = myfont.render('winter', 5, (0,0,0)) screen.blit(label, (X , Y + 20)) label = myfont.render('Age : ' + str(int(age)) + ' / ' + str(int(max_age)), 5, (0,0,0)) screen.blit(label, (X , Y + 40 ))
def gameoverfail(): rendermessage(['You died without reproducing!', 'You only got ' + str(int(reproductase)) + ' reproductase.', 'Youll never make it to the space stage with performace like that!']) run = True while run: for event in pygame.event.get(): if event.type == pygame.QUIT: run = False elif event.type == KEYDOWN: if event.key == K_ESCAPE: run = False if event.key == K_SPACE: run = False pygame.quit()
def gameoverwin(): rendermessage(['You did it!', 'Good Job Buddy.', 'Your descendants will cross the stars!']) run = True while run: for event in pygame.event.get(): if event.type == pygame.QUIT: run = False elif event.type == KEYDOWN: if event.key == K_ESCAPE: run = False if event.key == K_SPACE: run = False pygame.quit()
def event1(): global health rendermessage(['Under attack!', 'Lose 20 Health']) health -= 20
def event2(): global reproductase rendermessage(['Sprung a leak!', 'Lose half your reproductase!']) reproductase = 0.5*reproductase
def event3(): global toxin global health if toxin >= 20: rendermessage(['Attacked', 'Good thing you had Toxin!']) toxin -= 15 return else: rendermessage(['Attacked', 'Without Toxin to defend yourself you got hurt bad!']) health -= 50 return
rendermessage(['Hi', 'This is a prototype for gameplay as a photosynthesizing microbe.', 'Nutrients can be stored and then turned into Protein and Cytoplasm.', 'Cytoplasm can be turned into growth and repair.', 'Protein can be turned into Toxin.', 'Both protein and cytoplasm are needed to make reproductase', 'Random events will happen and you must adapt to them as the seasons change.', 'Your goal is to make ' + str(wincondition) + ' reproductase before you die of old age at age = ' + str(max_age), 'Nutrients are most available in the Spring and Autumn', 'Youll need to grow to be able to store more compounds', 'You need sunlight to make protein, the amount of sunlight is that big yellow ball in the sky!', 'Producing protein in the night wastes resources! You have been warned.', 'Press SPACE to pause', 'Good Luck!'])
while running: for event in pygame.event.get(): if event.type == pygame.QUIT: running = False elif event.type == KEYDOWN: if event.key == K_ESCAPE: running = False if event.key == K_s: storing = not storing if event.key == K_c: making_cytoplasm = not making_cytoplasm if event.key == K_p: making_protein = not making_protein if event.key == K_g: growing = not growing if event.key == K_r: repairing = not repairing if event.key == K_t: making_toxin = not making_toxin if event.key == K_x: making_reproductase = not making_reproductase if event.key == K_SPACE: pause = not pause
if pause: label = myfont.render('PAUSE', 5, (0,0,0)) screen.blit(label, (780 , 400)) pygame.display.flip() while pause:
for event in pygame.event.get(): if event.type == pygame.QUIT: pause = False elif event.type == KEYDOWN: if event.key == K_ESCAPE: pause = False if event.key == K_SPACE: pause = False
choice = random.randint(0,10000) if choice <= 1: i = random.choice(listofevents) i()
if reproductase >= wincondition: gameoverwin() if health <= 0: gameoverfail()
hour += timestep if hour >= 24: hour = 0 day += 1 age += 1 if age >= max_age: gameoverfail() if day >= 20: day = 0 season = int(day/5) season_modifier = math.sin((math.pi/3) + season*(math.pi/6)) nutrients = base_nutrients*(1 + (math.cos(day*math.pi/7)))/((day/4) + 1)
if storing and nutrients >= 0 and nutrients_stored >= 0 and nutrients_stored <= compounds_stored_max: difference = - nutrients_stored + nutrients nutrients -= 0.01*difference nutrients_stored += 0.01*difference
if making_cytoplasm and (nutrients_stored >= 1) and cytoplasm <= compounds_stored_max: nutrients_stored -= 0.1 cytoplasm += 0.1
if making_protein and (nutrients_stored >= 1) and protein <= compounds_stored_max: nutrients_stored -= 0.3 protein += 0.2*sunlight
if making_reproductase and (protein >= 1) and (cytoplasm >= 1): protein -= 0.1 cytoplasm -= 0.1 reproductase += 0.01
if making_toxin and (protein >= 1) and toxin <= compounds_stored_max: protein -= 0.3 toxin += 0.1
if growing and (cytoplasm >= 1): cytoplasm -= 0.2 size += 0.01 compounds_stored_max = size*20
if repairing and (cytoplasm >= 1) and (health <= max_health): cytoplasm -= 0.3 health += 0.1
if protein >= 5*nutrients_stored and protein >= 10: protein -= 0.1 nutrients_stored += 0.1
if cytoplasm >= 5*nutrients_stored and cytoplasm >= 10: cytoplasm -= 0.1 nutrients_stored += 0.1
Posts : 66 Reputation : 15 Join date : 2014-05-17 Age : 26 Location : UrANUS.
Subject: Re: Tree / Photosynthesizer gameplay prototype Mon Feb 23, 2015 1:01 pm
I really like your prototype, obviously we will need to polish it and make it not-ugly but i really see the potential of this, maybe for a player who wants a break/minimalistic gameplay. Some things/mechanics I'll add for a more baroque/complex gameplay would be QTE's (Quick Time Events) or some sort of little puzzle for when your plant is attacked (like in the video) or other sudden event.
tjwhale Theorist
Posts : 87 Reputation : 26 Join date : 2014-09-07
Subject: Re: Tree / Photosynthesizer gameplay prototype Tue Feb 24, 2015 6:49 pm
Thanks. I think it might make playing as a tree possible.
Sponsored content
Subject: Re: Tree / Photosynthesizer gameplay prototype