Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to remember variables on refresh #6

Open
carlgordon64 opened this issue Sep 20, 2016 · 3 comments
Open

Ability to remember variables on refresh #6

carlgordon64 opened this issue Sep 20, 2016 · 3 comments

Comments

@carlgordon64
Copy link

carlgordon64 commented Sep 20, 2016

If the framework was extended to have some kind of memory caching ability it allow us to explore more advanced concepts. for example if there was a player in the sketch with a health bar it would be great if the sketch remembered what the health was set to last time the code refreshed. I think this would let us craft a procedural narrative that would tell a story over time rather than just returning procedural results each time.
Edit** I think this would need some kind of database connection, if they sketch was sending variables to an external database rather than within itself the values wouldn't get reset on refresh.
Might be possible with PHP, MySQLi or Rails

@bryanlohjy
Copy link

This is great. It's simple but a powerful idea. Being able to have posts relate to each other will allow for more complex and engaging bots. Currently, FireBase is a good workaround for this on an individual basis. It'd be cool to see it implemented to the whole user framework.

@Taylor-Bryant
Copy link

I completely agree with this, I think having the ability to store data across tweets would let us do some very interesting things, as Bryan said the idea is simple but simple ideas like this can have the most impact due to how versatile they can be and how it is applied

@EmperorJack
Copy link

I am totally in favour of this. Though a web server would be the best choice for the infrastructure of this bot framework another good alternative for the current setup would be a kind of map / key value store. Each person would have their own personal file on the class server, this data would be passed to the bot when it is executed by the p5bot (perhaps as JSON) and then reads can occur. The bot would be able to write back to it by storing data in the html where the p5bot would read it into the stored file, adding new entries and overwriting any existing content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants