Thrive Game Development
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Thrive Game Development

Development of the evolution game Thrive.
 
HomeHome  PortalPortal  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  
Welcome new and returning members!
If you're new, read around a bit before you post: the odds are we've already covered your suggestion.
If you want to join the development team, sign up and tell us why.
ADMIN is pleased to note that this marquee has finally been updated.
ADMIN reminds you that the Devblog is REQUIRED reading.
Currently: The Microbe Stage GUI is under heavy development
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Quick Links
Website
/r/thrive
GitHub
FAQs
Wiki
New Posts
Search
 
 

Display results as :
 
Rechercher Advanced Search
Statistics
We have 1675 registered users
The newest registered user is dejo123

Our users have posted a total of 30851 messages in 1411 subjects
Who is online?
In total there are 3 users online :: 0 Registered, 0 Hidden and 3 Guests

None

Most users ever online was 443 on Sun Mar 17, 2013 5:41 pm
Latest topics
» THIS FORUM IS NOW OBSOLETE
Tree / Photosynthesizer gameplay prototype Emptyby NickTheNick Sat Sep 26, 2015 10:26 pm

» To all the people who come here looking for thrive.
Tree / Photosynthesizer gameplay prototype Emptyby NickTheNick Sat Sep 26, 2015 10:22 pm

» Build Error Code::Blocks / CMake
Tree / Photosynthesizer gameplay prototype Emptyby crovea Tue Jul 28, 2015 5:28 pm

» Hello! I can translate in japanese
Tree / Photosynthesizer gameplay prototype Emptyby tjwhale Thu Jul 02, 2015 7:23 pm

» On Leave (Offline thread)
Tree / Photosynthesizer gameplay prototype Emptyby NickTheNick Wed Jul 01, 2015 12:20 am

» Devblog #14: A Brave New Forum
Tree / Photosynthesizer gameplay prototype Emptyby NickTheNick Mon Jun 29, 2015 4:49 am

» Application for Programmer
Tree / Photosynthesizer gameplay prototype Emptyby crovea Fri Jun 26, 2015 11:14 am

» Re-Reapplication
Tree / Photosynthesizer gameplay prototype Emptyby The Creator Thu Jun 25, 2015 10:57 pm

» Application (programming)
Tree / Photosynthesizer gameplay prototype Emptyby crovea Tue Jun 23, 2015 8:00 am

» Achieving Sapience
Tree / Photosynthesizer gameplay prototype Emptyby MitochondriaBox Sun Jun 21, 2015 7:03 pm

» Microbe Stage GDD
Tree / Photosynthesizer gameplay prototype Emptyby tjwhale Sat Jun 20, 2015 3:44 pm

» Application for Programmer/ Theorist
Tree / Photosynthesizer gameplay prototype Emptyby tjwhale Wed Jun 17, 2015 9:56 am

» Application for a 3D Modeler.
Tree / Photosynthesizer gameplay prototype Emptyby Kaiju4u Wed Jun 10, 2015 11:16 am

» Presentation
Tree / Photosynthesizer gameplay prototype Emptyby Othithu Tue Jun 02, 2015 10:38 am

» Application of Sorts
Tree / Photosynthesizer gameplay prototype Emptyby crovea Sun May 31, 2015 5:06 pm

» want to contribute
Tree / Photosynthesizer gameplay prototype Emptyby Renzope Sun May 31, 2015 12:58 pm

» Music List Thread (Post New Themes Here)
Tree / Photosynthesizer gameplay prototype Emptyby Oliveriver Thu May 28, 2015 1:06 pm

» Application: English-Spanish translator
Tree / Photosynthesizer gameplay prototype Emptyby Renzope Tue May 26, 2015 1:53 pm

» Want to be promoter or project manager
Tree / Photosynthesizer gameplay prototype Emptyby TheBudderBros Sun May 24, 2015 9:00 pm

» A new round of Forum Revamps!
Tree / Photosynthesizer gameplay prototype Emptyby Oliveriver Wed May 20, 2015 11:32 am


 

 Tree / Photosynthesizer gameplay prototype

Go down 
2 posters
AuthorMessage
tjwhale
Theorist
tjwhale


Posts : 87
Reputation : 26
Join date : 2014-09-07

Tree / Photosynthesizer gameplay prototype Empty
PostSubject: Tree / Photosynthesizer gameplay prototype   Tree / Photosynthesizer gameplay prototype EmptySun 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 *

#setup

background_colour = (255,255,255)
(width, height) = (1600, 800)

screen = pygame.display.set_mode((width, height))#,pygame.FULLSCREEN)
screen.fill(background_colour)
pygame.display.set_caption('Photosynthesizing')
pygame.font.init()

myfont = pygame.font.SysFont("monospace", 20)

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

listofevents = [event1, event2, event3]


#days run from 0-19, seasons 0-3 with spring = 0

age = 0
max_age = 40
timestep = 0.02
hour = 0
sunlight = 0
day = 0
season = 0
season_modifier = 1
nutrients = 200
base_nutrients = 300
max_nutirents = 2*base_nutrients
nutrients_stored = 0
size = 5
max_health = size * 20
health = size * 20
compounds_stored_max = size*20
running = True
storing = False
making_cytoplasm = False
cytoplasm = 0
making_protein = False
protein = 0
making_toxin = False
toxin = 0
making_reproductase = False
reproductase = 0
growing = False
repairing = False
wincondition = 50
pause = False

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()
    

   screen.fill(background_colour)

   displaytime(hour, sunlight, season)

   
   displaybar('Nut.',1,nutrients,' ', True)

   displaybar('Nut. In', 2, nutrients_stored, 'S', storing)

   displaybar('Cyto.', 3, cytoplasm, 'C', making_cytoplasm)

   displaybar('Size', 4, size, 'G', growing)

   displaybar('Health', 5, health, 'R', repairing)

   displaybar('Prot.', 6, protein, 'P', making_protein)

   displaybar('Toxin', 7, toxin, 'T', making_toxin)

   displaybar('Repro.', 8, reproductase, 'X', making_reproductase)

   pygame.display.flip()

   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
   
   sunlight = max(0,season_modifier*math.sin((hour - 4)*math.pi/16))

pygame.quit()


Back to top Go down
Madero
Newcomer
Madero


Posts : 66
Reputation : 15
Join date : 2014-05-17
Age : 26
Location : UrANUS.

Tree / Photosynthesizer gameplay prototype Empty
PostSubject: Re: Tree / Photosynthesizer gameplay prototype   Tree / Photosynthesizer gameplay prototype EmptyMon 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.
Back to top Go down
https://soundcloud.com/m4d3r0
tjwhale
Theorist
tjwhale


Posts : 87
Reputation : 26
Join date : 2014-09-07

Tree / Photosynthesizer gameplay prototype Empty
PostSubject: Re: Tree / Photosynthesizer gameplay prototype   Tree / Photosynthesizer gameplay prototype EmptyTue Feb 24, 2015 6:49 pm

Thanks. I think it might make playing as a tree possible.
Back to top Go down
Sponsored content





Tree / Photosynthesizer gameplay prototype Empty
PostSubject: Re: Tree / Photosynthesizer gameplay prototype   Tree / Photosynthesizer gameplay prototype Empty

Back to top Go down
 
Tree / Photosynthesizer gameplay prototype
Back to top 
Page 1 of 1
 Similar topics
-
» Proceedural Tree Generator
» Prototype Subforum
» Prototype engine
» Population dynamics prototype
» Microbe Prototype #2

Permissions in this forum:You cannot reply to topics in this forum
Thrive Game Development :: Development :: Design :: Prototypes-
Jump to: