Just started learning to develop Phet, having a very hard time.

127 views
Skip to first unread message

Bennie

unread,
Jun 9, 2021, 5:53:24 PM6/9/21
to Developing Interactive Simulations in HTML5
Hi everyone!

I just started developing a simulation, and I don' t have any prior experience with Phet. I have the environment set up, but I don't know where to start coding wise. Im already having trouble setting a background image. Does anyone have tips on how to get familiar with developing with Phet, or do I just need to look at existing simulations. Because I can't make much of those yet.

cmalley

unread,
Jun 10, 2021, 3:08:46 PM6/10/21
to Developing Interactive Simulations in HTML5
Hi Bennie, welcome to the Group!

If you haven’t already, start by consulting the resources that I mentioned in this post:

After that... Yes, figuring out how to get started with creating a new sim is a daunting task.  It would be great if a tutorial or user manual existed, but PhET currently does not have those resources.  Your best options are:

(1) Study example-sim.
... with these goals:
* understand how the MVC (Model View Controller) design pattern is used 
* understand Property, and how you can "link" to a Property to be notified of changes
* try to add Nodes, understand how the scenery scene graph works

(2) Copy/adapt existing code. 
Find a simulation that is similar to your simulation in some way. For example, if your simulation needs a ruler, then look at beers-law-lab, which also has a ruler.  Ask in this Group if you need help finding a simulation that has a specific feature. Then copy/adapt the code to your simulation.

(3) Ask for help.
If you are stuck on a specific problem, ask for help in this Group. Describe what you’re trying to do, and describe the specific problems that you’re encountering. The more specific your problem is, and the more details you provide, the more likely you are to get help.  For example, you said “Im already having trouble setting a background image.”  That’s the kind of problem that this Group could help with, but not without more information.  

I hope this helps.

Chris Malley
PixelZoom, Inc.

Bennie

unread,
Jun 11, 2021, 5:51:19 AM6/11/21
to Developing Interactive Simulations in HTML5
Ok thanks, I will look into the example simulation :D
Just a question: Will you ever add documentation on Phet? I think it will help out people who just got into it like me out a lot.

cmalley

unread,
Jun 12, 2021, 9:58:21 AM6/12/21
to Developing Interactive Simulations in HTML5
Hi Bennie,

I have suggested improving developer resources to PhET.  See https://github.com/phetsims/phet-info/issues/163 and https://github.com/phetsims/example-sim/issues/13.  If you have additional ideas, or specific requests, feel free to comment in those GitHub issues.

Unfortunately, I think it's unlikely that big improvements will occur anytime soon. The traffic in this Group is relatively low, and demand for new simulations is high.  So PhET's focus is on new simulation development.  It's a matter of serving the most people with the resources available.   

Chris Malley
PixelZoom, Inc.

Reply all
Reply to author
Forward
0 new messages