📜 ⬆️ ⬇️

Creating a game on the Unreal Engine 4 for 150 hours (video + source)

Greetings, Habr! I would like to acquaint you with a relatively small project that I made from scratch in about 150 hours (50 visits ~ 3 hours each) on the Unreal Engine 4. I did the project live on the air only once a week (a total of a year has passed) , incidentally answering questions from users.

The project itself was not intended as commercial. The goal I put in practice is to show the complexity of game development, namely such problems as:


image
')
At the end of the entire series of streams, we had a playable prototype of the “Survival” shooter. Those who have a glass half full can even call it a pre-alpha without a plot.

If you are interested in the details of the project, recordings of streams, sources, etc., read on.

The entire project was implemented on a visual programming system called “Blueprints”. And of course, many experts can call it childish, you can safely develop even a relatively large project on it. Moreover, this can be done relatively quickly, as we have already been able to prove.

Just want to answer the question: " Why is Blueprint, and not C ++? ". Well, firstly, when I started the series, I hardly knew the pros. Although I would now make a similar single on the BP. Secondly, the BP is almost as good as the pluses in our case, but at the same time they provide a number of possibilities: They don’t allow making a lot of mistakes possible with pluses; there’s no need to be distracted between BP and C ++, which is more understandable for beginners. And in our case, they are not much slower, given the fact that almost all logic is built on events.

We also had a little time to work on the graphics. Unfortunately, we did not have time to do assets, so we left some of them empty, some were made directly from primitives in the editor, and some content was borrowed from free demos of Epic Games. Nevertheless, they managed to do something themselves, for example, the system of day and night, post-processing for water and some materials of the objects of the scene.

In the plans of my streams, there were also problems that may arise during development. I specifically decided them on the air, in order not only to show what young developers might encounter, but also how to debug their code, search for bugs and write their code so that the whole thing could be done twice as fast. Of course, I haven't had any experience in programming for decades, and this affected the stupid mistakes I sometimes made. And I am sure that many developers can challenge many points in the process of writing a game.

Naturally, this can hardly be called a full-fledged game, since there is neither a plot nor a goal in the game - only pure mechanics. Nevertheless, I believe that the result can be proud of and it fully reflects what the whole project was intended for.

A list of all that we managed to implement in our game
Character

  • Character management
  • The system of vital signs (Life, armor, stamina, hunger, thirst)
  • Switch view (from first person to third)
  • Modelka (made in Fuse, animation took with Mixamo)
  • Customized animations for moving and using weapons
  • Universal interaction with objects


Inventory object system
  • Inventory component (embed in any object where you want)
  • Cell system with support for various sized items
  • Inventory size per cell per page and by weight.
  • A class of items that can be put in inventory. Items are stored as objects.
    • Weight, size, information, condition of the item
    • Stack functionality (when there is a lot of one item in one cell)
    • The ability to add logic to the use of the subject
    • Dropping out of inventory
  • Interface to interact with the inventory
  • Interface to exchange between another component and its own.
  • Drag & Drop manipulation of objects between inventories and within one.
  • Context menu items
  • Tips on hovering on items in inventory and in the world.
  • List of generated items when creating an object with a component / beginning of the game.
  • List of initial items when creating an object with a component / beginning of the game.
  • Trading system between other inventory
    • Trading interface
    • Component of money management (necessary for the operation of trade)


Equipment system
  • Outfit of several types of objects: Hats, Tops, Pants, Boots, Weapons
  • Skeletal synchronization at Top, pants and shoes. (Hats and weapons by socket)
  • Convenient window for equipment with Drag & Drop support
  • Support for logic modifiers when dressing

Weapons

  • Long-range weapon
    • Recharge
    • Using inventory items from inventory
    • Support for projectile / bullet classes
    • Auto Fire / Single Fire
    • Return with a spread (your + from factors, eg running or squatting)
  • Melee weapons (with several types of damage checks to choose from)
  • The condition of the weapon deteriorates when using

Crafting system

  • Kraft according to the recipe (chose the recipe, he scrapped, ala Fallout)
  • Crafting on items (threw the right items, he scrubbed, ala minecraft)
  • User interface only for the second type of crafting.

Aggressive Mobs

  • Melee Mobs (if they see, run and start beating)
  • Mobs of mixed type (shoot, but if close enough, they will run to strike)
  • Dalnik run around obstacles if they can not shoot.
  • There is a built-in inventory for loot after the kill.
  • Spawn area
  • Class list
  • Spawn chance

