Next Broadcast

Spend 40 hours on Gamedev creating swimming/boat mechanics

CmdrCookie GameDev DK30 Fall 2021 4 4

Description

My goal is to spend a total of 40 hours (roughly 10 hours a week) on Gamedev working towards implement swimming and boat sailing mechanics in UE4.

Recent Updates

CmdrCookie 4 years ago

4th week wrapping up and i’m clocking in around ~32 hours of work since the start of the DK30. A little bit under my goals but the end result of getting back into gamedev was successful.

One thing I’ve noticed this time around is my current schedule works better with fewer but longer sessions of gamedev rather than trying to squeeze in shorter sessions every day consistently, so I think that’s what I’ll plan for going forward.

In terms of what was actually accomplished, I was able to break past the initial goal of getting water, swimming, and sailing in. I’m closing out now with some placeholder models, vfx and audio for all of that, and some fishing mechanics too!

I’d like to plan to squeeze a bit more time on the fishing so that actual fish gets placed in your inventory when catching. That said, Halo just released so I might use that as my reward/excuse to take a break. For now I’ll call this another completed DK30!

CmdrCookie 4 years ago

3rd week down - not many updates recently but I’ve still been chipping away and hit another 9 hours of work for the week. That puts me at 25 hours total. I was a bit optimistic with a goal of 40 hours but the goal has been less important than just striving to dedicate more time towards gamedev which has been a success so far!

Since my last update, i’ve been working on fishing and now you can cast out a lure and reel it in! There’s no implementation for a fish 'biting" just yet, nor is there any actual fishing mechanic beyond just reeling in the line quickly.

Next I want to implement a little fx for a “bite” and then have a fish actually get caught in the player inventory if they reel in quick enough. I’ll leave any fancy fishing mechanics beyond that for later.

CmdrCookie 4 years ago

2nd week wrapped up and I’m a bit behind on hours put in but still doing good on the actual work! Week 1: 9 hours Week 2: 7 hours

Starting off strong in week 3 with 4 hours already though and the important thing is that my habit of working on my game has stuck now which was really the whole point of this DK30.

I previously was cleaning up the PlayerController and input with regards to sailing which is a bit cleaner now. Rather than continue tp run overkill on polish with sailing when I don’t have a solid target without testing more, I’m going to pivot into fishing! Here’s a fishing rod I modelled up this afternoon.

Luckily it fit in with my existing item/weapon blueprints which felt good that the early work paid off there. I stuck a simple animation pose for the fishing and its looking functional so far. I have some work to do to figure out the loop of aiming, casting, and reeling in next!

CmdrCookie 4 years ago

Realized a couple flaws on how I was processing movement input but its fixed now! With my new approach, i’ve also solved some hitching that would occur whenever the framerate became inconsistent.

Another thing I worked on was to fix the leaning animations when going backward vs forward. The left and right leaning also gets greater the faster the boat is sailing.

I think that’s the base of the boat sailing all wrapped up. I think i’ll be focusing on finishing up the way the playerController handles all of the extra inputs, like pause menus, when the player is in the boat vs just running around.

CmdrCookie 4 years ago

Today I solved a problem due to me not using traditional physics - collisions!

Previously, a collision would completely halt the boat and sort of get stuck on edges. It wasn’t great. Now though, there’s a cartoonish little bump back that should be solid once I spruce it up with a good sound effect and vfx.

CmdrCookie 4 years ago

I’ve fallen a bit behind on the hours I wanted to hit which may or may not have been related to Age of Empires 4 releasing this week.

Even still I made good progress on adding some psuedo-animations and reactions to sailing. So now the boat bobs up and down properly, and it’ll lean with some momentum based on the speed and rotation of the boat!

CmdrCookie 4 years ago

A couple hours in today working on the boat sailing. As I sadly expected, I encountered some issues with using all physics on the boat. I want the player to be able to jump/stand/move on the boat without actually piloting it, and eventually fish off of it. Using physics causes some undesired boat movement when the player moves while on the boat.

To avoid all that and since i’m not striving for realism here, i’ve disabled all the physics on the boat and am working/planning on replicating the movement of the boat through direct movement.

