Urban Terror Forums: HappyDay - Viewing Profile - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement

HappyDay's Profile

HappyDay's Photo
Group:
Administrator
Active Posts:
357 (0.11 per day)
Most Active In:
Map / Funstuff Design (68 posts)
Joined:
01-March 10
Profile Views:
14,746
Last Active:
User is offline Today, 12:43 AM
Currently:
Offline

My Information

Member Title:
Programmer & Level Designer
Age:
Age Unknown
Gender:
Not Telling Not Telling

Contact Information

E-mail:
Private

Topics I've Started

  1. Learning Resources for Unreal Engine 4

    07 October 2018 - 02:41 PM

    Lately, there seems to be an increase in people interested in getting started with Unreal Engine 4. That's the engine Urban Terror 5: Resurgence is using. To help get you started working on creating your own custom map for the upcoming release, I've compiled a list of useful learning resources for you.

    Keep in mind that the Unreal Editor is a very complex game development tool with an extensive list of features, not just a simple level editor. The number of features can feel quite overwhelming at first but a big portion of those are things you will never need to use to create maps for Urban Terror.

    In general, the features you need are very well documented and there's a vast amount of learning resources for you to explore.

    1. Intro to the Editor
    https://www.youtube....e9Cx9wHoBB7rxFl
    The Intro to the Editor playlist on Epic Games' (the company behind UE4) youtube channel might be the very first thing you want to check out. It's a few years old, but still explains the basics of the Editor.

    2. Unreal Engine 4 Documentation
    https://docs.unrealengine.com/
    Lots of information is detailed in the official documentation. It's never a bad idea to read up on any particular feature or keyword you want to know more about. There's also a few quick start guides and small tutorials on there.

    3. Epic Games Launcher Learn Tab
    The Learn tab in the Epic Games Launcher has a few links to the quick start guides in the documentation I mentioned above. However, the real reason to check out the Learn tab is that it features a long list of example projects you can download and check out. All the assets in those projects are provided by Epic Games for you to use free of charge for any UE4 projects you are working on. That includes Urban Terror 5.

    Posted Image
    Of particular interest to anyone working on Urban Terror would be the following projects:
    • Content Examples
      This is something you definitely should check out. It's a project containing a bunch of demo levels showcasing a variety of features in the engine. You can directly see how things are put together and modify and play around with those features, instead of just reading about them in the documentation.
    • A few examples of really beautiful level design. This includes the Realistic Rendering, Sun Temple, Elemental Demo, Reflections and Particle Effects projects.
    • Shooter Game
      The Shooter Game project is a small but functional first-person shooter game with a nice looking map for you to check out. You can also use it as a base project for you to build your maps in, so you can easily jump into the game and run around for testing.

    4. Youtube
    https://www.youtube....pmentKit/videos
    The official Unreal Engine youtube channel features a huge amount of video content of the engine developers explaining and showcasing pretty much every feature in the engine. Every major UE4 update also gets its own video where the new features are briefly introduced.
    There's also a really big number of other people posting youtube videos explaining ue4 features and guiding you through tutorials of how to do certain things.

    5. UE4 Answerhub
    https://answers.unrealengine.com
    The Answerhub is a place where ue4 users ask questions, report bugs and help each other out to solve those issues. Every beginner question you could have has most likely already been asked and answered here.

    6. Google
    https://www.google.com/
    I feel this list would not be complete without mentioning that you can find the answer to almost any question you have regarding the engine by simply googling for it. You'll most likely end up on the Answerhub, the official documentation, youtube or the UE4 forums.

    7. Unreal Slackers Discord channel
    https://discordapp.com/invite/eNVW3Y2
    The Unreal Slackers Discord channel is a chat room where thousands of UE4 developers meet, help each other out, exchange knowledge and showcase the progress of their projects. If you cannot find an answer to an issue you are having by googling, this is the next place to ask. There are lots of helpful people in there to answer your questions.

    8. CMM Discord channel
    https://discordapp.com/invite/t48GHkA
    The Custom Map Makers discord channel is the community place where most Urban Terror level designers meet to help each other out and work on Urban Terror maps together as a team. This is a good place to ask about any urban terror specific mapping features.

    9. Unreal Engine forums
    https://forums.unrealengine.com/
    The official UE4 forums contain lots of information about UE4 as well, but I think you'll end up here when googling rather than by manually looking through the posts.

    10. Unreal Academy
    https://academy.unrealengine.com/
    This is yet another place that Epic Games has set up rather recently, which features video tutorials on a variety of subjects.
  2. I'm Looking at You - Crosshairs and Weapon Spread

    27 June 2018 - 05:10 PM

    I'm Looking at You - Crosshairs and Weapon Spread


    There are plenty of features I'm working on for the new Urban Terror, but not many are that interesting or visual. That, combined with the fact that writing blog posts takes quite a bit of time, is the reason why you see me so rarely post updates of the progress I'm doing on the game. Recently, I've implemented the crosshairs for Resurgence and that is something worth writing about.

    So, let's consider the situation in the game when shooting a bullet. The player has a marker in the middle of the screen - the crosshair, which he/she can point in any direction to help direct the bullets from the gun into the target (preferably the enemy's head). Since we want the game to require a bit more skill than to simply click when your crosshair is on a target, there is a feature called spread.

    The faster you move and the more shots you fire in quick succession, the larger the spread value. Instead of drawing a line from the player to where the center of the screen is, we calculate a cone and pick a random line inside that cone as the bullet's trajectory. The spread value is used as the angle of the cone. This is what a cone with 20° angle looks like.

    The idea is to control your movement and shooting patterns to control the randomness of your shots. Simply holding down your mouse button to fire as quickly as possible (called spray and praying) will increase the spread and the bullets will likely miss when the target is far away. Instead, you want to fire 2-3 bullets and wait a short time for the spread to decrease again before firing another couple of bullets. Crouching will decrease the spread making your shots more accurate, but at the same time making you a more or less stationary target.

    Interestingly enough, a cone from the player's view will end up being a circle with constant radius on the screen, no matter how long the cone is. That is because the view of the player is a frustum (a chopped off pyramid), starting at the same point. The radius of the circle on the screen is determined by the angle of the cone, the screen resolution and the field of view. With a bit of trigonometry involved to calculate the size of the crosshair on the screen, it is possible to have the crosshair exactly match the circle described by the spread cone. That means the crosshair can accurately show the player exactly in which area the shots are going to hit. This also ensures you can reliably compare the spread of the weapons by observing the crosshair.

    Many games use a single image file as crosshair, which gets scaled up or down. The problem with that approach is that the resolution of the texture determines how big you can scale it before it starts to look pixelated. Also, features like the width of a circle get wider with scale. More advanced crosshairs could use 5 images, one for the center and 4 for the sides, which get moved away from the center as the spread increases. That lessens the problems a bit, but you're limited in the shapes you can use. We chose a different approach. All our crosshairs are 100% procedurally generated, without any image files.

    I'll explain a bit how that works in Unreal Engine 4. The basic idea is to do math on the UV coordinates of the material to create geometric shapes. The U coordinates are a simple linear gradient from 0 to 1 in horizontal direction. The same is true for the V coordinates in vertical direction.

    Multiplying will scale the gradient, adding and subtracting will move the gradient. With other functions like clamping or taking the absolute, you can easily create a simple line.

    With more advanced math like using polar coordinates, it's possible to create all kinds of circular shapes. Combining a bunch of shapes can result in really interesting crosshairs. I've made extensive use of a library of complex functions I created about a year ago, which I'm also selling on the UE4 marketplace (shameless self-promotion detected). Check it out if you're interested in this sort of thing. The most awesome thing about this math-based approach is that all the values for scale, width, radius, length, color, opacity, number of lines, etc. can be adjusted in real time.

    Here's a preview of the 20 crosshairs I've created so far and how they scale with the spread value between 0 and 1.

    And here's a quick preview in-game.

    We haven't built a menu yet to select a crosshair or to adjust all the values. That's something I will do at some later point in time. Also note, there's a second feature called recoil, which moves your view a bit upwards when shooting, which I haven't mentioned here because it's unrelated to the crosshairs.

    Each weapon has 4 values related to spread, which we can adjust. The formula used to calculate the spread is different from Urban Terror 4, so we can't (and don't really want to) copy the values from the old game. We are going to change these parameters a lot during development, especially once we enter more extensive private and public testing.

    That's it. I hope you enjoyed reading this and maybe learned a thing or two in the process. I enjoyed working on this feature a lot and I'm really excited to have this in the game.

    And as always,
    Have a happy day! :)


    link link to original Blogs #55
Advertisement


Copyright © 1999-2019 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942