0

I'm a beginner in all things code, but am extremely interested in working with it. I am a photo student wanting to integrate digital media and my photographic processes. I was seeing if anyone had any advice for a problem I'm having. I started using Processing to achieve a "generation loss" compression effect to my photographs, and I want to move that to the web. So what I want to happen is every time someone goes to the specified web address, the application, will continue. For example, if I am the first user there, I see the first photograph in the sequence. If I am the 650th person, I see the 650th image. I was wondering if anyone had any suggestions, if I should continue trying to use Processing, or use a javascript, or any other means. Any help would be greatly appreciated! I can also post what I'm using in processing and such. Thanks so much in advance.

  • It would be a start to share what you're doing with Processing, but this question is pretty vague and it's probably not going to get very much positive attention here.... – A.O. Mar 24 '14 at 23:34
  • A.O. is right. This isn't a technical question with a proper answer so much as a "I have this idea, how do I do it?" and that's not what this site is for. Might be worth talking to a programmer and brainstorm some ideas. Then if you run into any more specific problems while trying to implement your solution, we'll be waiting. –  Mar 24 '14 at 23:42
  • Again, agreeing with A.O. Give a bit more detail and some code to help folks help you! – hrbrmstr Mar 24 '14 at 23:49
  • Hi all...yeah. I am working with a programmer and we both came to the conclusion to ask the internets! But, here is the basis of the process I'm working with. I am basically working with this sketch here. http://hadto.net/sketchbook/generation-loss/ – kristen Mar 25 '14 at 08:43
  • Basically, we were trying to achieve this processing app, but hosted on the web. Is there a way to get this application responsive to page hits or I guess in a sense to not continuously play when hit? I know I'm being so vague. I will try to keep narrowing this down. Thanks for your advice thus far. – kristen Mar 25 '14 at 08:47
  • I've created something very similar to what you're describing: [link.](https://gist.github.com/JamesFrost/10779668) – JamesFrost Apr 15 '14 at 22:04
  • Did you ever get this sorted out? – Kevin Workman Sep 27 '16 at 12:17

1 Answers1

0

You have to break this down into a few pieces: The first piece is the actual algorithm that "decays" an image based on some number. It sounds like you have that working. The second piece is storing that number on a server somewhere so that it can be accessed and modified by various users over multiple sessions. It sounds like that's the part you're confused about.

There isn't a way to automagically store variables across multiple runs in a Processing sketch. After all, that entire thing is actually being run on the clients' computer! But what you can do is store the variable in a central location so that everybody can "share" that variable.

There are many ways to accomplish that, which is why people are saying your question is too vague. The most obvious solution would be to use a database, although using a database to store a single number might seem like overkill. You could also setup your web server to increment a number stored in a file every time the page is accessed.

Which approach you take depends on the setup of your program, web server, as well as your own comfort level with programming.

Good luck! It sounds like an interesting project.

Kevin Workman
  • 41,537
  • 9
  • 68
  • 107
  • 1
    Thank you Kevin! Just having that much of a breakdown, will help me form a better question. But super helpful. Thanks. – kristen Mar 25 '14 at 16:58