Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

112 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Emoji Simulator (Advanced)!

Originally made by Nicky Case, and expanded upon by TheComputerCrasher.

My additions:

  • More built-in simulations, including Langton's Ant and (a very basic version of) Sandboxels!
  • More cell features, like being able to move to a specific direction instead of randomly!
  • Fixes for some of the issues in the original project!
  • Unused features reimplemented!
  • Complete backwards compatibility with projects made in the original!
  • A Python script to convert certain cellular automata rules into Emoji Sim models!
  • More complicated and harder to understand!
  • Wait, what was that last one?

Dedicated to the public domain with Creative Commons Zero! I'm giving away all my art/code/words, so that you teachers, scientists, hobbyists, activists, and emoji-lovers can use them however you like! This is for you. (The original project is public domain as well!)

This means you're completely free to do whatever you want with this project, even make money off of it if you find a way to do that. All I ask is that you be responsible and give credit where it's due.

How To Run This On Your Own Computertron

Basically just download this Github repository, and host it on some local server. I use Python3's http.server (just run python3 -m http.server in your terminal) on desktop and Simple HTTP Server on mobile, but you can also use MAMP, NPM's http-server, or another one of your choice. (Emoji Simulator is really just a bunch of static files, but it needs to be on a server because of some weird browser security issues with XMLHttpRequests.)

Saving your own sims locally:

  1. Get it running on your own computertron (see above). For the sake of this example, let's assume it's running on http://localhost:8080/ (which it will by default for most local server applications).
  2. Go to http://localhost:8080/ in your browser, and make your own sim!
  3. Click "export model". Your simulation's data should be downloaded as a .json file.
  4. Name your sim! Make sure the name only has letters, numbers, underscores, and/or dashes.
  5. Finally, to see it in action, go to http://localhost:8080/?s=your_sim_name, and voilà! You can keep editing and exporting from there, just copy-paste the new data to your_sim_name.json, click save, and refresh the page.

Other People's Stuff This Uses

They're all open source! Unlike this project though, they're not public domain, so be sure to follow their licenses' rules. They can be found in /scripts/libraries, and at the following links:

Code Stuff:

  • MinPubSub - A tiny publish/subscribe library.
  • Perfect Scrollbar - Custom scrollbars, mostly because of a MacOS issue.
  • requestAnimationFrame shim - A requestAnimationFrame polyfill.
  • reqwest - A tiny XMLHttpRequest library.
  • Platform.js - To test browser/OS, because there is apparently no good emoji feature detection. (Unused)
  • alife - Helped me understand some poorly-documented cellular automata like the Chou-Reggia loops.

Font Stuff:

  • Sniglet - For the title splash. (Unused)
  • OpenSansEmoji - Fallback font if your browser doesn't support emoji. (Unused)

Ambitious To-Do List

  • Get Graph.js working (it's been broken and unused since the very first version of the original)
  • The following ideas have been implemented much better by Sandspiel Studio, check it out if you're interested in very complex cellular automata!
    • Let the user optionally save the world state by exporting Grid.array along with the usual Model.data in Editor.js and Save.js
      • Try to optimize this by making the most common cell the default and only saving the positions of non-default cells
    • Maybe add boolean operators (probably just OR for now) - ncase/sim/issues/2 - "if exactly x neighbors are this OR that", "move left OR right", "move to this OR that", etc.
      • I would probably have to add an "or..." button to all of these actions, which is kinda outside my capabilities at the moment.
    • Maybe let cells have a single variable each, and/or let each type of cell have a single variable each. Some kind of variable besides the cell state so you don't have to remake tons of lines to clone a complicated cell's functionality.