Skip to main content

Posts

Showing posts from March, 2020

Building the Shelf and Chairs

With the final submission looming closer, most of my effort was directed at replacing some hard-coded game-play functionality with dynamic data from the Builder and Finder systems (~3 hours), assisting my team with issues they encountered (~2-3 hours), and getting the shelf and chair ready to be built by the players (~8 hours). The Builder and Finder systems still had a few hard-coded values from the Beta build of the project that were specific to constructing the table, so I worked on replacing those with the data that is contained in the instructions arrays that Priscilla and Maxime created this week.  I was initially have problems accessing this array before I discovered that JavaScript arrays can be accessed by string, which simplified it a lot.  Below is an example of the before and after of this process. // Before socket . on ( 'setFurn' , function ( data ) { this . current = data . id ; // Where data.id was always "table" this . step =

Sprint 10 - Adding more boxes and lots of scripting

As the final submission draws near, lots of work has yet to be done. Due to time constraints and the lack of resources in light of recent events, we made the decision to cut down our scope by removing VR functionality entirely and focus on desktop-to-desktop connection fully. With new goals in mind, I spent the beginning of the week by adding all the boxes for spawning furniture components. To do so, I started by replacing the blue boxes we used previously with stylised boxes that match the environment better. To tell the player what each box contains, an image of the rendered component is placed on each side. The challenge here was that I wanted to avoid creating a GLTF for every single box because it would have slowed down the page drastically. The solution was to instead use a single, universal GLTF for every box and placed images on each side of the box as explained previously (~6hrs). New Warehouse Area - Added new boxes Close up of updated box - Bright colours and side

Catalogue, Sound Effects, JSON for Instructions

This week I updated the image for the catalogue and added it to the Living Room environment as an image plane (~2hrs). I am currently adding smaller clickable planes on top of it to represent the different furniture options to choose to build. A screenshot of this can be seen below. I also looked for some sound effects to use for user feedback (~2hrs) when pieces are combined together correctly, incorrectly, pieces are dropped, etc. These sound files have been added to the shared drive and will be implemented in the code in the next few days. Some example sounds can be listened to at the following links: https://freesound.org/people/NenadSimic/sounds/150879/ https://freesound.org/people/grunz/sounds/109662/ https://freesound.org/people/GabrielAraujo/sounds/242501/ https://freesound.org/people/kirbydx/sounds/175409/  I also worked on adding JSON for the builder.js and finder.js files to store the required information for the instructions (~1hr). An example of ho

Controllers and Game-state Management

The two issues I worked on this past week were getting game-pad controllers working with our project (~6 hours), and general work on the game-state systems to iron out some of the kinks and add some more functionality (~3-4 hours).  Unfortunately neither of these tasks proved 100% successful due to some set backs. The game-pad controllers are so close to working, movement and look controls are fully functional, but I cannot get the Super Hands components to pick up the button events from aframe-extras.  The easiest way to see this is by looking at some code: <!-- Camera --> <a -entity id= "rig" movement-controls position= "0 0 0" > <a -entity id= "camera" camera wasd-controls= "acceleration: 125" look-controls= "pointerLockEnabled:true" position= "0 1.6 0" capture-mouse st

Spring 9 - Finishing Furniture and VR startup

This week, I completed stripping the shelf apart to create separate components, as I did with the other two furniture pieces. I also rendered each component from each piece of furniture so that they can be used in the instruction manual. Finally, I added onto the blueprint of shape match from last week to incorporate the shelf, as well as the repetition of each step. This can be seen in the image below. Finally, each component has the coloured symbols placed in the right places and have been exported as GLTF to import into AFrame (~7hrs) This week, I also went to procure a VR headset. With the state of things in the world, I had to be quick to contact Carleton's BIT department but was able to successfully obtain an Oculus Rift to do testing within VR. It took time to set everything up but I got it running in the end, however, I had many difficulties operating the WebVR space. Using the rift is extremely draining and I had several headaches afterwards. As of now, I'm una

