Mini Sheep

Jeg er gået igang med at lave mit første spil i java, som tager udgangspunkt i en ide Lars og jeg længe har haft, med at holde Gensplejsede Mini-får som kæledyr.

Spillets mål og gameplay er stadig under udvikling, men ideer kan skrives ind nederst på siden.
Lige nu fokusere jeg på at få det basale til at køre. Jeg mangler også noget bedre grafik.

Download (Nyeste øverst)

Next version: Framework 0.7

Planed Changes

  1. More background images.
  2. New grass images.
  3. Change the wateringcan to work while moving the mouse, without having to reclick.
  4. Add some kind of limit to the wateringcan's supply of water and limit grass growth.
  5. Begin looking at sheep spawnig (Mating, buying, first spawns?)
  6. Make the game resizable?

Change log

Bugs

  1. The background image is 800×600, but the game board must be set to 800×630 to fit the entire image. Reason currently unknown.

Framework 0.6

Planed Changes

  1. Hopefully a new background.
  2. New images.

Change log

  • New Dead seep image.
  • New cloud images.
  • Game now runs at a max of 200 fps, to keep it from using too much cpu power.
  • Grass and watering has been tinkered with.
  • The watering can will now water an area of grass, instead og just the one grass on it's hotspot.
  • Grass now has a brow line under it when it is watered.
  • Hovering the mouse over a dead sheep, will now also tell you that it is dead.
  • Added new Grass background!
  • Changed the folds “bounds” to be a polygon instead of a rectangle, to fit the aspect of the new grass background.
  • Added the fence images to the fold.
  • Fold and fences can now be moved along the y axis with a single variable.
  • Got new grass images and a “watered” icon, instead of the ugly one i made myself.
  • Changed the wateringcan to new check if a whole grass created at the mouse point, will fit into the fold. Previously it only testet the mouse point.

Bugs

  1. The background image is 800×600, but the game board must be set to 800×630 to fit the entire image. Reason currently unknown.

Framework 0.5

Planed Changes

  1. Ad a watering-can icon.
  2. Watering the fold at a spot for a while, should make grass grow there.
  3. Watering grass should add “water” to it. As long as it has water, it will grow faster.
  4. Grass should spread. Not important in framework development.

Change log

  • Added a watering can icon and an ugly “on-active” watering can icon, with water comming out.
  • When clicking and holding, grass will spawn after a short while. (Need to be tweaked)
  • When clicking and holding on an existing grass, it will be watered. Watered grass will grow faster.
  • Added clouds!
  • Added an Eatable interface that grass implements. This will make implementing more food types easier.
  • Added a Tool interface and moved the wateringcan functionality into a Wateringcan class that implements this new interface. This enables me to make many different tools easily.

Bugs

  1. The background image is 800×600, but the game board must be set to 800×630 to fit the entire image. Reason currently unknown.

Framework 0.4

Planlagte ændringer

  1. Flytte FPS tælleren over i Fold, så den bliver kaldt når alt er tegnet, i stedet for hver gang main tråden køres.
  2. Finde den opførsel der kræver alle de resourcer.
  3. Forbedre fårenes opførsels strategi og balancere behov for mad, hvor hurtigt de spiser, hvor hurtigt græs gror og bliver spist.
  4. Forbedre algoritmen der placere græs. (Både fordelingen og sørge for at de er indenfor skærmen)

Change log

  • Decided to write in english from now on.
  • FPS counter moved to the folds draw method. This should be more accurate.
  • Optimized the way sheep check if they are on grass, changing it from an O(n*m) at all times, to a O(n) in best case, and O(n*m) in worst case (Current test reduced average number of “tests” it had to go through by 33%).
  • Optimized image loading by having a hashtable with a static version of each image that will be loaded often. Now they will only be loaded from disc once, and kept in memory. This should be better than loading each image, for each sheep, every time the board is drawn (every 1 ms).
  • Fiddled a bit with the wait time for the main thread. With a 2 sec wait, it runs smoother than ever on a very old machine. But still uses more resources than i had hoped?
  • FIRST GAMEPLAY ELEMENT! You can now click on the fold (the green area) to add grass! And therefore, less grass will spawn automatically.

Notes: Hmm, might the game run more smothely on dual core (or more) computers, if i seperate the game logic and drawing into two seperate threads?

Bugs

  1. The background image is 800×600, but the game board must be set to 800×630 to fit the entire image. Reason currently unknown.

