Saturday 14 December 2013

Saturday 7 December 2013

Monday 21 October 2013

Cabbage


Johnny Cash - Nine Inch Nails - Hurt

Written by Trent Reznor and first released in 1994 on The Downward Spiral album by Nine Inch Nails.



Then, in 2002, Johnny Cash covered this song for his album, American IV: The Man Comes Around.



I love the original version by Nine Inch Nails.
To me it is a powerful song, all about the angst of growing up feeling misunderstood, unloved and alone against the world.

But the Johnny Cash version, along with the video, makes me cry at the beauty of life, love and loss.

A younger version of myself always felt covers were a corrupted version of the original song.
A song that already had a following being used by pretender to the throne that could never hope to live up to the superior original version.

But over time I have learnt that not all covers are inferior to the original.
In some cases there is no better version.
There is just a different interpretation, a retelling that reveals a different facet of the original.

This, for me, is one of the most powerful and beautiful songs ever written.

Thursday 17 October 2013

World of Warcraft - Macro - Place raid markers then clear


This macro is now broken, I was going to rework it but found an addon that has more usability with the added functionality of raid marking.

Maggz Marker 

This macro will place a world raid marker each click for 3 and then clear all the markers on the fourth click.

/run local b=ActionButton8 _WMH=_WMH or(b:SetAttribute("*type5","macro")or SecureHandlerWrapScript(b,"PreClick",b,'Z=(Z or 0)%4+3 self:SetAttribute("macrotext","/wm "..Z.."\\10/cwm "..Z)'))or 1
/click ActionButton8 Button5


Saturday 5 October 2013

World of Warcraft - Macro - Link a spell in a message


These macros will link a spell with its tooltip in a message.

The first one I have is an emote that performs a Round House kick to my target.

/run SendChatMessage("performs a \124cff71d5ff\124Hspell:85668\124h[Roundhouse Kick]\124h\124r to %t that would make Chuck Norris proud","EMOTE",nil)

The linked spell can be changed to any one by going to Wowhead selecting the spell you want, click the link button and copying the ingame link string.
eg.

\124cff71d5ff\124Hspell:50303\124h[Swine Flu]\124h\124r
\124cff71d5ff\124Hspell:5025\124h[Test Tickle]\124h\124r


The second one whispers a message to my target when I cast underwater breathing.
This one also has a range check.

#showtooltip
/cast Unending Breath 
/run if UnitInRange("target")then SendChatMessage("Cast on you \124cff71d5ff\124Hspell:5697\124h[Unending Breath]\124h\124r.","WHISPER",nil, UnitName("target"))end


I needed this macro to sell an enchanting pattern, as I could link the pattern but not the enchants tool tip itself.

/script DEFAULT_CHAT_FRAME:AddMessage("\124cff1eff00\124Hitem:22558:0:0:0:0:0:0:0:0\124h[Formula: Enchant Weapon - Spellsurge]\124h\124r");


This one will random through a list of emotes.
You can add or remove any emotes you want.

/script DoEmote(GetRandomArgument("applaud","bashful","blow","bravo","cackle","cheer","chuckle","clap","commend","cuddle","curtsey","giggle","grin","hug","kneel","laugh","lavish","party","pat","praise","purr","raise","salute","shindig","shy","silly","smile","tickle","wave","whistle","wicked","wink"))


Once again most of my macros exceed the 255 character limit so you will need an macro extension addon such as Macro Toolkit.


World of Warcraft - Macro - Random Mount from a defined list


This macro will random a mount from a list of mounts that you have nominated.
I have an ALT modifier to select my swimming mount.

#showtooltip
/dismount
/castrandom [mod:alt] Sea Turtle;Dreadsteed,Felsteed,Azure Water Strider

Friday 27 September 2013

Monday 23 September 2013

Wednesday 18 September 2013

World of Warcraft - Macro - Random Mount

This macro will random a mount from all of your available mounts.
Flying mounts for areas that allow flying or ground mounts where you cannot fly.