NPC

  • City NPCs patrolling their spawn zone
  • Unique NPC
  • Basic schedule controller for unique NPCs
  • Reaction to damage (escaping or using existing weapons)
  • Built-in inventory for loot after the kill.
  • Object dialog system
    • Dialog tree
    • Each answer is an object.
    • For each answer, you can drop any logic or accessibility condition.
    • Dialog Interface
    • Several ready-made response classes (starts trading, takes resources, if any, exits the dialog)

Building

  • Class constructions that support placement
  • The use of items-resources from the inventory when placing.
  • Snapping on some types of structures (eg Walls, foundation, windows)
  • Menu with designs
  • Highlighting designs for which there are enough resources

Additionally

  • A small map of the city, forest, water (you can swim).
  • Day / Night Shift System
  • Cars
    • View from the first or third. Shared with the Persian
    • Turn on / off headlights.
    • Built-in inventory component (need to interact with the trunk)
  • Something like working stairs vertical type.
  • Main menu
  • Pause menu
  • Menu with graphics settings


However, talking about the project can be infinite. And in order not to turn the article into a book, I suggest to get acquainted with the game and video features. And for those who are really interested, just below you will be able to find records of all streams, links to source codes and build of the game.



→ Records of all 50 parts of streams

Content in parts
  1. We start and plan the project. Create control and behavior of the character.
  2. We start to make the inventory system.
  3. We continue to make the base of the inventory system.
  4. We are preparing a base for equipment and weapons.
  5. Work on weapons and use of ammo.
  6. We do auto-shooting and aiming.
  7. Create a basic crafting system.
  8. Running, recycling and wear.
  9. We implement reloading for weapons.
  10. Making a melee weapon.
  11. Finish the melee and make a ladder on which you can climb.
  12. We make interactive objects: wood, stone, bushes.
  13. Make a HUD and start making an interface for inventory.
  14. We continue to work on the inventory interface. We do the generation of cells with objects.
  15. We continue to generate cells and search for a place for the item. Add inventory pages.
  16. We make a small interaction with items in the inventory and detailed information window.
  17. Drag & Drop made drag and drop items on inventory and other inventory.
  18. This part deals with the visualization of crafting.
  19. Create a window with a choice of the number of items from the stack for transfer to another inventory.
  20. We make support for different crafting recipes, as well as fix various bugs in inventory.
  21. We create a system for changing the day and night, as well as creating a new scene for our project.
  22. We are starting to create AI for aggressive bots.
  23. We make the attack of mobs, as well as the reaction to the attack. Plus we implement the collection of loot from dead mobs.
  24. We make a spawn zone for the NPC. Also add the generation of random items in the inventory.
  25. Upgraded to 4.13, as well as doing distant aggressive NPC.
  26. Add different items to the HUD. Add manual reloading of weapons.
  27. We finish the support of skeletal clothing and hats. Add animation for first-person weapons.
  28. We make an interface for working with our equipment system.
  29. We start to make a trading system and a money management component.
  30. We continue to make trade, creating and customizing the trade component.
  31. We do the cancellation of trade, as well as adjust the animation recharge.
  32. We create transport with our inventory, headlights and view switching. Create a flashlight.
  33. We create construction (more precisely, a system for placing objects in front of us).
  34. We make an interface for construction, we make a binding for the walls.
  35. We create several more types of structures: Tent, bed, chair, table, lamp, door. chest fire
  36. Add a roof, windows. We finish alignment relative to other structures.
  37. We make a small settlement, as well as populate it with NPCs, which we also create in this lesson.
  38. We begin to make a dialogue system for our residents.
  39. Adjust the fog and post-processing. Import a zombie model and set up animations for it.
  40. We finish the dialogue system.
  41. We make interaction with objects from a third person, as well as modifiers for armor.
  42. We create the main menu, pause menu and graphics settings. And also collect the first assembly of the game.
  43. We are implementing a schedule for unique residents. And also that the city NPCs would run away from the attack.
  44. Add a context menu to the inventory, as well as fix some bugs of our inventory.
  45. Add recoil, scatter, animation shots and the ability to strike for firearms.
  46. We finish the aggressive and urban NPC, fix various bugs associated with them.
  47. Customize animation for the main character. Add a variety of clothes.
  48. We correct various errors in our game.
  49. We correct various errors of crafting, NPC and equipment in our game.
  50. We modify the map a little and collect the last build.


→ Sources on Git (downloading a ZIP archive does not work, the archive is for some reason damaged.)
→ Source codes on the YaDisk (License is the same as in the source code)
→ Build Games

In the future, I plan to continue to conduct such streams. For example, in turn, we have to stream a multiplayer shooter, and then a strategy.

Source: https://habr.com/ru/post/327372/


All Articles