Framework 0.3

Planlagte ændringer (I rækkefølge)

  1. Lad board køre i en tråd, og kalde Fold hver runde(Som bliver bestemt af en timer)
  2. Ændre farven på billeder i runtime.
  3. Græs?

Change log

  • Spillet køre nu i en tråd uden fastsat begræsning, så den tegner alt så hurtigt som muligt. Fold kalder nu først move() på units, efter et fastsat interval. Dette vil gøre at spillet kan køre i max fps, mens units stadig bevæger sig med en fast hastighed.
  • Jeg har tilføjet en simpel FPS tæller. Lige nu er jeg på over 5000 fps, hvilket måske er en fejl. Men hvis jeg sætter tråden til at vente 100 ms for hver loop, er jeg rigtigt nok på 9-10 fps.
  • Jeg har igen sat en Thread.sleep() på i den tråd der køre spillet. Før havde jeg ingen sleep på, så programmet kørte så hurtigt det kunne, hvilket gav op til 5000 fps. Dog tog den også alt ledig cpu kraft, så cpu forbruget lå på 100% konstant. Jeg har nu sat 1 ms sleep ind, hvilket giver fine 400-500 fps, og 0-1% cpu forbrug.
  • Jeg har flyttet Sheeps move metode ud i en strategi og omdøbt det til “runRound” i stedet for “move”. Denne metode/strategi tager sig af alt opførsel der skal udføres i hver runde.
  • Græs er blevet tilføjet. Græs vokser med tiden til deres max størrelse. Når der bliver spist af dem, bliver de mindre og de forsvinder hvis de bliver spist helt. Ellers vokser de op igen. Nyt græs spawner automatisk.
  • Ny opførsel på får. Nu spiser de først når de er sultne OG er tæt på en tot græs. Hvis ikke de får mad nok, så dør de!

Bugs

  1. The background image is 800×600, but the game board must be set to 800×630 to fit the entire image. Reason currently unknown.
  2. Der er et eller andet der bruger rigtig mange resourcer. FPS ser fin ud, men fårene flytter sig meget langsomt. FPS skal nok tegnes for hver gang fold er førdig med at tegne i stedet. Den krævende opførsel skal også findes.

Framework 0.2

Planlagte ændringer (I rækkefølge)

  1. Sort movable objects by distance. (In cooperation with 2.)
  2. General Unit Interface to inherit from.
  3. Limit movement to certain areas (rects).

Change log

  • Created unit interface that all units must implement.
  • Units now appear in the right order (in front of/behind of each other) depending on their y position. (This is done through the Unit interface)
  • A new object has been created to keep track of the area where units may be and move around. The “fold”. This is a large rect and it's bounds are used to check where units may move to.
  • The way new destinations for units are selected, has been changed to an interface. This means that different “strategies” for destination selection can be made. These strategies can be set and changed for each unit, at runtime and at any time.
  • Two strategies for destination selection have been implemented. 1. A random point inside the fold. 2. A random point inside the fold, but close to the units current position.
  • The original 3 sheep (Molly, Dolly, Polly) uses the first(Original) strategy, but the new sheep bob uses the second and new strategy.
  • Sheep are a little closer to their original size and they don't scale down quite as much when they further away. Previously they were too small all the time.

Bugs

  1. The background image is 800×600, but the game board must be set to 800×630 to fit the entire image. Reason currently unknown.

Framework 0.1

Change log

  • Får bliver mindre jo længere væk(op) de bevæger sig, for at give effekten af at de bevæger sig væk og ikke op.
  • Får peger i den retning de bevæger sig horisontalt.

Ideer

  • Trædemølle hvor får kan løbe og lave el.
  • Får der spontant laver en pyramide formation (Credit Jesper)
  • Får skifter farve efter hvilke “stats” de er “født” med.
  • Forskellige typer får (Uld produktion, beskytter-får, Atletiske får, osv.)
  • Super sheep! (Ala worms)
  • British sheep (tophat)

Noter og ideer:

  • Får destination = Græs i nærheden?
  • Gameplay version 1: Hold dine får i live, ved at vande/gøde græsset.
  • Pænere får?
  • Pænere baggrund?
  • Mouse cursor.
  • Kollision af units?
  • Græs spreder sig?
project/minisheep/start.txt · Last modified: 2018/02/19 19:27 (external edit)
CC Attribution-Noncommercial-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0