[Game] Village Craft


Discord link: VillageCraft

Last 4 months I have worked on idle/casual game.

(Screenshot of the real gameplay)

(Play the game using a gamepad!)

About Game

Village Craft is an idle simulation game where you take the role of a village elder who is in charge of a gaul village. Plant wheat and apples, gather logs, planks and other stuff. Unlock new buildings, build a ship!

You can also hire and teach your staff new skills.
Use “Potion of Speed” (you need to view short ad) to increase movement and producing speed.

How to play

Run around the village to grab items and stand next to building to replenish supplies.

Wake up your staff if they are sleeping by standing near.

Build a shop to sell items to customers.

Build a pub to exchange cider for coins.

Be attention on rain, it can slow down you and your staff!

Move - WASD or Arrow keys(PC), virtual joystick(Mobile).
You can drop any item from your inventory by tap on it.


  • Must to have
    tutorial in the beginning about how to play
    integrate GameAnalytics to track game events
    promo materials (icons, banners)
    tuning game balance (it never ends…)
    more detailed model for Pub, Winery …
    find a publisher/platform

  • Nice to have
    animations for buildings: Pub, Winery, Bakery etc.
    mobile perf optimisations (last iteration)
    – more features!


The main goal was to try Babylon for 3D instead of Unity.

There are a lot of tips and tricks which I want to share with you. But first, lets play a little bit:

Village Craft on Poki

What I want:

  • 3D
  • Simple input
  • Simple level design editor
  • Possibility to run game on mid-end mobile devices.

Because I had experience with Unity3D, my first prototype was made with Unity. After 7 years of break(I worked with Swift, Kotlin, ObjC, JS in this period) it didn’t change much.

I like DX for javascript development and with tools like Vite/esbuild you can reach high iteration speed. But with c#/unity it is nightmare. You must wait 5-10seconds for code reloading(and my project was not huge).

Another big issue is a build size. For empty project its around 5-6MBs. With game resources you easily rich 20+ MBs. Just see some Unity WebGL builds…

(The Ship in progress…)

So, I started looking for better engine. After some research, I picked 3:

  • ThreeJS
  • Playcanvas
  • BabylonJS

ThreeJS is good for low level or simple projects. I don’t want to invent 100500 wheel so I skip this option.

PlayCanvas is much better and it has web editor, but I don’t see transparency for their API. And I want to use TypeScript.

That was the road to BabylonJS. After some lessons on youtube I created some demos to check API and performance.

My first post on this forum was about multiple canvases so I could render 100 instances of avatar.

(Do you know what tool is it?)

After New Year I found ECS library miniplex . That was my second new thing, but I constantly heard about ECS in the gamedev. I were inspired by this video on GDC about ECS in Overwatch. Also, I heard about ECS from my friend, because he used this pattern about 4 years but with Defold.

So my plan:

  • use BabylonJS for 3d render, resource management(audio, models, textures) and lifecycle;
  • use ECS for game logic and state;
  • use React for User Interface (but I started with plain html+css but decided to rewrite);
  • use Unity as a level editor and assets prepare pipeline(instead of Blender).

I really like ECS because it is easy to extend and maintain, easy to find issue and easy to tune performance(in most cases you just move you system’s update cycle to another render frame or delay it for some ms.)

Babylon Inspector is another good tool to finding issues or just tuning settings for your objects. I leave it even for production(with lazy loading of course).

I have some twits about development. Check it out on twitter.

I like this one about Gamepad supports: https://twitter.com/i/status/1642548537329156099

And that’s how I did a party(or VAT, check it here):

(Party hard “ON”)

Any feedback are welcome! Enjoy!

UPD: The title was updated to be more suitable for gameplay.


re feedback: I am getting about 20 fps on my integrated Intel GPU thing and an aged i7. Found a bug I think: collision detection vs level geometry is mostly off. Trees work fine. Bushes, rocks and hills are problematic.

Since you mention publishing. From what I could see in the demo you have put in Quaternius’ assets. These are CC0. So no problem. I would put this into the GDD though; if not in a dedicated license management system. (I do that because I am using CC-BY assets) Just for risk management purposes since licenses can change and there are copyright trolls out there (i.e. relicensing CC0 assets, then claiming that…) :frowning:

1 Like

Woah, I played for a bit and I have to say it’s addicting to see the village grow little by little! And I like how everything is in emojis so you don’t even need text :rofl:

Very interesting to read about your creation process too :slight_smile: I agree that the Inspector is an invaluable tool in helping debugging :smiley:

@PirateJC you should check this out! ;D


This is seriously cool!!!

1 Like

A little progress:

I’ve tried some new mechanic like Thief and Manager, but decided to postpone it for v2.