Making Instructions

This week, I worked on creating all the instructions images for both the Warehouse and the Living Room. Although this was not a very difficult task, it was tedious to work on and took around 3hrs to complete. It was a challenge to adjust to our new schedules given the current circumstances and allot appropriate time to spend on each of our classes. The instructions in the Living Room show the current required furniture pieces and their quantities, which the Builder will need to communicate to the Finder in the Warehouse. See below for an example of pieces required for a table. On the other hand, the instructions in the Warehouse would show the symbols on the different furniture pieces that should touch in order to be combined, which the Finder will need to communicate to the Builder in the Living Room. See below for an example where the green heart marking should be made to touch the green circle marking. I will be putting the source link for these instructions into arr

Game-state Management and Aframe Systems

Most of this past week involved implementing the data management systems that control the current state of the game for the Builder and the Finder.  The basic skeleton of the systems, as well as the components they used, were implemented at the beginning of the week leading up to the Beta milestone (~10 hours), and the rest of the week was spent expanding and polishing these systems (~3-4 hours).  The two systems I focuses on were the Builder system, which which manages the game state of the Builder player, and the Finder system, which does the same for the Finder player. The Builder system keeps track of which piece of furniture is being built, what step the Builder is on in the build process, as well as how many steps there are to complete the furniture.  Every time a piece is successfully snapped an event is emitted by the scene element and the Builder system picks this up, increments the current step, checks if the furniture is complete, and emits a Socket.io event that in

Sprint 8 - Beta and More Furniture

With the situation with COVID-19, scheduling of various projects has been interrupted greatly, including the progress on this project. Originally, it was planned that we would present the Beta build of our game, however that changed in the wake of the epidemic. Instead, I put together a video highlighting the key features, changes since Alpha, and what's to come before the final submission (~4hrs). Besides the Beta, I had intended to work on VR functionality and getting VR controls working whilst doing testing with an actual VR headset. Unfortunately, this was interrupted by the outbreak so I shifted my focus on the other furniture. I returned to the Table model and stripped it further by removing the skirt from the tabletop. I've also adjusted the symbols on the component to make them smaller and more distinct. The smaller size allows the symbols to get hidden after combining (~2hrs). Previously, the components had greenStar --> greenStar everywhere. Although the ma

JSON to HTML, Spawning Objects, and Graphics

A major task I worked on this week for the Beta presentation was a function to convert the JSON I created with all the furniture parts information into HTML entities that could be added to the scene when "spawned". This took around 6hrs and I learned that JavaScript does not take well to retrieving property names containing dashes in in JSON. This led to issues with trying to directly convert from using the property names stored in JSON with the associated values, since the properties needed dashes to work as an A-Frame entity in HTML. I also initially had some challenges with querying the JSON objects since the data for each furniture piece is contained in the furniture object, therefore the query must account for multiple layers of arrays. However, the object spawning now works as tested in the Warehouse environment by clicking on specific boxes (which have yet to be labeled). I will be adding the other box spawners once the furniture parts 3D models are ready to be impor

Adding the Models and Socket.io

This week involved touching on a few different systems to fine tune existing modules as well as create new modules.  Two components that had the most focus were replacing the primitive models with the GLTF models Max created (~8-10 hours), and separating the living-room and warehouse into two separate HTML files as well implementing Socket.io to allow player game-mode selection (~4-5 hours). The rest of my time was spent on smaller functionality like player speed tweaks and consolidating a-mixins for the for their data to be move to the object JSON file (~2 hours) Alpha Table Beta Table Replacing the primitive chair pieces with their models proved to be far more difficult than anticipated, as usual.  The process should have just involved replacing the 'geometry' with the 'gltf-model' component and then adjusting the aframe-physics 'shape' components to create bounding boxes that fit the models, but there were some unexpected side effects

