Devlog 1 - Player Movement Basics - A slow start
Devlog 1 - Player Movement Basics
The initial stages of development were slow, to say the least. A late start coupled with several holdups has left me with less to present in this devlog than I would want, but I have learned a lot in the process, nonetheless.
The first step was to create some simple artwork to visualise what I was doing. Using Adobe Illustrator, I made some fairly straightforward vector art of the different sections of the player character, which at this point is limited to the torso, head, and left and right pauldrons. The head and pauldrons are both children to the torso object, allowing independent movements for them. Later, once the weapons system is being implemented, the pauldrons will move with respect to the arm positions, which is why they are separate from the torso.
I initially used vector art solely because it is fast to do, with the final art pass moving towards more standard blocky pixel art, but after receiving positive feedback for the vector artwork, I have decided to go with high quality vector artwork instead.
I still want to utilise normal mapping for nicer shadows however, so I will be looking into using Rhinoceros 7 to translate the vector artwork directly into 3D objects, which I can (in theory) get high resolution normal maps from.
Early testing shows that 2D art that looks good in 2D doesn’t actually make much sense in 3D a lot of the time, and doing the 3D model was mainly time-consuming handwork and doesn’t match up very well to the 2D vector art. Further figuring out of the process will be required, if I am to use this method for all the artwork, it needs to be more efficient to do than this.
Using directional lights, I managed to get a semi-decent looking normal map out of it
Below is how it looks in Blender. One of the colour axes is inverted, so it looks a bit off, but that isn’t too hard to fix.
Coming back to movement, in the current implementation, the player’s movement is force-based, with the intention being to add a sense of weight to the player’s character. This was fairly straightforward, the only troubles arising from figuring out how to set the maximum speed for the player. The final code simply switches from adding a direct force to adding a force adjusted to be less forceful once the maximum speed is reached, because if you simply stop adding force upon reaching maximum speed, the direction becomes locked to wherever it was going regardless of control input.
I’ve also included a “shunt” button to help demonstrate both the player movement and the object physics.
In response to a request, I have added a toggleable mouse-bound movement mode (press E), which is based upon the position of the mouse rather than the world position. I’m hoping to be able to keep this throughout development, but if a later system doesn’t agree with it, I might have to abandon it.
Speaking of mouse movement, I’ve also implemented the mouse-look system for the character. The torso and head will constantly rotate to look at the mouse, and at different speeds too. The scripts for both the head and the torso are more or less the same, with a few extra catches on the head script to avoid the tendency for the head to twist in the opposite direction to the torso if the mouse is behind the character, primarily due to the different turn speeds leading in some cases to the head being closer to the mouse in one direction but the torso the other.
As it works now, I simply have so that if the players head is facing behind the torso, it will just be set to be at 90 degrees to whichever side. It isn’t perfect, due to the angular velocities fighting with the directions being set, but it will do for now. Setting angle limits on the hinge didn’t work, by the way. Most of the troubles from the rotation scripts were due to the confusing nature of angle representations, and battling with them for consistency. It works quite well for now though, but I plan to do some refining later on down the line.
At a few points, given that the head is attached to the torso with a hinge, I considered using the hinge motor to turn the head. I mainly avoided this because I already had the torso coded with the rotation script, and it worked fine upon being placed on the head object. Reworking the script to work with the hinge motor would have been a waste of time, and most likely inferior as well. The hinge is still used to keep the player’s head from floating away though.
For the sake of giving people something to play with, I’ve also added a bunch of barrel props and a simple white box, mainly to show how the physics objects will feel and react to the player.
Due to my late start on the project, I missed out on the actual playtesting session, however feedback provided afterwards was helpful, and suggestions have been implemented into this build.
That’s all for the first week. My next goal is to implement the player’s legs, which will rotate and animate differently in accordance with the player’s movement direction. After that, I will begin work on the level design. Thanks
Files
Get Dark Testament
Dark Testament
A dark game that is dark
Status | In development |
Author | GMunro |
Genre | Action |
Tags | Dungeon Crawler, Hack and Slash, Roguelite |
More posts
- Devlog 6 - Updates/planned updates based upon Testing SessionOct 17, 2021
- Documentation - AT5Oct 17, 2021
- Devlog 5 - User Interface / PolishOct 10, 2021
- Devlog 4 - Presentation/GraphicsOct 03, 2021
- Devlog 3 - Interactions, Puzzles, and Enemies (Or lack thereof)Sep 27, 2021
- Devlog 2 - Level BlockingSep 21, 2021
- ConceptAug 29, 2021
Leave a comment
Log in with itch.io to leave a comment.