So far, not too bad. I have a little bit of bobbing up and down, and smooth sailing and rotations. I’m hoping to add 1. a bit of wiggle when the player jumps on the boat, 2. lean as the boat turns and sails. With both of those i’m hoping the boat looks good enough and not too stiff despite not using normal physics.

CmdrCookie 4 years ago

Ok managed to get in about 4 more hours since my last update which puts me at 9 hours so far. That’s a bit away from the 15 hours that I planned to hit for the first week with only one more day left. To show, here’s a fancy shmancy graph!!

GRAPH!

That said though, I cleaned up the boat sailing a bit and spent some time (too much?) on figuring out some water ripple effects but there’s still plenty I want to change there.

I think I’m going to make the decision to stay with completely flat water for now, rather than fancy waves, since it makes things just so much simpler when I can assume that the surface of the water isn’t changing. That’s the base implementation though! I think next I’ll focus on clean up around the boat sailing. Things like a proper sit animation when in the boat, and cleaning up how the player exits the boat.

CmdrCookie 4 years ago

3 hours today and making good progress! Modeled up a little boat and worked on getting the thing to ‘float’ with varying levels of success, as seen in the gif. Don’t mind the hyper g-forces there, thats just buoyancy doin’ its work.

So I’ve worked with physics things in the past and I’m concerned at how stable i’ll be able to get the boat. I’m not aiming for realistic water/buoyancy so my fall back is to lock the boat to the same plane as the water and just animating bobbing on the water/waves.

Next up is boat controls though. The current boat movement isn’t actually player controlled but really wonky physics interactions once the player enters. I think i’ll need to first properly ‘disable’ the player collision/physics when they enter the boat to ensure they aren’t interferring with things but then it should be onto controls inputs.

CmdrCookie 4 years ago

Day 1 is wrapping up and I have about 2 hours in the books. I don’t think I’ll manage an update each and every day but I made some good showable progress on the swimming! As for tracking time - For the past year, I’ve used a tool called Toggl to track time spent. It’s not the fanciest but its super simple to track time (which helps me stick with it) and lets me report on it later just for my own curiousity.

As for the project work though! The basic mechanics and animations are there to handle swimming in a volume of water. Plenty of edge cases to be cleaned up like preventing certain actions while swimming but we’ll deal with that later! It ain’t the prettiest but it’ll be perfect for what I need to test the boat mechanics while I build that part out.

Side note, I did get a bit side tracked with starting some debugging UI that I’ve been meaning to make that I’m hoping will help once I start working on the boat mechanics to track whats truly happening under the hood. I knew the swimming would be quick so now the brunt of the dk30 will be working on getting a boat to float and properly controlled.

CmdrCookie 4 years ago

Ok as per my usual with DK30s, I’m starting with a base game that I put out earlier this year. So this update will be a good reference for how far I make it by the end.

In the past month, I began refactoring my player character/controller to handle entering vehicles (i.e. like a boat!). That means currently we can run around just fine, and also ‘enter’ a vehicle to some degree, but there’s no logic for when we’re under water or for actually controlling a boat.

I think i’ll start with swimming first, as I’m hoping that’ll

  1. Simply be easier to implement
  2. Will help with testing the boat when i’m trying to enter/exit the boat out in the water.
CmdrCookie 4 years ago

As usual, I’m using the DK30 to ramp my habit back up since i’ve been out of working on any gamedev recently.

My target for this DK30 is twofold:

  1. Implement swimming like your average adventure game.

  1. Implement a boat that can be entered/sailed/exited. I’m using Wind Waker as my general reference here

My overall goal is for 40 hours over the course of the DK30 since I have some extra time off on the first half of this project that I’m hoping to get ahead with so we’ll start out optimistically!

Estimated Timeframe

Oct 19th - Nov 16th

Week 1 Goal

Aim towards roughly 15 hours of gamedev.

Week 2 Goal

Aim towards 10 - 15 hours of gamedev

Week 3 Goal

Aim towards 5-10 hours of gamedev

Week 4 Goal

Aim towards 5-10 hours of gamedev

Tags

  • Gamedev
  • UE4
  • Programming