Friday, June 6, 2014

State of affairs

So it's been an entire year, but I've finally and at a snails pace finished the CodeCademy JS course, one that is allotted for 10 hours. Sad in one regard, however I stuck with it for a year. Perhaps that's something.

I've also been peeking at other web projects from beginner programmers and have come up with an idea of my own that I've been working on. I've essentially gone to the drawing board here to come up with some 'big picture' ideas as well as breaking the pieces down to individual scripts.  Nothing to 'publically' report just yet, but here's a tidbit...

Resource Gathering Model:
BASIC:
On RESOURCE GENERATOR Click:
-Roll random number or grab random int with lower probability for higher RESOURCE TIERs
-Begin by rolling from 1-1000, if number is below 600, set variable to then award LOWEST TIER RESOURCE.
-If number is Above 600 or but below 900, set variable to reward SECOND TIER RESOURCE.
-If number is above 900, set variable to reward THIRD TIER RESOURCE.
-Perform second roll to determine how much of the resource to give.
-Roll Between 1-1000 if Between 1-500, give variable RESOURCE +10
-Between 501-800, give Variable RESOURCE +15
-Between 801-1000, give Variable RESOURCE +20
-Perform function that will pass the +RESOURCE amount to the correct RESOURCE TIER object.

ALTERNATE VERSIONS / BUFF IDEAS:
-First roll is inclusive of the previous tiers, i.e. rolling a THIRD TIER resource will also grant SECOND and FIRST tier resources.
-Resource Multipliers based on temporary buffs or permanent items, be mindful of the math involved as to not inflate numbers too greatly (multiplicative versus additive, order of operations)
-Add a third roll for increase to RESOURCE amounts between random numbers, ie 5-10, 11-15, 16-20 (see above for roll values)

HOW TO BEGIN:
-Begin by creating a single "RESOURCE GENERATOR" button with an onClick function.
-Create an object to store RESOURCE data.
-Create a function to make first roll to determine what TIER RESOURCE will be added.
-Create function to roll a second time to determine the number of RESOURCES to add.

CURRENT PROBLEMS:
 Setting a variable from the first roll that ties into the second roll allowing it to recognize what RESOURCE TIER it will be adding to.
 Adding a function that will return the proper +RESOURCE VALUE to the proper RESOURCE TIER

And so, we go from here. Who knows, maybe in a year I'll either be done with this project or have given up entirely.