Posts

Ammo, reloads and strange Unreal behaviour

 This last week I've been studying mostly on the ammo system, this involved the system to reload the gun if the player has ammo in the inventory, update the HUD of the player based on the ammo and the animation of the player reloading. I'm not a big fan of editing animations because I feel like sometimes it can be a bit repetitive but this weekend it was really satisfying, I realized that I'm now able to make simple edits on the animations by my own to match them to what I need. I'm pretty sure this new skill will help me to work faster because I used to spend a lot of time looking for the perfect animation for each situation and now, I can modify animations which are near to what I need. The ugly part of the week was an error which made me stay some hours debugging and checking my code line by line without finding an answer, I added some lines of code on a component class and after that my component was broken. After some debugging, I discovered that the component beca...

Gunplay and basics shaders

 The last couple of weeks I studied a lot of interesting things about Unreal, some of the most important were how to add a crosshair on player's HUD to show where are they aiming, how to ignore certain objects and components using channels and how to change the animations based on player's inputs. Another interesting thing that I learned was how to create a shader to "disintegrate" the characters when their life is equal or less than zero. I has worked a bit with shaders on Unity and now I know some basic things about them on Unreal and I have to say that shaders are amazing, you can add a lot of incredible effects using them, I would like to learn more about shaders to create some interesting effects. It was really exciting but at the same time it has been a bit hard because some of these things were totally new for me and I learned them applied to multiplayer games, that made it harder because besides of the regular difficulty of the topics I had to learn how to rep...

Unreal tools and a lot of bones

This week has been really productive, I have learned a lot about some Unreal tools I knew existed but I hadn't had time to studied appropiately, let's talk about them. The first one is "Retargeting animations", it consists of using similar skeletal meshes to reuse animations which were orginally created for a diffrent character. I hadn't worked with the skeletal meshes before because I was scared of all the bones and I thought it will be really hard to make even a small change, but understanding about the common chains you can create some interesting things. The second one are sockets, I have used sockets a few time before but only on single player games, so it was a greateful experience to learn how to use it on multiplayer games. This time I learned to used them to attach a weapon to a character hand and I learned how to dock them depending of the character's body, The last ones are replication and RPC's using only C++, as I talked on my other blogs, I...

Plugin for online games

This week I finished the first section of the new course I started last week. I have to admit it was a bit harder than other Unreal topics I studied and I had to investigate a lot about some concepts that were completely new to me. Altough it was hard it was what I wanted, I need to keep learning new things to be a better programmer. This first section allowed me to create a plugin that I can use in future games to create easily main menus to create sessions and join session using Steam. It's really easy to implement in other games because it works based on delegates wich makes the plugin completely independent of the game. Additionally, I kept studying about C++ topics and I learned about shared pointers, soft pointers and macros. Shared and soft pointers were the hardest part by far, I already knew some things about shared pointes because I learned about them on the course, but it was a bit scary and exciting to know that there's an entire world I have to explore to create op...

My first international session in Unreal and studying theory

 Last week I talked about the course I was taking and the things that I didn't like about it, following the advices I received from the professional programmer who talked with me last week I started a different course and it was a great decision!!!. I learned a lot about how Unreal Multiplayer works and how to create sessions to connect players using Steam, first I tested it connecting the game running on my laptop to the server on my desktop PC but I wanted to test it with someone who was in a different place. I talked with a colombian friend and he accepted to help me, so I sent him the game and it was really rewarding to see my friend's character walking with my character on the map. I'm currently studying a part of the course about menus and I want to add it to my fight game, the menus were one of the problems that I found when I tried to add the multiplayer mode in that game. I'm really excited about solving real problems using what I learned this week. I also cont...

Unreal multiplayer update, AI and back to basics

I continued the Unreal multiplayer course last week, although it has some interesting thing it doesn't explain in depth the things that I want to learn. I think there are some important topics about how replication works that the course should explain more in detail. I also continued with my project, I discovered that adding replication to the Hit component the client could see how the objects moves while they are grabbed. It's a progress but I still having two problems, some strange behaviour occurs if the character who is grabbing the object stops moving (in the client screen the object returns to the location where it was grabbed and if the character moves again the object return in front of the character ) and if client's character grabs an object it doesn't happen in the server. In the other hand, I added the elevator which will be activated putting the object grabbed on a trigger, it works pushing the object for now and I'm going to add a function for the obje...

Working on Unreal multiplayer

This week I've been working on my multiplayer game and I learned a lot about replication and the Physics Handle Component. First of all, I added some switches to activate the mechanisms of the platforms, but I got stucked because I didn't know a class just can replicate elements that ownes to it, so I can't replicate the platforms movement inside of the character's functions. I fixed it replicating the functions to activate the switches to let the movement replication to the corresponding classes.   I also added a mechanic to pick balls, I want one of the player to take a ball and put it on a platform wich will activate the mechanism which will allow the other player to cross to the next section. It worked using a Physics Handle Component, but some weird thing are happening when a player takes twice an object (the distance between the player and the object increments) and if the player takes a ball created by the balls spawner (the z position of the ball has a decrease)...