Another cool news for me - I received a response from a good platform. Hope we’ll work together. So, the release day is coming…

Now I want to improve characters. Maybe some minor changes like brown/eyes shape…


Thanks. Could you please check inspector for fps and timings. Is it GPU time or CPU? (shift+control+cmd+I)

It isn’t the bug. I decided to not using collision for bushes/buldings right now because in most cases you select “free” way. But yeah, I will add collision for buildings.

Another interesting task is pathfinding for my NPCs. Right now I’m using simple waypoints system.

My iphone gets 55-60, feels great.

For mobile controls, I think double pointer tap on collectibles / triggers / objectives could be a nice option. Free movement feels good, just interactions are a little hard for me. Great job though, one of the best feeling mobile compatible games so far i think. Did u experiment with different control setups like a fixed joystick location with buttons for mobile to kind of mirror the gamepad controls? Whats your thought process for aligning mobile / gamepad / desktop controls? Btw i saw on the babylon blog fortnite is using babylon for their mobile controls… pretty cool.

1 Like

It is a core gameplay’s limitation. There is a genre for this kind of games. Without it the game will be boring)

I need to configure radius size for interactable objects to simplify transferring process. Thanks for the hint!

You can try WASD/Arrows or event a gamepad(I tried PS4 and Logitech gamepads, both work great).

For fixed joystick location, I think it is a “nice to have” option, thank you again!

1 Like

Update 3

Without words(left - new, right - old):


Very smooth @Alexander_Sosnovskiy

Haven’t been able to fully test everything, but it feels great to play. (I’ll test more another day when I have more time.)

Keep up the good work :slight_smile:

1 Like

very cool, the character models remind me of the sackboy game :slight_smile:

1 Like

Update 4

I’ve implemented A* pathfinding for my customers.

I tried Recast several times, but it is too complex for my project and me)

So I decided to give a chance to simple A* implementation from GitHub. And it works perfectly!

My grid is not so big (32x64) So I can find several hundreds paths per second.

Also I’ve added In Game editor for editing cells’ weight( 0 - wall/can’t move, 1 - walkable)

@oriongu Maybe it can be useful for your project GitHub - bgrins/javascript-astar: A* Search / Pathfinding Algorithm in Javascript

Another good “issue” was smooth rotation from A to B in radians(it didn’t rotate with shortest direction). But with super cool BABYLON.Scalar.MoveTowardsAngle it is just one line.


Recast is just A* for navmeshes. At its heart, they are one and the same. The only tricky part is generating/removing the navmeshes (which are nothing more than 3d coordinates) correctly. Then again, pathfinding is relative to needs and KISS paradigm reigns supreme here.

Its looking good, I’m not seeing shadows tho? Unless its intentional, you might wanna tackle that first?

1 Like

yeah, thanks, i’ve stumbled onto that in the past, not sure how relevant it is to me though as i use
navmesh (no level or physics) on my server and I use YUKA.js to calculate the best path, that works pretty well. my only limitation currently is I do not know how to deal with the Y axis using my system. I’ve not managed to generate a good enough (precise) navmesh via unity → obj format → blender → glb.

That BABYLON.Scalar.MoveTowardsAngle however could turn out to be very useful, as I had to do my own math to get that to work. thanks for sharing.

1 Like

Looking really, I’m envious! Trying to build my multiplayer game that has similar vibes to this game!

I’m really curious how you have tackled the react/ui <=> ecs communication. I struggle with it, since I try to make my game semi independent from any ui libraries… I currently send some messages to ecs world when player does something in the ui, like clicks a button, and do some reactive stuff back when ui needs some information from the ecs world… Any help would be nice :slight_smile:

1 Like

This is going huge!!! Great job sir :raised_hands::raised_hands::raised_hands:

1 Like

I’m using Observer from Babylon to create pub-sub system. So my systems publish events and then ui do something with events.

From other side, I made commands functions which accept state and another parameters and do something useful. Like cmdSpawnItemOnMap(state, x, y, …)

So I can easily replace React to something else without touching game logic


Maybe I missed something but I couldn’t implement shadows properly for mid end devices. Another issue - I haven’t a single ground mesh, so I need to merge all ground tiles first to receive shadows. But I’m still in deep development stage and a lot of stuff may change. So I’ll return to shadows in the later stage.

Update 5

  • Added: roofs and fences
  • Added: Home, Fisherman
  • Added: Chopping skill
  • Added: Upgrade system: new you earn “upgrade points” to improve the buildings
  • Updated: Chopper npc now gather logs from trees

Current plan:

  • additional 3 buildings
  • combat system
  • game balance…
  • rework tutorial


Looking goood @Alexander_Sosnovskiy love seing your updates! :slight_smile:

1 Like