# I am trying to do a stardew valley grid like.

**URL:** <https://forums.unrealengine.com/t/i-am-trying-to-do-a-stardew-valley-grid-like/2362937>\
**Category:** Blueprint\
**Tags:** unreal-engine, question, Blueprint\
**Created:** [February 27, 2025, 3:47pm UTC](https://forums.unrealengine.com/t/i-am-trying-to-do-a-stardew-valley-grid-like/2362937 "2025-02-27T15:47:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SemagSSB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SemagSSB](https://forums.unrealengine.com/u/SemagSSB)\
**Post date:** [February 27, 2025, 3:47pm UTC](https://forums.unrealengine.com/t/i-am-trying-to-do-a-stardew-valley-grid-like/2362937/1 "2025-02-27T15:47:47Z")

</div>

I’m trying to make a game inspired by Stardew Valley, but in 3D and with a square aesthetic. I created cubes to represent the ground—things like dirt, stone, sand, etc. I set up a struct and a data table with properties for these cubes such as:

- Can be plowed?
- Can be watered?
- Can trees grow?
- Is plowed?
- Is watered?
- Has a tree?
- Can build on?  
…and similar attributes.

The only way I see to build the ground as a grid is by placing multiple instances of the same actor side by side. However, this approach causes major performance issues since it would require roughly a 250x250 block area per map segment.

I even tried using Instanced Static Meshes (ISM), but then the blocks don’t have individual data table variables—they all act as a single block. I’ve looked into how farming games like Stardew Valley, Coral Island, and even Harvest Moon handle this, but I haven’t found any answers yet.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 27, 2025, 3:57pm UTC](https://forums.unrealengine.com/t/i-am-trying-to-do-a-stardew-valley-grid-like/2362937/2 "2025-02-27T15:57:45Z")

</div>

> [@SemagSSB](#):
>
> I even tried using Instanced Static Meshes (ISM), but then the blocks don’t have individual data table variables

ISM instances have an index, and that’s all you need. The data is kept in an `int (index) | struct` [Map](https://dev.epicgames.com/documentation/en-us/unreal-engine/working-with-maps?application_version=4.27) and retrieved as needed. It would not reside in the tile itself.

In short:

- have a single actor with many ISM components, acting as a manager
- tiles can be moved between ISMs if needed
- have a struct representing the tile’s data
- the manager actor holds onto tMaps keeping track of tiles’ state

It takes a while to get one’s head around it but it is quite performant. There are obviously quirks and gotchyas you’ll discover along the way. You will need to understand how instance indexing works, too.

Once you feel comfortable with ISM, you could tackle HISM which _can_ provide further performance boosts under right circumstances.

* * *

At this point, you may also want to start looking into:

> **[Storing Custom Data in Unreal Engine Materials Per-Primitive | Unreal Engine...](https://dev.epicgames.com/documentation/en-us/unreal-engine/storing-custom-data-in-unreal-engine-materials-per-primitive)**
>
> An overview of the Unreal Engine Custom Primitive Data workflow for storing custom data per primitive that's accessible through Blueprint.

Here’s a very crude example:

> [@How to add a hit count (health points) to individual instances?](https://forums.unrealengine.com/t/how-to-add-a-hit-count-health-points-to-individual-instances/227176/2):
>
> The name of the game is Custom Primitive Data (check docs at the bottom). The material for a brick: each instance stores a float which is used to Lerp between 2 colours (to visualise hits remaining) this can (and probably should) get prettified Making a brick wall: create a bunch of instances and store their data in an int | int Map instead of an integer, you could have a struct and hold all kind of data here; perhaps this brick is worth some coins, or explodes when destroyed and …

---

<div class="post-metadata">

**Author:** ![gamechecker0](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gamechecker0/32/1056958_2.png) [@gamechecker0](https://forums.unrealengine.com/u/gamechecker0)\
**Post date:** [May 8, 2025, 10:09am UTC](https://forums.unrealengine.com/t/i-am-trying-to-do-a-stardew-valley-grid-like/2362937/3 "2025-05-08T10:09:32Z")

</div>

> [@SemagSSB](#):
>
> I’m trying to make a game inspired by Stardew Valley, but in 3D and with a square aesthetic. I created cubes to represent the ground—things like dirt, stone, sand, etc. I set up a struct and a data table with properties for these cubes such as:
> 
> - Can be plowed?
> - Can be watered?
> - Can trees grow?
> - Is plowed?
> - Is watered?
> - Has a tree?
> - Can build on?  
> …and similar attributes.
> 
> The only way I see to build the ground as a grid is by placing multiple instances of the same actor side by side. However, this approach causes major performance issues since it would require roughly a 250x250 block area per map segment.
> 
> I even tried using Instanced Static Meshes (ISM), but then the blocks don’t have individual data table variables—they all act as a single block. I’ve looked into how farming games like Stardew Valley, Coral Island, and even Harvest Moon handle this, but I haven’t found any answers yet.

This idea sounds really cool! A 3D version of Stardew Valley is a fun concept. For the performance issue, maybe you could store the data for each tile separately and just use Instanced Static Meshes for the visuals. I think games like Stardew Valley might do something similar. Good luck with your project — looking forward to seeing more!
