Jump to content
  • Advertisement
  • entries
    4
  • comments
    6
  • views
    676

Post-Mortem Of The Dungeon Crawler Challenge

Hermetix

757 views

First I would like to say that I had a lot of fun attempting this challenge. I never participated in anything like this before.

I voted for the Doom and the Dungeon Crawler choices in the challenge poll and was satisfied to see that they both came out on top.

What went wrong

I will start with what went wrong when I started this project, which uses the Unreal Engine. Probably the toughest thing I had to code, was the AI. It simply did not do what I wanted it to do at first and it took me several tries just to get it right. I had to turn on and look at the AI debug screen to see what was wrong. Turns out that my AI's cone of vision was completely disoriented due to a badly aligned capsule component. I simply rotated the capsule 90 degrees and the cone of vision was correct afterwards. But later on I got rid of the 45 degrees vision cone and replaced it with one with full circle so that the enemy could sense the player as if it had eyes all around its head. It was more adequate for the kind of AI that this game would require. 

Another problem that I encountered was that sometimes the AI would stop moving after I had made some changes on the map. It took me several hours to realize that I had to rebuild the map navigation data because the AI simply did not move otherwise.

What went right

This project uses Blueprints for the most part, with some C++ for the basic player movement, setup and camera orientation. I found that Blueprints are extremely easy to use and let you iterate and prototype your game much much faster than pulling up Visual Studio, write some C++ code and wait a while for the code to compile after you make some changes. This is one of the problems with UE4 in my opinion since it takes much longer to compile your C++ code, than to compile your Blueprints. Unity has the upper hand in this as the C# compiles very quickly. This is probably why Epic Games are considering creating an intermediate scripting language between Blueprints and C++. https://www.reddit.com/r/unrealengine/comments/aezhdv/it_seems_people_at_epic_are_considering_adding/

 

So, it was a breeze to simply code game logic using these Blueprints and it did not take me long to adopt them. I am considering nativizing them so I can basically learn how they map to C++, and also to optimize the code. If I do, I will publish the source code on GitHub.

What I have learned

I learned how to use UE4, in my view the most versatile and powerful engine there is to make games right now. You can do so much with it, not just games but all kinds of things from movie content to architectural design.

I learned how to use Blueprints, which at first I thought they were kind of bad since the nodes take so much space and to perform common programming things like loops, branching, etc. it is not ideal. 

I learned how to design an AI using UE4's behavior trees and AI perceptions. It was not easy at first, but it was satisfying to finally make it work.

Level design is another thing I had to improve, and this time it was a bit better than the usual basic things I have done in the past, mostly with Quake 3's level editor.

Conclusion

This challenge helped me learn a lot of things, and I am looking forward to see which challenges will be proposed in the future.

I will go back to focus on my own engine, which uses D3D11/12, and will use what I have learned with UE4 to improve my own code.

 



3 Comments


Recommended Comments

Wow so we'll be getting back some form of new UnrealScript? I didn't expect this to happen so soon!

Share this comment


Link to comment
Awoken

Posted (edited)

I played it.
Have you played it to the finish?
Seems each enemy you encounter will deal damage, I noticed there is an ability to use health-potions.  But alas I didn't find one before I died.  I did stack up gold bars though.  

Edited by Awoken

Share this comment


Link to comment
1 hour ago, Awoken said:

I played it.
Have you played it to the finish?
Seems each enemy you encounter will deal damage, I noticed there is an ability to use health-potions.  But alas I didn't find one before I died.  I did stack up gold bars though.  

Yes I completed it a number of times. You can ignore enemies by walking past them. They will follow you around if they sensed you but you can complete the map without killing anything. Goblins sometimes drop health potions, and very rarely resurrection potions, and there are a couple of health potions in chests around also.

Share this comment


Link to comment

Not sure if my last post registered at all as I don't see it on my profile or the GameDev timeline...

