Author Topic: Harvest Moon Clone  (Read 22736 times)

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Harvest Moon Clone
« on: 2008-03-20, 12:34:33 PM »
hi guys,
the last days i thought about if it would be possible to do a harvest moon clone. do you know this game? here are some screenshots:

http://www.consoleclassix.com/info_img/Harvest_Moon_SNES_ScreenShot2.jpg -- felling timber
http://free-game-downloads.mosw.com/ss/4340_0.jpg -- harvesting raddish
http://image.com.com/gamespot/images/2003/reviews/589702_20031210_screen002.jpg  -- harvesting more with a cow watching
http://image.com.com/gamespot/images/2003/reviews/589702_20031210_screen023.jpg -- feeding chicken, a mini-game
http://image.com.com/gamespot/images/2003/reviews/589702_20031210_screen006.jpg -- going through the village in winter
http://image.com.com/gamespot/images/2003/reviews/589702_20031210_screen046.jpg -- make your cow feel good ^^

you have a few places, like your farm, the woods, the village, the mountain. you start with your farm as an abandoned place, the fields are full with rocks, twigs and weeds. you have to clean the fields, hoe them, buy seeds, sow, water it, watch it growing, and harvest.
i think there can much be done with tiles changing their frames. durnurd has shown me a good method. (a special counter = mapped tile frame)
i could imagine make the whole thing growing, placing randomly weeds at the acre...
but, i can't make a counter for every tile. hm.
and how would i then realize the four seasons? i already made something like this, but how could i combine this with the many stadiums of the field plants? maybe with the same method from durnurd.

the game's rhythm is from day to day. you have ca. 10 realtime minutes, in which one game day takes place. you start every day in your bed, and when going out of the house, there are some new weeds or rocks, or your crops may have grown. every 30 game days the season has changed, and so the land is covered with snow or is in bloom at springtime.

i would highly appreciate some methods to manipulate tiles not directly through "touchTiles". but maybe one can create a category for "plain field tiles" and make plan rules for that random weeds growing. or a category for "corn", and the rules can tell for each tile alone, whether it changes into a big crop because it had enough water.
this idea i had some months earlier: it would be so nice if one could change with a simple rule two tilesets. that would be so cool to make seasons, or change a normal level into a destroyed level for example.

