#2 Egg Farm Update

Welcome to the second update of my farming game, lately I start to lose my motivation to continue this game, I still work on the game and push my self to finish it. Writing this blog is also helping me keep working on my games, I am glad start writing this blog actually. And these are the update of the game. Sheep Instead of putting the sheep inside a cage, I decide to let them roam in the field and search for food....

June 10, 2022

#1 Egg Farm Update

Welcome to the first update for Egg Farm, the game title may change in the future. Egg Farm is a relaxing mini farming game, where you can just sit and interact with everything inside the game, plant crops, and ranch animals, and design your own farm. Since this is a mini-game there will not be many features existing, although I still add more features that seem fun. There is still more work that needs to be done to finish this game....

May 10, 2022

Unreal Engine Overflow

Recently, I start using Unreal Engine to develop games. I did not have proper C++ or Unreal Engine knowledge, I usually use Unity and C#. While learning and using it, I stumbled across some problems. So I decide to make some notes that I can use and share with others. Print Enum Into FString StaticEnum<ENUM_TYPE>()->GetValueAsString(ENUM_VALUE) Format FText FText format = "Item Name: {ItemName}" const FText formattedText = FText::FormatNamed(FTextFormat(format), TEXT("ItemName"), itemName); Loop UDataTable itemDT->ForeachRow<FItemInfo>("FindItem", [&](const FName& key, const FItemInfo& item) { // Do something here }); Find a Row in UDataTable FItemInfo* itemInfo = itemDT->FindRow<FItemInfo>(ROW_NAME, "FindItem"); Create UObject Instance UTextBlock* text = NewObject<UTextBlock>(btn, FName("text")); Hide Field on Certain Condition UPROPERTY(EditAnywhere, meta=(Condition="YOUR_CONDITION", EditConditionHides)) float speed; Create Min Max Slider for Field UPROPERTY(EditAnywhere, meta = (ClampMin = "1", ClampMax = "10")) int32 totalSpawned; Instantiate a UObject/Blueprint/WBP MyClass* instance = NewObject<MyClass>(); UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) TSubclassOf<MyClass> MyClassType; // UObject Subclass NewObject<ActorClass>(MyClassType); // Actor Subclass GetWorld()->SpawnActor<ActorClass>(MyClassType); // Widget Subclass MyWidget* widget = CreateWidget<MyWidget>(this, MyWidgetType); The code above is not tested and is used for reference only....

May 6, 2022