Coder Social home page Coder Social logo

adestefa / farmhero Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.96 MB

FarmVille and Guitar Hero. Combine fun parts that stand out of each game. I liked the timed selection of colored patterns from Guitar Hero, with economy and actions of farming.

Objective-C 0.40% HTML 10.72% JavaScript 80.66% CSS 8.22%

farmhero's Introduction

FarmHero

After witnessing the wild success of both Guitar Hero and Farmville, I started playing with the idea of mixing them together into something new. I wanted to combine fun parts that stand out of each game. I liked the timed selection of colored patterns from Guitar Hero, with economy and actions of farming. Play cycles through the player purchasing seeds, strategically planting them, waiting for them to grow, then harvesting them at the right time, and onced enough are collected they can sell them at a profit.

Crops grow by the cycle of the Sun at the top of the screen. Each time the Sun moves across the field all crops grow and change color. Crops grow at different rates based on their type. They also have different values at the market for sale so selecting and buying the right seeds, while also being fast enough to harvest all you plant before they die has a big impact on success of the farmer.

This game does not use Flash or HTML5, just simple HTML, CSS and custom JavaScript library I developed. I ported the code using PhoneGap for the iPhone and iPad platforms.

alt tag

alt tag

An early playable version can be found here: http://adestefa.com/FH/FarmHero/www/


External frameworks

jQuery-1-4-2.js
phonegap.js

jsGame.core.js

jsGame object constructor
	* timestamp
	* debug
	* init()

- JSON parser
- Board
- Cell

jsGame.sound.manager.js

Wrapper for audio frameworks
- gSoundPlay( soundFile )
- gPlayRandomSound( soundFamily );
- gAudioStop()

jsGame.farm.js

Overload and extend jsGame object for FarmHero game.
	- Board
	- Cell
	- Crop
	- growthCycles()
	- getGrowthCycles()
	- recordGrowthCycle()
	- clearNoGrowthCycles()

jsGame.farm.behavior.js

Define FarmHero rules and core actions
	- gUpdatePlayerMoney()
	- gShowPlayerSeeds()
	- gSHowSeedPricesFull()
	- gShowSeedPrices()
	- gSetCursorPLant()
	- gSetCursorHarvest()
	-

jsGame.farm.levels.js

Define gLevel object to define game variables which change based on skill level.
	- gLevels()
	- getLevel()
	- loadLevel()
	- gLEVELS.DATA[]

jsGame.farm.sound.profiles.js

Define gSoundProfile object which has a single array to store all game sounds.
	- gSoundProfiles
	- getProfile(profileIndex)
	- loadProfile(profileIndex)
		- DATA[]

jsGame_board.css

CSS styles responsible for game layout and look and feel.

farmhero's People

Contributors

adestefa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.