i just thought about it, i don't want to end the work on Mistraal now. what do you think?

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Harvest Moon Clone
« Reply #1 on: 2008-03-20, 04:19:00 PM »
one more thought:
i believe a tile could be so much more than only a little graphic the player walks over or is stopped by. imagine "intelligent" tiles, which know what they are and what other tiles are in their near. certain tiles could influence the types of sprites that "live" on them, or could reproduce themselves and spread themselves, ousting weaker tiles.
yes okay, the tiles wouldn't be intelligent, the plan rules would do that. but i like the idea that the "ground", the basis of the whole game, is underestimated and needs to free its potential.
of course is this nothing a normal sidescroller would need. but couldn't this breed whole new ideas and games?

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Harvest Moon Clone
« Reply #2 on: 2008-03-20, 05:20:00 PM »
My thought was that if you wanted to have tiles that had more features you would use sprites instead of tiles.  And since you can have hundreds of sprites active without much slowdown (if they're relatively simple sprites), it seems practical.

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Harvest Moon Clone
« Reply #3 on: 2008-03-20, 10:01:01 PM »
There are two approaches.  One is to have all of the field as sprites like bluemonk suggested.  The other is to have tiles, like you thought, but counters would not control the different values of all the tiles. There is a predictable progression of a particular tile based on its previous value, so each "day", update the value of all the tiles using a doubly-nested for loop in a custom code object to update all of the values.  The counter could control the season.
Edward Dassmesser

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Harvest Moon Clone
« Reply #4 on: 2008-03-21, 03:13:01 AM »
thanks.
sprites for tiles: okay that would be possible. but i don't think it's fun to make a complex game with that. creating hundreds of sprites and placing them on big maps is no likely idea. as i remember, "snap to tile" can be used when placing a sprite, but after it is placed and you want to shift it or shift it accidentally, it doesn't snap anymore.
placing other sprites (non-tiles) on this sprite-surface is a real pain. with one click you always select all sprites beneath the cursor. i hated that always.

for your other idea, durnurd, could you give me an abstract example?  i don't understand it totally.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Harvest Moon Clone
« Reply #5 on: 2008-03-21, 05:30:50 AM »
Durnurd's idea would go something like this:
Code: [Select]
         if (Counter.DayFrame.CurrentValue == 1) // time to grow all the tiles
         {
            // Retrieve a strongly-typed reference to the map so we can
            // access the layers and tiles
            Level_1_Map map = ((Level_1_Map)Project.GameWindow.CurrentMap);
            // Loop through every tile on the main layer
            for(int y=0; y<map.m_Main.ActualRows; y++)
            {
               for(int x=0; x<map.m_Main.ActualColumns; x++)
               {
                  if ((map.m_Main[x, y] >= 12) && (map.m_Main[x, y] < 17))
                     // If the tile is a growing wheat tile,
                     // make it grow one step larger.
                     map.m_Main[x, y]++;
                  else if(map.m_Main[x, y] == 17)
                  {
                     // If this is a mature wheat tile, it seeds all the tiles around it
                     if ((x > 0) &&
                        (map.m_Main.GetTile(x-1, y).IsMember(TileCategoryName.Grass)))
                        // If the tile to the left is a grass tile, seed it
                        map.m_Main[x-1, y] = 12;
                     if ((y > 0) &&
                        (map.m_Main.GetTile(x, y+1).IsMember(TileCategoryName.Grass)))
                        // If the tile above is a grass tile, seed it
                        map.m_Main[x, y-1] = 12;
                     if ((x < map.m_Main.ActualColumns - 1) &&
                        (map.m_Main.GetTile(x+1, y).IsMember(TileCategoryName.Grass)))
                        // If the tile to the right is a grass tile, seed it
                        map.m_Main[x+1, y] = 12;
                     if ((y < map.m_Main.ActualRows - 1) &&
                        (map.m_Main.GetTile(x, y+1).IsMember(TileCategoryName.Grass)))
                        // If the tile below is a grass tile, seed it
                        map.m_Main[x, y+1] = 12;
                  }
               }
            }
         }

If you wanted your function to be more general-purpose, you could pass the layer in and then use that object instead of hard-coding a reference to your main layer of the level 1 map.  The layer could be retrieved from the parent object of the player sprite or something.

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Harvest Moon Clone
« Reply #6 on: 2008-03-21, 06:46:36 AM »
wow, thanks, i have to study that.
i would like to start immediatly working on this game, because i had the idea for it about ten years ago.... and now, finally, i see the chances to really DO it....
oh man... but i need to finish Mistraal first.
but i just started a new blog for this game. ten years ago, the only good name that came to my mind was "Home Grown"... but i never liked the dope assoziation. now i find "AggroCulture" quite funny.  (farming sim meets sex drugs crime and so much more... yeeha!)

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Harvest Moon Clone
« Reply #7 on: 2008-03-21, 07:51:33 AM »
Hm.  I wasn't familiar with Aggro until just now.

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Harvest Moon Clone
« Reply #8 on: 2008-03-21, 08:44:56 AM »
There are many ways to optimize the general algorithm above depending on your specific implementation.  For example, you could put all of the "growing" tiles (but not the full-grown ones) of any type (wheat, grass, weed, corn, etc.) into one single tile category, and instead of checking if the value is greater than 12 and less than 17, just check that the tile itself is a member of that tile category.  (Something like "Tileset[value].IsMember(GrowingCategory)") Then you can increase the value by one.

This is just one example.  Depending on what you want done, there are other things that could be done.
Edward Dassmesser

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Harvest Moon Clone
« Reply #9 on: 2008-03-21, 10:31:43 AM »
aggroculture is meant as a wordplay of agriculture.

for what is that 12 < x < 17 good? is that for a some crops growing at the specific x and y between 12 and 17?
very important for the whole growing thing is, that the player has to water the plants. only watered plants can grow. i can't really imagine how this can be stored for every single tile.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Harvest Moon Clone
« Reply #10 on: 2008-03-21, 02:27:42 PM »
aggroculture is meant as a wordplay of agriculture.

Yes, that part was clear.  I didn't know that "Aggro" was a term by itself, though.

for what is that 12 < x < 17 good? is that for a some crops growing at the specific x and y between 12 and 17?

12 and 17 are just examples.  In this example, it is assuming that 12 through 17 represent watered wheat tile indexes, where 12 is a watered seed and 17 is a full grown plant.  As Durnurd suggested, you could also use a tile category to represent all watered wheat tiles instead of checking the tile index.

very important for the whole growing thing is, that the player has to water the plants. only watered plants can grow. i can't really imagine how this can be stored for every single tile.

The easiest thing would be to have "duplicate" tiles (or slightly different tiles) for all wheat.  Maybe 12-17 represent watered wheat and 18-23 represent unwatered wheat tiles.  If you want to get fancy, you could even make 12-17 slightly darker to make them look wet so it's clear that they have been watered.  Or maybe you want to do this if the player has to water the tile each time before it grows:
11 = Dry seed
12 = wet seet
13 = dry sprout
14 = wet sprout
15 = dry young wheat
16 = wet young wheat
17 = dry half-grown wheat
18 = wet half-grown wheat
19 = dry mostly grown wheat
20 = wet mostly grown wheat
21 = full grown wheat

Then when the player waters any dry wheat tile (odd tile index) just increase the index by 1.
And when growing happens, only grow tiles that have an even tile index by adding 1.  This will cause them to become dry again, but one step older.

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Harvest Moon Clone
« Reply #11 on: 2008-03-22, 03:18:01 AM »
okay, cool system. only count up even tiles... yeah very good.

i had the following idea:
if the player doesn't water the plants, they die after a few days. to realize the "counting of dry days", i thought of making ca. 5 equal looking tiles. the first four look dry and normal, and the last one looks slightly toasted. every day the plant was not watered, its tile index change + 1. so the image of the plant is the same, but the "internal counter" knows exactly how many days till it dies.

i will have to think about managing categories for that. of course using categories is much easier than using tile indexes.

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Harvest Moon Clone
« Reply #12 on: 2008-03-23, 03:57:45 AM »
so, what would be the best way to give the hero items to the hand? in other games this would be a sword, here it will be watering can and hoe.
my first idea ist to make the item picture much bigger than the hero, and attach it to the him at the center point. the picture will not change its position, only the depicted item is sometimes an the left or on the right side (of the hero).
i guess it is possible to coordinate the hero's movements (frames) with the animation frames and states of the item.

are there other and/or better options?

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Harvest Moon Clone
« Reply #13 on: 2008-03-23, 07:40:54 AM »
If you are talking about the player carrying things on top of his head like actually happens in Harvest moon, then using the predefined functions, you can just match places on the bottom-center of the carried sprite (the watering can, for example) with the top-center of the player, and offset the can down a few in the frameset so it overlaps.  If you're actually talking about the player using the watering can, then those should probably be drawn as part of the player sprite itself in a separate state, considering that the player needs to move in a certain way using the watering can that he doesn't use elsewhere.

I'm basing all this on the actual Harvest Moon game, though.  I don't know what you want to copy and what you don't.
Edward Dassmesser

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Harvest Moon Clone
« Reply #14 on: 2008-03-23, 10:15:06 AM »
copying the behaviour you described is what i want. at least it is a good starting point.
i could try drawing the items as separate states. but i haven't made so positive experiences with changing place of the collision rectangle. the sprite jumps in game horribly. do you know what i mean?