It's not working!! GUI development in Java seems the most pernickety thing in the world- jDev is never happy!!! But, it's ok, I have a working model, and the time to produce a view easily. So its all good.
Breathe...
Showing posts with label java. Show all posts
Showing posts with label java. Show all posts
Saturday, 1 November 2008
Friday, 31 October 2008
CAUTION: Organism Production in Progress
I have a (text based) organism! Hooray! It eats colour! Hooray!
Had a few iffy moments in between, where it fell off the edge of the world for a while, (rectified by wrapping it around- yep, the world is no longer flat!!) ate everything in sight, (needed to add the poisonous property- I forgot at first!!)
But the text works!!! And I'm a happy bunny! May even make this deadline yet, it seems possible!!!
Here's the Java screenshot, for those interested.
Had a few iffy moments in between, where it fell off the edge of the world for a while, (rectified by wrapping it around- yep, the world is no longer flat!!) ate everything in sight, (needed to add the poisonous property- I forgot at first!!)
But the text works!!! And I'm a happy bunny! May even make this deadline yet, it seems possible!!!
Here's the Java screenshot, for those interested.

The pattern of 2's and 1's here are empty and filled pixels... the organism has eaten some! Hooray!
Now all I need is a GUI... (It doesn't look very friendly at the mo...)
Wednesday, 29 October 2008
Poison and death. (What a lovely blog title!)

Been working on the count functionality that determines whether an organism has too much poison in its body.
It's an if statement really... this is the (very basic) pseudocode.
BEGIN A LOOP
If your poison count is more than 3, you're dead.
Else, move squares and eat.
If the square you ate is poisonous, add one to your poison count.
Repeat the loop.
END THE LOOP
It's an if statement really... this is the (very basic) pseudocode.
BEGIN A LOOP
If your poison count is more than 3, you're dead.
Else, move squares and eat.
If the square you ate is poisonous, add one to your poison count.
Repeat the loop.
END THE LOOP
Labels:
death,
java,
Organism production,
poison,
pseudocode
Friday, 24 October 2008
Organism production (or... "How on earth do I actually build this thing?!")
Talked to Martin Beck (who is a legend, and so helpful!) this week abut my organism. Seems its best to build in JAVA, but I'll have to make some compromises to the original plan.
- The "Sprites"/"Bugs" will have to be just 1 pixel dots, no faces or whatever (which limits the tamagotchi-ness... one good side effect),
- The baby bugs can't be generated in the same cell as the parents (since reproduction is just being in the same cell, there's potential for an awful lot of incest otherwise...no, thanks!) so they'll have to be generated in a random square.
- The bug world will be randomly generated pixel colours, as I can't feed in pictures in JAVA.
- There will be no avoidance factor, as apparently, this gets into a lot of heavy PHD level coding... and the project is difficult enough as is.
He also ended up explaining to me some crazy JAVA stuff about Darwinian Evolution principles, so that has potential I guess... but once the rest is working.
Subscribe to:
Posts (Atom)