Copyright © 2011 Farm Peeps . All rights reserved
Navigation
Social Media
Farm Peeps are wild about social network farm games. Follow Farm Peeps on your favorite media outlets: outlets: outlets:
About Us
FarmPeeps.com s a Cyber1 Network Media Publication focused on Social Media Games as a safe and fun activity. Read More
Affiliated Sites
If you want to learn more about social media games see our affiliate sites 3dnld.com, PioneerTrailMate and CyberSocialNetwork.
Jorge's Hill
Objective:
The player (Jorge Hog) protects his cache of apples by defending a hilltop apple tree from throngs of invading Valley Pigs. The Valley Pigs assault the hill, and if they reach the apple tree before being knocked off by Jorge, they eat one of Jorge's priceless apples. Apples provide maintain health and the cores can be ammunition to fend of threats. Jorge’s main weapon is his charge, you can chase and ram an invading pig off the hill. Shaking the apple tree may yield more fruit, if at least X pigs(s) is knocked off since last tree shake. If a Valley Pig is knocked off the hill, 3x (well call these TKO's for tactical knock-offs) their esteem is broke beyond hope they go running off hungry to regroup and attack en-mass. If Jorge is able to hold off the hoard for a period of time, he wins the level. A hungry hoard will eat all the apples at once, so its critical for Jorge to hold them off until an act of god comes to the rescue. When Jorge gets knocked off, the Valley Pigs take over the hill making it very hard to regain the apple tree before all apples are eaten. Jorge's point score is accumulated during level play, based on the number of opponents successfully knocked off (player score goal), and the skill factor involved in the tactic of each score. If Jorge knocks off all his opponents before his apple stock is depleted, he wins the level and advances to the next with harpy happy dance end scene/game. Segue to next peek at episode....
Design Overview
Jorge's Hill takes advantage of the incredibly simple and capable CopperCube 3D game engine by Ambiera. The CopperCube 3D evaluation version is download here and can be used free in accordance with the licensing requirements. CopperCube 3D is by far the simplest and most fun way to create 3D web browser playable games. CopperCube offers you more choice, as publishing games in your choice of the the latest Adobe Flash Stage 3D or HTML5 WebGL (no plug-in required) or independent executable application (.EXE) is easy as replacing your embedded audio and custom script files. Thorough user documentation and other tutorials on CopperCube 3D is found here. Also I encourage you to explore the CopperCube forums, Irrlicht3d blog and FarmePeeps.com user forums where tips and real time game developments are discussed.
CopperCube imports 3D static models and animated figures. I selected low poly model in OBJ format. You can download skybox, terrain and 3d props in obj format to make this game at http://www.farmpeeps.com. Player and Opponent share same .obj and animation. This figure is Jorge Hog, a Z-Brush modeled and textured pig, decimated to 6k poly and rigged and animated in Poser resulting in a low poly .obj figure and BHV motion capture format (mocap). This is imported to Milkshape3D where the mocap rig (bone structure) is assigned to the poly groups and finally exported in B3D format.
CopperCube delivers rich 3D environments hardware 3D acceleration, however its important to optimize your game as much as possible to ensure the best gaming experience. The rule of thumb, is don't render what is hidden, and reduce texture files to the minimum size that is acceptable. Combine and merge groups and texture maps if possible (for animation). Jorge's Hill has much further room for optimization, see if you can identify some.
Frequently Used Variables:
• Level_Name (Variable)
• Score (Value)
• Apples (Value)
• Sound (Value 2 is OFF, else is ON)
• Music (Value 2 is OFF, else is ON)
• Level_Fac (Value, factor to establish level difficulty – number of opponents & durations)
• Tree_Ready (Value, Status of Tree Shake)•
The idea is to trigger the game start using the start screen overlay and have the following variables loaded from disk and set before the action commences.
Score is a value that is added to several events:
• Weapon hits multiplied by he following factors weapon range factors:
• (Range<100, then 10) long range bonus!
• (Range<50, then 1) no bonus for easy mid-range shot.
• (Range<10, then 20) big bonus for hand 2 hand combat.
• Opponent TKO events (1) x (SKILLFAC) ECHO to score overlay
• Special Object Score Bonuses / Powers (TBD)
Note: Players score will always return to level 1 and Score = 1 on game reset unless save game is loaded. Player respawn from a hill knock off does not reset level.
CopperCube Pre-Flight
CopperCube includes a Scene Graph Explorer panel (on left of main viewport in default GUI state). The hierarchical organization also affects a (Child / Parent relationship / dependency) nature of the nodes. This is brilliant because it really simplifies the need top program attributes of each item in a group that have similar properties and so you can broadly affect a group (such as visibility) of items. However this also means that careful organizational planning is important because once properties are set for a group, it affects all subordinates. This includes scaling and positional relations. For example grouping scenic surface props such as trees, should be subordinate (or in a sub folder node) to the terrain node. That way changes in scale, position to the terrain will not affect the relational position of the surface scenery. That also helps avoid collisions of static objects. Consider writing out your game plan similar to this one. It will save you lots of time in development and be useful for future reference and debugging. Note there are some minor nuances in in how JS vs ASP handles dependent properties, and these may affect nested logic. I experienced this in the way the sound/music controls work in Jorge's Hill where the, if sound=2 and if music=2, then play sound were not supported in WebGL but works fine in the Flash version. An or-else option would be nice.
CopperCube Step 1, Environment:
Create world environment by loading skybox textures download. These can be in the default skybox inserted by replacing the texture panels. Hint, load the sky first (mid-day sun) using the ceiling or fifth material texture slot, and use clouds to identify placement of the wall panels. Ground panel is optional if the .obj 3D hill terrain is used. Import Static 2D mesh terrain, adjust position to 0,0,0 and scale to 200% in X and Y, and 50% (half) in Y height in the node attributes or as necessary to cover the entire floor. This should give a rolling hills effect as it meets the horizon. Adjust Y scale if its too rugged a peak. Enable collision and be sure occludes light is checked in the box. Now add 2D sprites such as trees, rocks and bushes using the Create 2D Billboard from the Insert Menu option.
More scene design tips:Use 3D props very judiciously as every polygon counts against performance. Cloning and repositioning or rescaling an existing scene prop is much better than loading a alternate prop or texture. With acceleration more polys is better than more texture maps, especially in WebGL. Share where you can, and take advantage of dynamic lighting effects for differentiation. Try to limit scenes to less than 100K, and less than 50k polys for snappy performance.
CopperCube Step 2, Player Characters:
Add Jorge Hog or the figure of choice by importing animated 3D mesh. Assign name Player in node attributes. Load default skin material and assign to figure poly groupings in the materials tab of the figures node. One merged map can be applied to all groups (best for performance). Alternate texture skins can be loaded to show damage effects or character differentiation as necessary, but be selective. Have the game logic apply the textures on triggered event. This is an area where Jorge's Hill eek out more performance optimizations. Jorge Hog's figure includes mocap action sequence that needs to be parsed out as individual animations so that they can be assigned to specific CopperCube node behaviors and actions. This is done by right clicking on the animated 3d mesh node, selecting modify selection, Open Animation Editor. The rest should be evident from the well designed interface. One note about the animation editor, animations can be run in reverse with negative time frames. Finally, apply Game Actor, Object or Person Controlled by Keyboard (for Player). In Game Behaviors set action animations, and team name (HillKings), foe is (ValleyPigs). Other behaviors will be added later.
CopperCube Step 3, Opponent Characters:
Clone the player figure once, and rename as Foe 1 in node attributes as team name (ValleyPigs), foe is (HillKings). Delete Object or person controlled by keyboard. Other behaviors and actions will be added later. Once Opponent Character is finalized, he will be cloned as many times as deemed by the Level_Fac value.
CopperCube Step 4, 2D OVERLAY Display Panels
Splash (Start Game Button) – Node for loading / setting start level variables and initializing game.
• When Clicked On Do Something <ACTION>list:
• Set or Change a Variable: Level_Name, Set =, Value, 1
• Set or Change a Variable: Score, Add +, Value, 1
• Change 2D Overlay Text: <transparent 2d overlay node on the control panel>score, (label/variable)Score: $Score$
• Change 2D Overlay Text: <transparent 2d overlay node on the control panel>level, (label/variable)Level: $Level_Name$
• Change 2D Overlay Text: <transparent 2d overlay node on the control panel>Apple, (label/variable)$Apples$
• If a Variable has value, do something: MUSIC, In NOT =, Value, 2 then <ACTION>Play a Sound:BGM1.oog,Loop,Play as 2D
• Set or change a Variable: Apples; Add +, Value, 100
• Restart behaviors of a scene node: Player
• Change a texture: Player, Change all textures, default skin material textures.
• Hide or Unhide a scene node: Splash Screen, Hide
Game Control Panel 2D Overlay
• These are all sub-node transparent 2D Overlay buttons superimposed on Control Panel “Mudsplat” node.
• Restart Level, 2D Overlay, pig_red.jpg, when clicked on this do something <Action> List:
• set fixed position:player,0,95,0
• restart behaviors: Root Folder Node
• if a Variable: Not Equal <> , Value, 2:stop all sounds; play a sound:bmg1.oog
• Change a texture:current scene node,reset_red.png
• Hide or unhide a scene node,make invisible,ReturnToHill
• Restart behavior of a scene node: Player
• Toggle Sound, 2D Overlay, when clicked on this do something <Action> List:
• If a Variable has a value do something: Sound, Is Smaller Than (<), Value, 2 :
• Change a texture:Change All,headphones_green.png
• Set or change a Variable, Sound, Set(=), Value, 2
• Stop All Sounds
• If a Variable has a value do something: Sound, Is Smaller Than (=), Value, 2 :
• Change a texture:Change All,headphones_red.png
• Set or change a Variable, Sound, Set(=), Value, 1
• Toggle Music, 2D Overlay, when clicked on this do something <Action> List:
• If a Variable has a value do something: Music, Is Smaller Than (<), Value, 2 :
• Change a texture:Change All,guitar_green.png
• Set or change a Variable, Music, Set(=), Value, 2
• Stop All Sounds
• If a Variable has a value do something: Music, Is Smaller Than (=), Value, 2 :
• Change a texture:Change All,guitar_red.png
• Set or change a Variable, Music, Set(=), Value, 1
• Level, 2D Overlay Attributes, Disable Draw Background, Draw Text: “Level:”
• Score, 2D Overlay Attributes, Disable Draw Background, Draw Text: “Score:”
• Tree_Ready, 2D Overlay,tree_red.jpg
• Apple, 2D Overlay
• Apple_icon,2D Overlay,Apple_red.jpg
• Credits, 2D Overlay, about_farmpeeps.jpg, when clicked on this do something <acvtion> list:
• Hide of unhide a scene node, Make In Visible, Credit Screen
• If a Variable has a value do domething, Music, Is not (=), 2:Stop All Sounds, Play a Sound:overthehill.oog
• Hide of unhide a scene node: Logo, Make Visible: Credit_Screen
• Logo,2D Overlay,farmpeeps_logo.jpg,when clicked on do something:Open A Website:http://www.farmpeeps.com
• Help, 2D Overlay, question_red.jpg,when clicked on this do something <action>
• Hide or unhide a scene node:Help_Screen, Make Visible
• If a variable has a value do somethig: Music, Is Not Equal to (<>) 2,Stop All Sounds; Play A Sound: OverTheHill.OOG
• Help_Screen
• Config: 2D Overlay: wrench_red.jpg, when clicked on this do something <Action> list:
• Change 2D Overlay Text, current scene node, “Saved!”
• Load or store variable from disk: Sound, Save Variable
• Load or store variable from disk: Music, Save Variable
• Load or store variable from disk: Level, Save Variable
• Load or store variable from disk: Score, Save Variable
• Hide or unhide a scene node, toggle visibility, Directional node (directional pad)
• If a variable has a value do siomething: Sound, Is not Equal (=) value, 2: Play A Sound” bongos.oog
• Pause_Game,2D Overlay, pause_red.jpg, clicked on this do something: Quit Application
Registered users of the FarmPeeps.com website may download the Jorge’s Hill demo CCB source package to explore how this game is developed alongside this CopperCube 3D tutorial.
Help Jorge Hog knock the valley pigs from the hill to protect his cache of apples. Charge them or spit apples, its your choice. If your diligent in defense, when you charge the tree more apples will fall. When Apples are all eaten, so Jorge loses. Scare off all the Valley Pigs to advance to the next level. Test in WebGL and Flash
Advertisement: