Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions .idea/a4-creativecoding.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

82 changes: 25 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,40 @@
Assignment 4 - Creative Coding: Interactive Multimedia Experiences
===

Due: September 27th, by 11:59 PM.
http://a4-heartkiller.herokuapp.com/

For this assignment we will focus on client-side development using popular audio/graphics/visualization technologies; the server requirements are minimal. The goal of this assignment is to refine our JavaScript knowledge while exploring the multimedia capabilities of the browser.
**DAYDREAM — join your friends in a 3D World**

Baseline Requirements
---

Your application is required to implement the following functionalities:
Daydream is a simple 3D multi-character polygon world where each user is randomly assigned a unique character (policeman, robber, beach lady, fireman etc.) and gets to walk around in a town section and meet other users as other characters. An on-screen joystick is provided for motion; just simply drag the joystick in the direction you want your character to move. The joystick can make a character walk and run forward, backwards, and turn. Users can communicate with each other by moving their characters relatively close to each other's (**Multiple people need to visit the link to make it multi-character, if there's only one user, then you won't be able to trigger the chat function, you need another user for you to interact with**), and trigger the chatbox to type and send text by tapping toward the bottom center of the screen. The right place to tap to trigger the chatbox varies depending on where your character is standing from the other, but it can usually be in the bottom center. (The chatbox is **incredibly tricky and hard** to trigger, due to time constraints I was not able to figure out where exactly on the screen user needs to tap each time. But I have fortunately managed to tap in the right place multiple times to know that it actually works.) Your character will be present in the world until you close your tab; that automatically exits the app and removes your character from the town.