/dismount
/run if not IsMounted() then local m,t,f="mount",{{},{}} for i=2,GetNumCompanions(m) do tinsert(t[bit.band(2,select(6,GetCompanionInfo(m,i)))==0 and 1 or 2],i) end f=IsFlyableArea() and 2 or 1 CallCompanion(m,t[f][random(#t[f])]) else Dismount() end

Sometimes you may get a "cant use that mount" if you have a class specific, faction specific or zone specific mount, but just hit it again and you will get the next random.

Friday 13 September 2013

World of Warcraft - Macro - Target Announce

This macro will place a skull raid mark on your target and announce your co-ordinates and the health of the target to the general channel.

/stopmacro [dead][noexists]
/run SetRaidTarget("target",0)
/1 {triangle} %t is up {triangle}
/run SetMapToCurrentZone()local x,y=GetPlayerMapPosition("player")s=(format("{triangle}  %.0f,%.0f {triangle} ",x*100,y*100)..((math.floor((UnitHealth("target")/UnitHealthMax("target"))* 100)).." % {triangle}"))SendChatMessage(s,"CHANNEL",nil,1)
/run SetRaidTarget("target",8)

The macro will not announce if you have no target or your target is dead.

If you want to announce to a different channel change the number 1 on line 3 & 6.

You can change the raid target mark from skull to another by changing 8 on line 7.

You can also change the raid icon in chat by replacing triangle on lines 3,4,5 & 6.

World of Warcraft - Macro - Add Rares to NPCscan - Timeless Isle


This macro will add all the Timeless Isle rares' to NPCscan.

You will have to split the following macro up into smaller chunks unless you have a macro addon that will extend your macro limit beyond the 255 WoW limit.


/npcscan add 73158 Gander
/npcscan add 73160 Steelhorn
/npcscan add 73161 Furyshell
/npcscan add 72909 Gu'chi
/npcscan add 72245 Zesqua
/npcscan add 71919 Zhu-Gon
/npcscan add 72193 Karkanos
/npcscan add 72045 Chelon
/npcscan add 71864 Spelurk
/npcscan add 73854 Cranegnasher
/npcscan add 72048 Rattleskew
/npcscan add 72769 Jadefire
/npcscan add 73277 Leafmender
/npcscan add 72775 Bufo
/npcscan add 73282 Garnia
/npcscan add 72808 Tsavo'ka
/npcscan add 73166 Spineclaw
/npcscan add 73163 Python
/npcscan add 73157 Rock Moss
/npcscan add 73170 Osu
/npcscan add 73169 Jakur
/npcscan add 73171 Champion
/npcscan add 73175 Cinderfall
/npcscan add 73173 Urdur
/npcscan add 73172 Flintlord
/npcscan add 73167 Huolon
/npcscan add 72970 Golgannar
/npcscan add 73279 Evermaw
/npcscan add 73281 Vazuvius
/npcscan add 73174 Archiereus
/npcscan add 72032 Zvezdan

World of Warcraft - Macro - Add Rares to NPCscan - Isle of Thunder

This macro will add all the Isle of Thunder rares' to NPCscan.

You will have to split the following macro up into smaller chunks unless you have a macro addon that will extend your macro limit beyond the 255 WoW limit.

/npcscan add 50358 Haywire Sunreaver Construct 
/npcscan add 69664 Mumta
/npcscan add 69996 Ku'lai the Skyclaw
/npcscan add 69998 Goda
/npcscan add 69997 Progenitus
/npcscan add 70000 Al'tabim the All-Seeing
/npcscan add 69999 God-Hulk Ramuk
/npcscan add 70001 Backbreaker Uru
/npcscan add 70002 Lu-Ban
/npcscan add 70003 Molthor
/npcscan add 70530 Ra'sha

Sunday 11 August 2013

RegEx - Regular Expresions

I have been playing with RegEx in Java more and more, and it is fun working out how they work and even built some myself.

I needed RegEx to perform checks on strings to validate password and email strings.

Finding RegEx to check if a string has either capitals, lowercase or numbers was quite easy :-

Capital = ".*[A-Z].*";
Lowercase = ".*[a-z].*";
Number = ".*[0-9].*";

Finding Email validation RegEx was a bit harder as there are many different compositions, some being quite loose and others being way to precise.

After a lot of testing I settled on this one :-

Email = "\\b(?!,|/)(\\w+)(?!,|/)((-?\\w+)*)?(?!,|/)(\\.{1})?(\\w*)?@{1}(\\w*)(?!,|/)((-?)(\\w*)?)(?!,|/)(\\.{1}\\w+){1,2}\\b";

But finding a RegEx to find a symbol in a string was a bit harder still.

I read many many forums and tutorials and tried many many different compositions.

I even built an array of every RegEx I had built for each individual symbol using a break before each symbol to ensure no meta characters slipped by :-

@ Symbol = ".*[\\@].*"

Then I looped through he array and tested against my test stings.

Sure it worked, but what a lot of code for something that I though should have been quite straight forward.

Then after far too many hours I looked at this problem from a different angle, if I could not reliably test a string for a symbol why not test a string for a character that was not a capital, lowercase, whitespace, underscore or number.

So I built the following :-

 Regex = ".*[^A-Za-z0-9!@#$%^&*()_+=-{}~`].*";

In RegEx ^ = not, similar to Java ! = not.

This works but once again I am still defining each symbol.

So I kept working and testing until I built :-

BetterRegex = ".*[^A-Za-z0-9\s].*";

It took me far to long but wow I had some fun.

Now it is time to relax ... relax and eat chocolate.


Thursday 8 August 2013

Cabbage


Cabbage


Cabbage


Cabbage



RegEx - Regular Expresions

RegEx, (Regular Expresions), are truncated code strings that can be used to search other strings for patterns of characters.

RegEx are a lot of fun to play with.


http://en.wikipedia.org/wiki/Regular_expression

A great resource site that can help teach, test and share RegEx strings.

http://gskinner.com/RegExr/

Tuesday 2 July 2013

Digital Rights Management (DRM) - good or bad for games and gamers


A great read on the topic of DRM and how it affects the games industry.

For years publisher have used locking codes, digital codebooks, encrypted discs, and software rootkits in attempts to thwart game piracy.

But the only people really affected were the legitimate consumers.
The simplicity of access and lower price points actually makes it more likely that a consumer will be willing to pay for a game, and therefore will actively discourage the illegal pirating of the game.

Sunday 23 June 2013

Icons Idols and Inspirations

Nikki Sixx

Nikki Sixx is my idol, all devil may care, self confidence, ego and talent.

His music, words and images speak to me about love, loss, life and show me that I am not alone in this struggle called life.













Sunday 2 June 2013

The GIFT Principal






Game Developers Conference - The Science Behind Shaping Player Behaviour


GDC
The Game Developers Conference is an annual event held in America where programmers, artists, producers, game designers, audio professionals, business decision-makers and others involved in the development of interactive games gather to exchange ideas and shape the future of the games industry. 


http://www.gdconf.com/

The Game Developers Conference features over 400 lectures, panels, tutorials and round-table discussions on a comprehensive selection of game development topics taught by leading industry experts. 


The Science Behind Shaping Player Behaviour In Online Games presentation is a great example of how the games industry is continually pushing the bounds of how games are played and the gaming experience.

http://gdcvault.com/play/1017940/The-Science-Behind-Shaping-Player

The Game Developers Conference website is a fantastic resource for game designers with many in-depth design, technical and inspirational presentations.

Friday 24 May 2013

SQL

SQL

Wow my first taste of SQL and it is so much fun.

First download WampServer at http://sourceforge.net/projects/wampserver/?source=dlp

Here is my first go 

First I create the database -
create database MyFirstDatabase;

Now that it is created I can use it -
use MyFirstDatabase;

Now I create a table in the database, and define the data format for each of  the table fields -
create table MyFirstTable (TableID int auto_increment primary key, TableValue varchar (200) not null);

Now I can see my table and the format of the table -
show columns from MyFirstTable;

Now I can insert data into the first row -
insert into MyFirstTable (TableValue) values ('Hello World');

And now I can check the data in my table -
select * from MyFirstTable;

Some great online resources for SQL, (and most other languages), are

StackOverflow   http://stackoverflow.com

W3Schools   http://www.w3schools.com

Thursday 23 May 2013

SketchUp

SketchUp is such an important game design tool for quickly, and intuitively, creating 3D items and landscapes that can then be exported into UDK, Maya, 3DS, etc.

SketchUp all has a 3D Warehouse where you can search download thousands of 3D modles built and shared by a very strong community.

http://www.sketchup.com/intl/en/

There is also a vast library of SketchUp plugins that can be installed to provide even greater control and options for designers.

http://extensions.sketchup.com/
http://www.1001bit.com/

XBOX1


Wednesday 8 May 2013

Java Color - RGB to Hex


Wow I have had fun today.

I wanted to random generate RGB colors and then convert them to Hex.

I could not use the random generated Red Green Blue colors directly to form a Hex color as the generated numbers could be 1,2,3 characters long. 

It took me a good while with lots of reading an experimentation.

First create int variables that will random each Red Green Blue value.
int red = (int) (( Math.random()*255)+1);
int green = (int) (( Math.random()*255)+1);
int blue = (int) (( Math.random()*255)+1);

Instantiate an instance of Color that will uses the random generated Red Green Blue color ints.
Color RandomC = new Color(red,green,blue);

Create an int that will get the RGB values from the color.
int RandomRGB = (RandomC.getRGB());

Create a String that will convert RandomC RGB values to a HexString.
String RandomRGB2Hex = Integer.toHexString(RandomRGB);

Create an int variable that will convert the HexString to a HashCode.
int EndRGB = RandomRGB2Hex.hashCode();

And now you have a random generated HexCode.

Quite  a few steps, and no doubt within 10 min of posting this I will find a much easier and quicker way.

But for now I am happy that this flow works.

Friday 26 April 2013

UDK Units version 2


  • Max Height Jump = 52 udku
  • Max Double Height Jump = 89 udku
  • Max Distance Jump = 322 udku
  • Max Double Distance Jump = 499 udku

The actual udku conversions to real world measurements are not exact and do differ over different games.


  • Unreal Tournament games :  1 udku = 2 cm.
  • Gears of War : 2 udku = 1 inch.
  • Most licensees use a scale of 1 Unreal Unit to 1 cm.



The important thing is that unit conversions between development engines 
UDK 3DS and Maya are 1 for 1.

So for most cases :       1 udku  =  1 3dsu  =  1 mayau  =  2 cm.


The overriding premise though is that what ever unit calculation you choose to use you must be consistent and all objects within the space must be relative to your chosen unit calculation.

 I have some further reading links.
http://udn.epicgames.com/Three/ChangingUnits.html
http://forums.epicgames.com/archive/index.php/t-762204.html
http://wiki.beyondunreal.com/Legacy:Unreal_Unit
http://wiki.beyondunreal.com/Unreal_Unit
http://www.worldofleveldesign.com/categories/unreal3/setup-grid-scale-in-maya-for-unreal3.php

And a link to a unit converter that converts real world measurements into standard UDK units. 
http://www.moddb.com/engines/unreal-development-kit/downloads/unreal-unit-converter1



Friday 19 April 2013

Tuesday 16 April 2013

Arrrggg - From This Moment On

Changed to Blogger from Tumblr.
All posts previous to this are the recreation of the original.

Man Play & Games


http://en.wikipedia.org/wiki/Man,_Play_and_Games

Original Post Mar 14th 2013

Game Warning

“Game Experience May Change During Online Play”

Original Post Feb 14th 2013 

TDSB


Original Post Feb 13th 2013

Monday 15 April 2013

The Sunk Loss Cost Fallacy

http://youarenotsosmart.com/2011/03/25/the-sunk-cost-fallacy/

Original Post Jan 16th 2013

Laetus Domus


Original Post Dec 12th 2012

Mazzy - The Golden Child



Original Post Dec 5th 2012

Java JPanel JFrame


I am still trying to get hold of the Aero Glass window borders on to my JPanel and JFrame.

But I have found some help to make JPanel borders translucent.

http://stackoverflow.com/questions/7035583/how-to-add-windows-aero-effects-to-a-jpanel/7036346#7036346

http://docs.oracle.com/javase/tutorial/uiswing/misc/trans_shaped_windows.html


Original Post Oct 16th 2012


Java Color


Java basic colors are heavy and few.

eg.   setBackground(Color.orange);


But if you want your frames to match your OS colors you can access them;

eg.   setBackground(SystemColor.inactiveCaption);

http://nadeausoftware.com/node/105#UsingJavasSystemColors


Or even better yet use a hex code; 

eg.   setBackground(Color.decode(“#FFFF00”));

Original Post Oct 15th 2012

Ascii Key - print to Console


This line of code will display the Ascii key number for each key pressed.

console.log(evt.keyCode);

Original Post Oct 31st 2012

Lies

Click To Play SWF

Original Post Sep 22nd 2012

WWNSD

New & Improved Release 



Original Post Sep 22nd 2012


Arrrggg


"Duty. Death is lighter than a feather, duty heavier than a mountain."

— Rand al’Thor the Dragon Reborn, Car’a’carn, Coramoor and King of Illian. 

Original Post Sep 13th 2012

Fibonacci - revisited


Wow, Grey Wolf continues to astound me.

He rewrote the Fibonacci JavaScript so that it builds an array and then returns the index value you wanted.
This allows for greater calculation values and no longer crashes your pc.
Negative values are a bit strange and huge numbers will more than likely return infinity.
var fibTicks = 0;

var FibonacciTerms = new Array();

 function fibonacciR(term) {

// recursive fibonacci method (the higher the number the more times the method gets called until we get to 1)

// we could use an array and iterate the array to find the value this would then be known as an iterative method.

// values greater than 30 are likely to crash javascript, for large numbers it is advised to use a language such as python using the recursive method.

fibTicks++;

if (term<=1) return term;

else return fibonacciR(term-1)+fibonacciR(term-2);

}

 function fibonacciI(n) {

// iterative method, here we are creating a loop which will determine what the next term is, append it to an array of terms until it reaches the dssired number

var neg = false;

if (n < 0) { n = n - n - n; neg = true; } // deal with negatives (we could just return an error here)

fibTicks = 0;

var i = 2; // we already have the 0th and first term so start counting from the 2nd term

FibonacciTerms = new Array(0,1); // clear the list of terms, add the 0th and 1st term

while (i <= n) { // loop through until we reach the desired term

fibTicks++;

FibonacciTerms.push(FibonacciTerms[i-1]+FibonacciTerms[i-2]); // add the term to the array

i++; // add 1 to our loop incrementor

} // end of loop

var r = FibonacciTerms[n]; // put the N’th term in to variable ‘r’

if (neg == false) return r; // exit the function giving back the number stored in ‘r’

else return r-r-r; // exit the function giving back the negative value for the number stored in ‘r’

}

Original Post Sep 2nd 2012

Action Script 3 - Play Symbol Children


This script is an example of how to play a symbol within a symbol

The AA symbol contains the AB symbol

The AB symbol contains the AC symbol

//Stop clip playing
stop();

//Create Listener
AA.addEventListener(MouseEvent.CLICK, C_AA);

//Mouseover button mode
AA.buttonMode = true;

//Create function
function C_AA(event:MouseEvent):void {

//Play AA Symbol
AA.play();

//Play AB Symbol which is a child of AA
AA.AB.play();

//Play AC Symbol which is a child of AB which is a child of AA
AA.AB.AC.play(); }

Original Post Aug 27th 2012

Campus Project Team A


UML Model


  • There are many buildings on campus.
  • Each building has a building number, a number of exits, and contains many rooms.
  • Each room has a room number, a room size, and a seating capacity.
  • Some rooms are computer labs and have many computers.
  • Each computer has an asset number and a tag & test date
  • Some rooms have a single overhead data projector.
  • Each overhead data projector has an asset number and a tag & test date.


Additional functionality/notes:

  • Add & remove buildings from campus.
  • Add & remove rooms from building.
  • A building must have a unique building number.
  • A room must have a unique room number.
  • Campus rooms can be searched by room number, to return the matching room.
  • Campus rooms can be searched by seating capacity, to return the matching rooms.
  • Computers & overhead data projectors must have a unique asset number.

Original Post Aug 20th 2012

Fibonacci



Fibonacci just blows my mind

Grey Wolf is amazing and helped me greatly with the following HTML + Javascript to test fibonacci principals based on a couple khanacademy video’s

Caution entering a value of 45 and above may cause serious lag or even crash issues

<body>
<h1> Fibonacci </h1>
<br><br>
<form>
<table>
<tr>
<th style=”text-align:center”>Enter Number</th>
</tr>
<tr>
<td><input type=”text” id=”fn” autocomplete=”off”/></td>
</tr>
<tr>
<td align=”center”><input type=”button” value=”Fibonacciate” onclick=”runFib();”/></td>
</tr>
</table>
</form>
<br><br>
<form>
<table>
<tr>
<th style=”text-align:center”>Fibonacci Jumps</th>
</tr>
<tr>
<td><input id=”fibonacci” readonly=”readonly”/></td>
</tr>
</table>
</form>
</body>

<script>
//Fibonacci function
fibonacci = function(fib) {
if (fib<=1) return fib;
else return fibonacci(fib-1) + fibonacci(fib-2);
}
//Run fibonacci function
runFib = function() {
var fib = document.getElementById(“fn”).value;
var v = fibonacci(fib);
document.getElementById(“fibonacci”).value=v;
}
</script>

Original Post Aug 15th 2012

Flash Action Script


//Stop the flash playing 
stop();

//Listen for Home Button
Home.addEventListener(MouseEvent.CLICK, onClickHome);

//Function for Home Button
function onClickHome(myEvent:MouseEvent):void {gotoAndStop(“Home”);}

//Listen for Game Button
Game.addEventListener(MouseEvent.CLICK, onClickGame);

//Function for Game Button
function onClickGame(myEvent:MouseEvent):void {gotoAndStop(“Game”);}

//Listen for Billy Button
Billy.addEventListener(MouseEvent.CLICK, onClickBilly);

//Function for Billy Button
function onClickBilly(myEvent:MouseEvent):void {gotoAndStop(“Billy”);}

//Listen for Olaf Button
Olaf.addEventListener(MouseEvent.CLICK, onClickOlaf);

//Function for Olaf Button
function onClickOlaf(myEvent:MouseEvent):void {gotoAndStop(“Olaf”);}

//Listen for Fido Button
Fido.addEventListener(MouseEvent.CLICK, onClickFido);

//Function for Fido Button
function onClickFido(myEvent:MouseEvent):void {gotoAndStop(“Fido”);}

Original Post Aug 7th 2012

UDK Units


1 udku = 1 inch

Max Height Jump = 52 udku

Max Double Height Jump = 89 udku

Max Distance Jump = 322 udku

Max Double Distance Jump = 499 udku

Original Post Aug 7th 2012

Animoto Example

http://animoto.com/play/8Y009Fs13pTh5Y50FDtKHw

Original Post Aug 6th 2012

The Periodic Table of Storytelling


Original Post Jul 30th 2012

Group Activity - Inheritance



A Player has the following attributes: 

  • Name
  • Health
  • Strength
  • intelligence
  • Location
    • X coordinate
    • Y coordinate
  • Inventory
    • a collection of InventoryItem's - each InventoryItem has the following attributes
      • ID
      • Price
      • Weight.
A Weapon is a type of InventoryItem. It has a single int attribute: DPS. 
  • An object of Weapon type may be constructed with or without providing a value for this attribute. 
    • A Gun is a type of Weapon. It has a single int attribute: ammoCount. A value for this attribute must be provided in the constructor. 
    • A Stick is a type of Weapon. It has a single int attribute: stickLength. A value for this attribute must be provided in the constructor.


A Tool is a type of InventoryItem. It has a single int attribute: numberOfUses. 

  • An object of Tool type may be constructed with or without providing a value for this attribute. 
    • A Key is a type of Tool. It has a single String attribute: keyName. A value for this attribute must be provided in the constructor. 
    • A Mirror is a type of Tool. It has a single String attribute: mirrorName. A value for this attribute must be provided in the constructor.


Original Post Jul 29th 2012

Scale of Universe

http://scaleofuniverse.com/

Original Post Jul 29th 2012

Inheritance Scenario: XYZ



yClass is a type of xClass. 

A XClass has 3 int states, x,y & z. 

An object of the xClass may be created by providing a value for all 3 of these states and also by providing only x & y. 

The yClass has 2 int states, a & b. 

An object of the yClass may be created by providing a value for a, or values for both a & b. 

The zClass is a type of yClass and has 1 int state called c. 

An object of the zClass may be created with or without supplying a value for c.

Original Post Jul 23rd 2012

Delimiters, Splits, Tokens, and Meta- Characters



So we have this text file that is full of World information on 10 players.

Each Player has the following information;

  • World Name
  • Player Name
  • Player Health
  • Player Strength
  • Player Intelligence
  • Player Location   -   each Player has a starting location
    • each location has 2 coordinates
      • X co-ordinate
      • Y co-ordinate
  • Player Inventory   -   each Player has 10 Items in their Inventory
    • each Item has 5 bits of Information 
      • Item Name
      • Item ID
      • Item Weight
      • Item Value
      • Item Level 

Now this information is all held in this World text file, but how do we read it effectively, it just seems to be a random wall of text.

We use a Delimiter.

In this case the delimiter is set as   ;

What that means is when we scan the text file each character preceded by   ;   will be recorded as a string.

Each of these strings is called a token.

Each token can be broken down further into smaller tokens using the split function.

In this case we have

  First split     :
  Second split     @
  Third split     *
  Fourth split     #
  Fifth split     ?

The issue we come across is that some characters already have assigned functions; these are called Meta- Characters, and using them as delimiters and splits will cause hang and crash issues.

Meta-Characters      .  ^  $  |  *  +  ?  (  )  [  {  \  

If you precede Meta-Characters with two forward slashes \\ it will turn them into a literal character.

eg.    scan.useDelimiter(”\\? “)     or    String[] StringName = Token.split(”\\* “)

Original Post Jun 30th 2012

Blog Task - The Constructor



Wow this turned out to be a big class.

I viewed this Player Account and treated it in a way similar to World of Warcraft.

Each player has a Player Account that must be set up before you can create avatars to play.

Each Player Account has required parameters and also have data types that are themselves class objects.

The DOB class has 3 states, dd, mm, and yyyy.

The Avatar class has 4 states, name, race, sex and class.

Original Post Jun 23rd 2012 

Blog Task - Encapsulation and Visibility


Accessors and Mutators allow exterior objects read or modify access to an objects public states and behaviours.

In UML diagrams each Accessor and Mutator is preceeded by a plus sign, ( + ), which identifies that the object state or behaviour is public.

In UML diagrams a minus sign, ( - ), denotes a state or behaviour is private, and as such is not acceable by on outside object.


What is an Accessor?

An Accessor allows outside objects to read the state or behaviour of an object. 
Accessors are also known as Getters.


What is a Mutator?

A Mutator allows outside objects to modify the state or behaviour of an object.
Accessors are also known as Setters.

Original Post Jun 23rd 2012 

Wonder


Original Post Jun 21st 2012