HTML, CSS, Javascript, jQuery (& jQuery effects!)
-- 23 October 2016 --
- Added LocalStorage to save players scores
-- 21 October 2016 --
- Changed grid hover from jQuery hover to css hover. First hover item color change issue resolved.
- Maintained 3 media queries for better readability of code
- DRY javascript code from 600+ lines to 300~ lines
- Not implementing LocalStorage or SessionStorage
- Will implement Socket.io for TicTacToe project instead
- Links on home page will redirect to githubpages instead of hosting project on same url
-- 14 October 2016 --
A two player game which allows for customisable tokens and board size. I picked a tile based game system that was simpler than checkers but different from tictactoe and would make more sense to scale the grid size. I was interested in getting a better understanding of jQuery for DOM manipulation and effects.
- Built html document
- Built the layout first (lots of divs, responsive) (reponsive website ref)
- Used square images, coloured divs
- Just a rough placement of divs and containers
- Used 3 media queries for 4 different aspect ratio ranges
- Used lots of vh, vm
- Transition is nice 😄
- Built most of the javascript functionality
- Updated the temp images with final images
- Stole some images from the internet (http://www.flaticon.com/packs/pokemon-go)
- Coverted some of the svg files to edit the colours (for hovering), orientation (e.g. cursor icon & browser icon)
- Picked a nice BG, and tried to match the colour scheme
- Added hover image switching (and cursor too)
- Added jQuery effects (rather than hide(), show() )
- Adjusted time delays for a smoother transition between steps
- Added icon, audio
- Debugging & touch up (added the crown!)
- There's still some bugs in the mouse transition from red to blue and back
- Had some trouble with widths updating according to the height of the page. Was using % at first, but changed to vh and calc
- Would be useful if there was an aspect ratio lock for divs
- Hover does not work on the first item on the grid when game initiates
- Hovering doesn't really work well on mobile. Images get stuck
- Not all media queries really work with safari (it seems)
- PLAN MORE
- Map out all the buttons and find out which variables and functions will be used
- I have multiple instances of similar functions that does slightly different things because the first version of the function does a bit more than what is required
- Use more classes in CSS, find out which elements have the same attributes
- To write nice code (for maintainability), and reduce debugging, should KISS and DRY code before proceeding to the next function. (due to time restriction I just went YOLO)
- jQuery really helped shorten the amount of code, no need for getting element, and then using while loops. Effects are nice
- Probably implement max() function in CSS instead of 2 extra media queries
- DRY the javascript document.
- DRY the javascript document..
- Add comments in code
- Use LocalStorage or SessionStorage to persist data locally to allow games to continue after page refresh or loss of internet connectivity
- Socket.io for remote play
- Find a solution to host the website for different projects. Currently have multiple copies of the Memotile folder: on the project repo and in a folder in the website repo.