One question, how can I know if the new block actor is spawned successfully or not through the code?
There is a “Collision Handling Override” option in the SpawnActor method, I set this option to “Do not spawn”, this will cause the new block actor not to spawn when it is blocked by existing block actor, but the return value of the SpawnActor method still gives a new actor object even if no new actor is added to the world.
One of the best well explained courses on the Forum. Thank you!
Thank you - appreciate your kind words.
It’s so cool!
Where can I find detailed explanation for these functions?
The “view documentation” of the node context menu is unavailable, and the explanations in the Blueprint API Reference is also very simple.
@uniwang - as you noted, there isn’t much in the official Blueprint API reference.
One of my very favorite online references is Marcos Romero’s Website (and book): Romero Blueprints: Table of Contents BP
IsValid: Romero Blueprints: BP Compendium: Is Valid
The Humble Bundle currently has Romero’s book at the $1 tier - worth it! Humble Tech Book Bundle: 3D Game Development with Unreal Engine 5
Also, note that there are two versions of IsValid: the function, that returns a boolean, and a macro, that uses the IsValid function and returns an exec path based on the validity of the object:
You can double-click on the macro to see it in the StandardMacros library:
And, I’m pretty sure if you have the Unreal C++ code installed, you can find the C++ code for IsValid and study it: Unreal Engine on GitHub
Hope some of that helps!
The Romero Blueprints++ is very helpful, and the Humble bundle is excellent, I have supported $18 to get all the items, they are worth it!
Thanks again for providing the information.
“Ctrl + W” has changed to “Ctrl + D”.
Congratulations to you !
Amazing tutorial
You are very didactic.
English is not my mother tongue but as you explain calmly and clearly, I understood everything.
At the end you explain that this system is not suitable for managing thousands of items, what method do you recommend in this case?
Thanks
Thank you for the nice comments @JeanMichel_4D
I’ve experimented using Instanced Static Meshes (similar to how the floor block is created) and making many thousands of blocks with good results. Unfortunately it required a substantial reworking of the system presented in this course and was fairly complex. One of the goals when I created this course was to reduce the complexity and still present a fairly useful system.
I hope that helps!
Stopping by to say that this tutorial works with Unreal Engine 5.4.3.
How to Build a Block-Based Game
-
Define Your Concept: Choose the genre and core mechanics (e.g., puzzle, sandbox).
-
Select a Platform: Use a game engine like Unity, Unreal Engine, or Godot, and familiarize yourself with its programming languages.
-
Design the Grid: Create a grid layout and define different block types and their properties.
-
Implement Mechanics: Develop functionality for placing and interacting with blocks.
-
Develop Features: Establish game rules, design the user interface, and add essential gameplay elements.
-
Test and Refine: Conduct playtesting to fix bugs and balance gameplay.
-
Deploy and Publish: Build your game for various platforms and distribute it through appropriate channels.
To use humor effectively in a block-based game and enhance player engagement, consider the following strategies:
-
Character Dialogue: Create funny and memorable dialogue for in-game characters. Quirky personalities or humorous interactions between characters can make the game more enjoyable and relatable.
-
In-Game Events: Design events or scenarios with a humorous twist. For example, a block-based puzzle might feature amusing obstacles or funny consequences for mistakes.
-
Visual Gags: Incorporate humorous visual elements, such as funny animations or unexpected visual surprises when certain actions are performed.
-
Easter Eggs: Hide humorous references or Easter eggs throughout the game. These can be playful nods to popular culture, inside jokes, or clever wordplay.
-
Narrative: Use humor in the game’s storyline to keep players entertained. A lighthearted plot or witty commentary can make the game more engaging.
-
Feedback and Rewards: Provide funny feedback or rewards for player achievements. For example, a player might receive a comically exaggerated reward or a humorous congratulatory message. Incorporate punnyfun or playful words in character dialogue or game events to add a layer of humor and keep players entertained.
By integrating these humorous elements thoughtfully, you can create a block-based game that is both engaging and enjoyable for players.
Regards: Tiktokusd