Sprint 7 - Finalizing the Living Room for Beta

I spent the earlier parts of this week to fix up some problems with the furniture (~4hrs). This included going back into Maya and Substance Painter to readjust the geometry so it's scaled correctly and adjusting the colours a little to match the lighting more. I also returned to the Warehouse for a bit to readjust the colour, specularity, and design on the scaffold boards. Previously, I was using template flowers at the beginning of each scaffold to describe what kinds of furniture components are found in each row. I've since created silhouettes of each piece of furniture and replace the flower templates with them (~2hrs). Finally, the bulk of this week was working on the Living Room. The last time I touched it was for the design comp and alpha prototype, which revealed many design flaws that need adjustments. I redesigned the entire environment to provide more room to work with in VR. This was challenging because I needed to provide a lot more space, but also did not want

Sound Emitters, Instructions, and Lighting

This week involved a lot of switching out primitive geometries for GLTF models, which led to their own set of issues such as larger file sizes, new snapping points and repositioning/resizing everything within the scenes. I started this process with the Warehouse scene, screenshots of which can be seen below. In addition to bringing the GLTF model into a newly created warehouse.html file, I also added lights in the scene, a bright green "shipping platform", an image plane to display instructions in front of the platform, and some boxes on the shelves that will serve as spawn points for furniture pieces when the Finder clicks on them. This took ~4hrs, and I had to relay information about how the scene looked in A-Frame to Maxime since it was quite different from its appearance in Substance. On average, it currently takes about 3-5 seconds to load the Warehouse scene with all of its 3D assets and sound files. How the Warehouse looked when I initially imported it: How the

Sprint 6 - Redesigning and Finalizing the Warehouse

Based on feedback from the alpha build and some considerations from the rest of the team, I spent the week redesigning (~9hrs) the design of the warehouse and retexturing (~5hrs) it to fit the aesthetic of the furniture more. Some of the changes made to the warehouse include the following. First off, the game will only support three pieces of furniture to build, therefore it was unnecessary to have five rows of scaffolding. This is also supported by our attempts to reduce the poly count as well as create more space between shelves. From the way players moved into the environment, it was clear that there was too little space between shelves to removes boxes, so this was reduced. There was also too much unnecessary space in the front of the warehouse, so everything was pushed forward more while cropping the back end a little to reduce the poly count further. The doors of the warehouse were also redesigned to add more interest in that section of the environment. (~4hrs) Next, I UV map

Spawning Templates and Refining Snap-Points

This past week saw the development of a component for spawning in pieces of furniture with their snap-points already attached (~4 hours), as well as an improvement on the snapping system that removed strange physics behaviour from joined components and increased maintainability (~6 hours).  Unfortunately the week was also busy there was less progress on the code than I had hoped for.  Since there will be a lot of different pieces that could be spawned by either the Finder or Builder in the course of a game we needed some way of quickly creating the entities with their snap-point already placed, and they had to be identical for both players.  The solution I found involves the aframe-template-component , which allows an entity to pull child elements and attributes from an external storage file.  The below code demonstrates the implementation of a template file. <a -mixin id= "wing" geometry= "primitive: box; depth: .005; height: 1; width: 0.5"

Moodboards and Sound Compression

This week I worked on creating moodboards (~5hrs) for the Living Room environment because the current look left a lot to be desired. I find it helpful to follow a colour scheme when decorating a room in real life, so that is what I basically made before also showing how the colours could look like over top a render of the Living Room model. For our game, we would like to have a bright living room that has some pops of colour for interest. A similar style will also be used for the furniture. Below are some of the resulting ideas I had: Out of the new coloured room options, the group preferred the 1st one and the 4th one the best. In the near future, after Maxime finalizes the Living Room environment model, I will be updating the materials. I also created a moodboard for the Warehouse environment as well (~1hr, see image below). This required a bit of research on warehouses, which I did in a previous sprint. I noticed that common colours in warehouses were grey,