FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Topics & Contributions
   Responsive Form, Games
(Moderator: REAS)
   Tamagotchi program
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: Tamagotchi program  (Read 2868 times)
katapulp


Tamagotchi program
« on: Nov 13th, 2004, 8:43pm »

Hi there,
 
i'd like to build a tamagotchi-like game in processing, which might work with a client / server architecture. Everytimes someone connects on the client script, he'd receive the data of the game (energy, joy, hunger) and he could upload the new data on the server script after playing.  
 
My unique question is:
Does someone think it would be possible to code it in processing language?  
 
I started to look the Shared Canvas Server by hbarragan
(http://www.regarde.org/processing/shared_canvas.txt), i keep studying on this script in order to fully understand it...
 
TomC

WWW
Re: Tamagotchi program
« Reply #1 on: Nov 14th, 2004, 12:02pm »

Processing is ideal for the client end of your project, but there are some difficulties with saving data to a server.
 
If it's on the web, it will have to load and save its state by talking to a web application, such as a simple PHP page, which is on the same domain as the applet was served from.
 
i.e. if www.example.com/applet/index.html gets loaded into the browser, then the applet (running on the client) can only load images and text from elsewhere on example.com
 
Hernando's example uses direct network communication, which will only work if the programs are being run as an application, or inside the processing environment.
 
There are a few examples on this board of how to get Processing talking to a PHP page (some use XML), but you'll have to look elsewhere for how to get a PHP (or similar) to read/write a database.  You'll also have to work out how you're going to identify your users, otherwise everyone will get the same tomagotchi and if it gets popular it will quickly get out of sync!
 
 
katapulp


Re: Tamagotchi program
« Reply #2 on: Nov 14th, 2004, 2:26pm »

thx for the tips!
 
Pages: 1 

« Previous topic | Next topic »