Training Livestream - Getting Started with Gameplay Programming - July 27 - Live from Epic HQ

The code part of limiting a camera’s movement to a “room” can be fairly simple, if the room is a convex hull. (Convex hulls are shapes where any two points inside the shape can be connected by a straight line that doesn’t go outside the shape.) The interesting question about this is how your designers want to set up the boundaries that define the rooms, and how you harvest this data, or if you detect it dynamically. Some ways might include placing special Components or Actors that register themselves with the local GameState, or just placing special geometry above the map that the camera detects with collision tests. I’d love to get back to this, and maybe do a little more camera work in a future stream, but the code from this stream should help to get started, and then the concepts I’ve just described might put you a step forward. If you want to do distinct rooms, it might be a good idea to spawn a second camera in the new room (when moving from one room to another), configure it with anything that room requires (FOV settings or any other room-specific custom details) and then set that to be your view target, possibly with a blend time if you prefer a panning transition (like Super Metroid) to a jump-cut (like in Shadow Complex). You can delete the original camera when the transition is complete, or just save it so you can move it to a new room the next time you need to transition. I hope this gives you some ideas. But above all, as long as you’re making sure each part of your game feels good, you’re on a path to making an enjoyable experience.

Hi, Just wanted to say I really like this stream. I never realised the impact of the camera until now…
you mentioned a questionaire for feedback at the end of the stream. can you post the link in this thread as well?

I don’t now if it would be a lot af extra work. But as I just started using c++ I liked that this stream covers that. But I think it would be very usefull to have a blueprint version of this project for people who aren’t ready too jump into c++. For this project since it is only one class I think it would be possible to have a blueprint version download…

Since al the things discussed in the video stay true you would reach new commers as wel as more experienced people at the same time…

Glad you liked it! Yes, camera is really important, and it’s hard to notice when a camera is doing a good job. There’s a term - “The Three Cs” - that is used to describe Camera, Character, and Controls. Those three things together describe most of how your game feels, in terms of interaction. This isn’t to downplay audio, graphics, story, or any other aspect, but as a gameplay programmer, which Epic has described as “a designer who can code”, 3C is the area where you’ll have the strongest influence and impact, so it’s critical to study. No promises, but I’m hoping to do another stream like this about Controls. Character might be a little too in-depth without art support, but I’m hopeful that we can do the Controls part.

If you’re starting on C++, you could check the C++ streams Lauren Ridge and I did a little while ago. There were two of them, and we covered a lot of early-learning stumbling blocks. I’d also say that the exercise of converting this C++ code to BP could actually be a good learning exercise, since you’ll have to comb through it pretty thoroughly to make the conversion. Once you know it that well, you can probably make your own modifications. For example, one easy mod would be to use CurveFloat assets instead of typing in distance and speed-multiplier values in the camera speed limiter struct. Making little modifications like that is a great way to start learning how programming works. I may have said this before, but I learned C in 1995 when the Wolfenstein 3D source code was released, by studying and making small modifications to that game. Code was much smaller back then, but small projects like our templates, or like this camera code, can make a nice learning environment.

The important thing is to keep working at it and challenging yourself. Good luck!

Hi Richard,

Your live trainings have helped fill the C++ gap for me (dev with a Unity background). The one place where there’s still a massive gap, which I’ve struggled with for months, which remains after I’ve absorbed all the docs and tutorials available, and which is roadblocking me as a developer, is:

adding a network-ready custom character movement ability in C++

Please consider doing a live training on this as there is a massive documentation gap and there’s high potential demand for it. It would give Unreal devs the ability to allow their characters to teleport, sprint, triple-jump, etc. in a networked environment. As it stands, developers only have 2 options: limit the characters in your multiplayer games to the movement abilities present in the Character class or inherit from the Pawn class and forego the anti-hack, movement prediction, etc. present in the Character class. There is this: https://wiki.unrealengine.com/Author…acter_Movement , but it’s sorely lacking (I and other devs have struggled with it for months) and it’s all that’s available on this. This also cannot be done in Blueprints.

Great, glad to hear it!

That does sound like a good idea. I want to do streams to introduce the other two of the “3Cs” (character and controls), so this might be good to slip into the “character” one. However, this might also be good to do as an offline tutorial, either a written one or a video series. I can’t promise when we’ll get to this, but it is something I’d like to do.