But if you try the game, let me know how smoothly or not smoothly it runs on your system along with your system specs. Because I built the game on a rather low to medium range computer, just 8GB of RAM and a Ryzen 3 2200G APU. I chose the "scalable" option but I am curious about how it runs on other people's computers so maybe I will make a maximum quality build later and adjust gameplay aspects if I have time.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Advertisement
  • What is your GameDev Story?

    In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

    (You must login to your GameDev.net account.)

  • Blog Entries

  • Similar Content

    • By DividedByZero
      Hi Guys,
      I am playing with projective texturing which I now have working well.
      However, I am having troubles figuring out how to blend the original texture with the projective texture. I am trying to make it so the projective texture is painted on top of the original texture.
      I have come close with this
      textureColor = TextureStandard.Sample(SamplerWrap, input.textureCoord); float4 texMixed = (projectionColor * projectionColor.a + textureColor * (1 - projectionColor.a)); color *= texMixed;  
      But this is giving me the following output;

      The skull should be a solid black, and the greens are a bit washed out outside of the projected area.
      Any advice on how to cleanly project the skull on to the body would be truly appreciated.
      Thanks in advance
    • By Transcendent
      So this is the problem that I have :- https://youtu.be/kU8Dm5bDJXg
      This is the code i am using:-
      using System.Collections; using System.Collections.Generic; using UnityEngine; namespace SA { public class AnimatorHook : MonoBehaviour { Animator anim; StateManager states; public void Init(StateManager st) { states = st; anim = st.anim; } void OnAnimatorMove() { if (!states.canMove) anim.ApplyBuiltinRootMotion(); states.rigid.drag = 0; float multiplier = 1; Vector3 delta = anim.deltaPosition; delta.y = 0; Vector3 v = (delta * multiplier) / states.delta; states.rigid.velocity = v; } } } For additional reference see the following code
      using System.Collections; using System.Collections.Generic; using UnityEngine; namespace SA { public class StateManager : MonoBehaviour { [Header("Init")] public GameObject activeModel; [Header("Inputs")] public float vertical; public float horizontal; public float moveAmount; public Vector3 moveDir; public bool rt, rb, lt, lb; [Header("Stats")] public float moveSpeed = 5f; public float runSpeed = 8f; public float rotateSpeed = 20; public float toGround = 0.5f; [Header("States")] public bool onGround; public bool run; public bool lockOn; public bool inAction; public bool canMove; [Header("Other")] public EnemyTarget lockOnTarget; [HideInInspector] public Animator anim; [HideInInspector] public Rigidbody rigid; [HideInInspector] public AnimatorHook a_hook; [HideInInspector] public float delta; [HideInInspector] public LayerMask ignoreLayers; float _actionDelay; public void Init() { SetupAnimator(); rigid = GetComponent<Rigidbody>(); rigid.angularDrag = 999; rigid.drag = 4; rigid.constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationZ; a_hook = activeModel.AddComponent<AnimatorHook>(); a_hook.Init(this); gameObject.layer = 8; ignoreLayers = ~(1 << 9); anim.SetBool("onGround",true); } void SetupAnimator() { if(activeModel == null) { anim = GetComponentInChildren<Animator>(); if(anim == null) { Debug.Log("no model found"); } else { activeModel = anim.gameObject; } } if(anim == null) { anim = activeModel.GetComponent<Animator>(); } //anim.applyRootMotion = false; } public void FixedTick(float d) { delta = d; rigid.drag = (moveAmount > 0 || !onGround) ? 0 : 4; DetectAction(); if (inAction) { // anim.applyRootMotion = true; _actionDelay += delta; if(_actionDelay > 0.3f) { inAction = false; _actionDelay = 0; } else { return; } } canMove = anim.GetBool("canMove"); if (!canMove) { return; } //anim.applyRootMotion = false; float targetSpeed = moveSpeed; if (run) targetSpeed = runSpeed; if(onGround) rigid.velocity = moveDir * (targetSpeed * moveAmount); /* if (run) lockOn = false; */ Vector3 targetDir = (lockOn == false) ? moveDir : lockOnTarget.transform.position - transform.position; targetDir.y = 0; if (targetDir == Vector3.zero) targetDir = transform.forward; Quaternion tr = Quaternion.LookRotation(targetDir); Quaternion targetRotation = Quaternion.Slerp(transform.rotation, tr, delta * moveAmount * rotateSpeed); transform.rotation = targetRotation; anim.SetBool("lockon", lockOn); if (lockOn == false) HandleMovementAnimations(); else HandleLockOnAnimations(moveDir); } public void DetectAction() { if (canMove == false) return; if (rb == false && rt == false && lt == false && lb == false) return; string targetAnim = null; if (rb) targetAnim = "Sword And Shield Attack"; if (rt) targetAnim = "Stable Sword Outward Slash"; if (lb) targetAnim = "Standing Melee Attack Horizontal"; if (lt) targetAnim = "Sword And Shield Slash (1)"; if (string.IsNullOrEmpty(targetAnim)) return; canMove = false; inAction = true; anim.CrossFade(targetAnim,0.2f); //rigid.velocity = Vector3.zero; } public void Tick(float d) { delta = d; onGround = OnGround(); anim.SetBool("onGround", onGround); } void HandleMovementAnimations() { anim.SetBool("run", run); anim.SetFloat("Vertical", moveAmount ,0.4f,delta); } void HandleLockOnAnimations(Vector3 moveDir) { Vector3 relativeDir = transform.InverseTransformDirection(moveDir); float h = relativeDir.x; float v = relativeDir.z; anim.SetFloat("Vertical", v, 0.2f, delta); anim.SetFloat("Horizontal", h, 0.2f, delta); } public bool OnGround() { bool r = false; Vector3 origin = transform.position + (Vector3.up * toGround); Vector3 dir = -Vector3.up; float dis = toGround + 0.3f; RaycastHit hit; if(Physics.Raycast(origin,dir,out hit,dis)) { r = true; Vector3 targetPosition = hit.point; transform.position = targetPosition; } return r; } } } I've been stuck on this for too long, any help will be highly appreciated
    • By Tomtheseadog
      Hey guys,
      I'm having a little trouble with my point light. My light is working but the light source moves when I move my camera. I've been trying all week to fix it but at my wits end. Maybe I haven't converted it to the proper space.
      **VERTEX SHADER**
      in vec3 positions;
      in vec2 texCoords;
      in vec3 normals;
      out vec2 pass_texCoords;
      out vec3 mvVertexNormal;
      out vec3 mvVertexPosition;
      uniform mat4 projectionMatrix;
      uniform mat4 modelViewMatrix;
      uniform mat4 normalMatrix;
      void main()
      {
      pass_texCoords = texCoords;
      vec4 mvPos = modelViewMatrix * vec4(positions, 1.0);
      mvVertexNormal = mat3(normalMatrix) * normals;
      mvVertexPosition = vec3(modelViewMatrix * vec4(positions, 1.0));
      gl_Position = projectionMatrix * mvPos;
      }
      **FRAGMENT SHADER**
      in vec2 pass_texCoords;
      in vec3 mvVertexPosition;
      in vec3 mvVertexNormal;
      out vec4 out_colour;
      struct Material
      {
          int hasNormalMap;
          int hasTexture;
          vec3 diffuse;
          vec3 ambient;
          vec3 specular;
          float reflectivity;
      };
      struct PointLight
      {
          vec3 position;
          vec3 colour;
          float intensity;
      };    
      uniform sampler2D our_texture;
      uniform Material material;
      uniform vec3 ambientLight;
      uniform float specularPower;
      uniform PointLight pointLight;
      uniform vec3 viewer_position;
      vec4 calculateLight(PointLight light, Material material, vec3 position, vec3 normal)
      {
      // AMBIENT
      vec3 ambient = ambientLight * light.colour;
      // DIFFUSE
      vec3 norm = normalize(normal);
      vec3 lightDir = normalize(light.position - position);
      float diff = max(dot(norm, lightDir), 0.0);
      vec3 diffuse = diff * light.colour;  
      // SPECULAR
      vec3 viewDir = normalize(viewer_position - position);
      vec3 reflectDir = reflect(-lightDir, norm);
      float spec = pow(max(dot(viewDir, reflectDir), 0.0), 32);
      vec3 specular = specularPower * spec * light.colour;
      vec3 result = (ambient + diffuse + specular);
      return vec4(result, 1.0);
      }
      void main()
      {
      vec4 lightResult = calculateLight(pointLight, material, mvVertexPosition, mvVertexNormal);
      out_colour = texture(our_texture, pass_texCoords) * lightResult;
      }
       
      The light source is coming from the cube in the red circle. Even the first picture the light isnt directly under the cube. If I don't move my camera and have the cube light source move around automatically the the light will stay with it. It's only if I move the camera that I get problems. The second picture i've moved my camera to the left and the light is moving with me and moving away from the cube light source.


    • By INTwindwolf
      THE PROJECT

      INT is a 3D Sci-fi RPG with a strong emphasis on story, role playing, and innovative RPG features such as randomized companions. The focus is on the journey through a war-torn world with fast-paced combat against hordes of enemies. The player must accomplish quests like a traditional RPG, complete objectives, and meet lively crew members who will aid in the player's survival. Throughout the game you can side and complete missions through criminal cartels, and the two major combatants, the UCE and ACP, of the Interstellar Civil War.
      Please note that all of our current positions are remote work. You will not be required to travel.
      For more information about us, follow the links listed below.
      INT Official website
      IndieDB page
      Also follow social media platforms for the latest news regarding our projects.
      Facebook
      Twitter
       
      TALENTS NEEDED
      3D Animator
      3D Character Modeler
      3D Environment Modeler
      Unity Engine Programmer
       
      REVENUE-SHARE
      The project is marching increasingly closer to be ready for our crowd-funding campaign. Being an Indie team we do not have the creative restrictions often imposed by publishers or other third parties. We are extremely conscientious of our work and continuously uphold a high level of quality throughout our project.
      We are unable to offer wages or per-item payments at this time. However revenue-sharing from crowd-funding is offered to team members who contribute 15-20 hours per week to company projects, as well as maintain constant communication and adhere to deadlines. Your understanding is dearly appreciated.
       
      TO APPLY
      Please send your Cover Letter, CV, Portfolio (if applicable), and other relevant documents/information to this email: JohnHR@int-game.net
      Thank you for your time! Please feel free to contact me via the email provided should you have any questions or are interested to apply for this position. We look forward to hearing from you!
      John Shen
      HR Lead
      Starboard Games LLC
    • By horror_man
      Hello, I'm currently searching for additional talented and passionate members for our team that's creating a small horror game.
       
      About the game: The game would be a small sci-fi/post-apocalyptic survival horror 3D game with FPS (First person shooter) mechanics and an original setting and story based in a book (which I'm writing) scene, where a group of prisoners are left behind in an abandoned underground facility. It would play similar to Dead Space combined with Penumbra and SCP: Secret Laboratory, with the option of playing solo or multiplayer.
       
      Engine that'd be used to create the game: Unity
       
      About me: I'm a music composer with 4 years of experience and I'm fairly new in this game development world, and I'm currently leading the team that'd be creating this beautiful and horrifying game. I decided that making the book which I'm writing into a game would be really cool, and I got more motivated about doing so some time ago when I got a bunch of expensive Unity assets for a very low price. However, I researched about how to do things right in game development so I reduced the scope of it as much as I could so that's why this game is really based in a scene of the book and not the entire thing. Also I'm currently learning how to use Unity and learning how to program.
       
      Our team right now consists of: Me (Game Designer, Creator, Music Composer, Writer), 3 3D Modelers, 3 Game Programmers, 1 Sound Effect Designer, 1 Concept Artist, 1 3D Animator and 1 Community Manager.
       
      Who am I looking for: We are looking for a talented, passionate and experienced 3D Environment Modeler who is able to create high poly realistic tunnels, rooms, props, in other words, small closed environments and is able to also texture them with a sci-fi/horror vibe.
      Right now the game is in mid-early development and you can see more information about it and follow our progress in our game jolt page here: https://gamejolt.com/games/devilspunishment/391190 . We expect to finish some sort of prototype in 2-3 months from now.
       
      This is a contract rev-share position
       
      If you are interested in joining, contributing or have questions about the project then let's talk. You can message me in Discord: world_creator#9524
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!