- A server created using Express (you can also use an alternative server framework such as Koa) for basic file delivery and middleware. Your middleware stack should include the `compression` and `helmet` [middlewares]((https://expressjs.com/en/resources/middleware.html)) by default. You are not required to use Glitch for this assignment (but using Glitch is fine!); [Heroku](https://www.heroku.com) is another excellent option to explore. The course staff can't be resposible for helping with all other hosting options outside of Glitch, but some of us do have experience with other systems. It also never hurts to ask on Slack, as there's 99 other classmates who might have the experience you're looking for!
- A client-side interactive experience using at least one of the web technologies frameworks we discussed in class over the past week.
- [Three.js](https://threejs.org/): A library for 3D graphics / VR experiences
- [D3.js](https://d3js.org): A library that is primarily used for interactive data visualizations
- [Canvas](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API): A 2D raster drawing API included in all modern browsers
- [SVG](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API): A 2D vector drawing framework that enables shapes to be defined via XML.
- [Web Audio API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API): An API for audio synthesis, analysis, processing, and file playback.
- A user interface for interaction with your project, which must expose at least six parameters for user control. [dat.gui](https://workshop.chromeexperiments.com/examples/gui/#1--Basic-Usage) is highly recommended for this. You might also explore interaction by tracking mouse movement via the `window.onmousemove` event handler in tandem with the `event.clientX` and `event.clientY` properties. Consider using the [Pointer Events API](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events) to ensure that that mouse and touch events will both be supported in your app.
- Your application should display basic documentation for the user interface when the application first loads. This documentation should be dismissable, however, users should be able to redisplay it via either a help buton (this could, for example, be inside a dat.gui interface) or via a keyboard shortcut (commonly the question mark).
- Your application should feature at least two different ES6 modules that you write ([read about ES6 modules](https://www.sitepoint.com/understanding-es6-modules/)) and include into a main JavaScript file. This means that you will need to author *at least three JavaScript files* (a `app.js` or `main.js` file and two modules). We'll discuss modules in class on Monday 9/23; for this assignment modules should contain at least two functions.
- You are required to use a linter for your JavaScript. There are plugins for most IDEs, however it will be difficult to run the linter directly in Glitch. If you haven't moved to developing on your personal laptop and then uploading to Glitch when your project is completed, this is the assignment to do so!
- Your HTML and CSS should validate. There are options/plugins for most IDEs to check validation.
**Obstacles**

The interactive experience should possess a reasonable level of complexity. Some examples:
### Three.js
- A generative algorithm creates simple agents that move through a virtual world. Your interface controls the behavior / appearance of these agents.
- A simple 3D game
- An 3D audio visualization of a song of your choosing. User interaction should control aspects of the visualization.
### Canvas
- Implement a generative algorithm such as [Conway's Game of Life](https://bitstorm.org/gameoflife/) (or 1D cellular automata) and provide interactive controls. Note that the Game of Life has been created by 100s of people using <canvas>; we'll be checking to ensure that your implementation is not a copy of these.
- Design a 2D audio visualizer of a song of your choosing. User interaction should control visual aspects of the experience.
### Web Audio API
- Create a screen-based musical instrument using the Web Audio API. You can use projects such as [Interface.js](http://charlie-roberts.com/interface/) or [Nexus UI](https://nexus-js.github.io/ui/api/#Piano) to provide common musical interface elements, or use dat.GUI in combination with mouse/touch events (use the Pointer Events API). Your GUI should enable users to control aspects of sound synthesis.
### D3.js
- Create visualizations using the datasets found at [Awesome JSON Datasets](https://github.com/jdorfman/Awesome-JSON-Datasets). Experiment with providing different visualizations of the same data set, and providing users interactive control over visualization parameters and/or data filtering. Alternatively, create a single visualization with using one of the more complicated techniques shown at [d3js.org](d3js.org) and provide meaningful points of interaction for users.
- **Hanging Chatboxes**: After a character exits the world, their speech bubble remains in the air.
- **Buggy if 3+ users/characters**: I've noticed that as soon as a third character joins the world and the other two starts a conversation, one of those two disappears from the 3rd character's view, even though they still exist in the views of each other.
- **Missing texture**: Occasionally when a user enters the world, their character might not have any texture applied to them and this leads the character to just appear as dark blank cubes.
- **Missing Stylesheet**: Often times, the top banner would appear plain and unstyled and inspecting the console.log would indicate that Heroku is not able to load the Stylesheet properly. This problem did not occur when I was deploying locally.
- **Blank Modal**: I tried to use the Bootstrap modal to inform users with general info about the game that pops up at first page load and can be brought back by a button at the top corner, but the modal would pop up only without the text inside. I was not able to fix it on time and hence, I resorted to a less fancy way of displaying info inside a banner-like element that stays at the top of the screen at all-times.
- **Deploying**: This was actually the most challenging part for me since I was not able to host on Glitch after trying for a lot of hours, I resorted to deploying via Heroku, which also imposed a lot of new challenges and took a lot of time.
- **Works better locally**: The app functions way better when I was implementing and hosting it locally on my laptop via Webstorm. The chat feature is way smoother, and the top banner is always styled properly via css. I believe some things got lost in translation once I uploaded the project to places such as Glitch, Goorm, Heroku etc. (for example, unecessary file paths, conflicting port numbers etc.)

Deliverables
---
**Linter**

Do the following to complete this assignment:
I coded this project primarily in WebStorm and therefore applied the default linter.

1. Implement your project with the above requirements.
3. Test your project to make sure that when someone goes to your main page on Glitch/Heroku/etc., it displays correctly.
4. Ensure that your project has the proper naming scheme `a4-yourname` so we can find it.
5. Fork this repository and modify the README to the specifications below. *NOTE: If you don't use Glitch for hosting (where we can see the files) then you must include all project files that you author in your repo for this assignment*.
6. Create and submit a Pull Request to the original repo. Name the pull request using the following template: `a4-gitname-firstname-lastname`.

Sample Readme (delete the above when you're ready to submit, and modify the below so with your links and descriptions)
---

## Your Web Application Title

your hosting link e.g. http://a4-charlieroberts.glitch.me

Include a very brief summary of your project here. Images are encouraged, along with concise, high-level text. Be sure to include:

- the goal of the application
- challenges you faced in realizing the application
- a brief description of the JS linter you used and what rules it follows (we'll be looking at your JS files for consistency)

## Technical Achievements
- **Tech Achievement 1**: I wrote my own custom GLSL shaders to use as a material for my Three.js objects.
- **Tech Achievement 2**: My audiovisualizer uses both FFT and amplitude analysis to drive visualization.
- **Tech Achievement 3**: I optimized the efficiency of my reaction-diffusion algorithm by...
- **Tech Achievement 4**: I visualized the dataset X using three different visualization technqiues provided by D3, andprovided
- **Three.js**: I used and rendered the pre-made Three.js 3D models via Three.js. The Raycasting property of Three.js was used to apply most of the app logic such as blocking, moving up/down through unleveled ground etc.
- **Socket.io**: Socket.io was mainly used to communicate bewteen client and server. This primarily gave birth to the multi-user aspect of the app and the chat feature.
- **FBXLoader**: To load the fbx files (3D models) into the code.
- **Mixamo**: I used mixamo.com to apply animations to custom characters.
- **Autodesk Maya**: I used Autodesk Maya to combine the 3D models (fbx files) into one and export, for instance, creating a town model by putting models of items such as cars, buidlings, signs, and lamp posts inside accordingly.
- **Blender**: I used blender to tweak the 3D models such as texture, shape, skin, color, etc.
- **Heroku**: Since Glitch gave me a myriad of problems, I had to resort to Goorm IDE, which in turn gave me a lot more problems, but it ulitmately helped deploy the app via Heroku.

### Design/Evaluation Achievements
- **Design Achievement 1**: I ensured that my application would run on both desktops / mobile devices by changing X
- **Design Achievement 2**: I followed best practices for accessibility, including providing alt attributes for images and using semantic HTML. There are no `<div>` or `<span>` elements in my document.
- **Design Achievement 3**: We tested the application with n=X users, finding that...

I focused on the technical aspects of the assignment but still managed to do some styling.
- **Bootstrap**: I used Bootstrap to style the top banner, however, sometimes Heroku is not able to find the stylesheet and the button stays unstyled.
- **Responsive**: The app is accessible via mobile as well, although the chat feature might not work as expected. ALthough, PCs and laptops are recommended for full experience.

1 change: 1 addition & 0 deletions daydream/node_modules/.bin/mime

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

224 changes: 224 additions & 0 deletions daydream/node_modules/accepts/HISTORY.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading