updates on development of my first game, code-named Spellsword. Solo dev losing sanity on this project during off-time. No proper experience or coding skills, all trial-and-error and ChatGPT
Don't wanna be here? Send us removal request.
Text
rolling d20 for whatever reason
I was making meshes for VFX and exported an icosahedron just in case I'd need it. I thought that applying physics to it would make a d20 die, and was wondering how to make it functional to pass integer values. So I did that. But why? i have absolutely no use for dice in my game. There are no rolls. Why did I make this?
This might be the worst solution. What are vertex normals? I don't know. I used empty objects with sphere colliders and scripts holding numeric values for each face. When die stops spinning, a raycast from directly above hits the upwards facing face and gets the integer from the script. Physics is basic RigidBody with specified rotation and force applied on key press.
3D model and texture are from Sketchfab
3 notes
·
View notes
Text
cool rings
really like these. I could use them for highlighting something
0 notes
Text
trails
just learned how to make trail effects like these
2 notes
·
View notes
Text
Splash damage!
After many reworks and bug fixes my damage system is in a working state! Ranged attack is fully reworked to apply damage not only to the immediate target but to adjacent enemies as well. This system uses OverlapSpheres to create a sphere collider at the location of raycast hit, then checks for enemies inside that radius and accesses their scripts containing damage event. When attack button is pressed, that event is triggered at intervals equal to specified attackSpeed variable.
Here, the blue sphere is the splash damage radius:
Really happy with the progress so far :)
3 notes
·
View notes
Text
Improved hands positioning
Likely not a final solution, but an improvement nonetheless.
Old position of hands was stiff and inflexible. The illusion of movement was made by camera being separate from player mesh and hands being lost off-screen with excessive rotation. Most importantly, shooting a spell beam down or up looked weird and broken.
New position makes hands follow camera with an offset to speed and/or angle. Either in sync or independently, but always orienting towards the centre of camera's frustum.
Old setup on top, new at bottom:
3 notes
·
View notes
Text
Fullscreen overlay effects
Today I learned about Fullscreen Shaders. Will use those for effect and status overlays such as healing, damage, dashing and some others.
It's a pleasantly simple setup with a UV>Length nodes for vignette effect tuned with Power and Multiply nodes. Then just some panning textures and HDR coloring for desired effect. Time>Sine can be used for pulsing effect.
How to trigger and implement the overlay? Don't know yet. Can't be hard.
Here's an idea for damaged state:
Can't add more videos, so screenshots then:
4 notes
·
View notes
Text
Progress with damage system
Quite a big breakthrough for my humble self! After watching a ton of vids on Events and Delegates in Unity I made a basic foundation for handling events like damaging enemies in a way that's modular and (hopefully) scalable. Before, I had an issue with damage being propagated to every copy of an enemy prefab on the map. That sucked, and I researched options of isolating affected enemies from the rest. What seemed like a good option was using Hash Sets - unordered lists of unique objects. Enemy intersects my hitbox and is added to the list. If it leaves the hitbox it is removed from the list. Upon attack only enemies in the list would receive damage. Here's preview of a counter working as intended - player stores number of affected cubes inside the hit radius. (In the console is a scrolling list of named cubes currently entering or exiting the list.)
Very cool! And also very wrong and unnecessary. The bugs this would eventually create are unfathomable. Didn't help me much, but I keep the hash idea for later. I suspected the issue was in assignment of an object to receive damage, not the hitbox, so I scrapped the HashSet idea. After some fiddling I found solution in slightly changing how damage is applied to the object. Turns out getting reference of affected object via player's attack script worked perfectly. I'm not sure why GetComponent feels like a bad thing, it's an irrational negative bias, but it works. Scan for instances of anything tagged as "enemy", assign it a temporary variable, and make it take damage via event stored in the enemy's script.

So it seems like it's fixed now (within confines of an empty testing scene). Now I can apply damage only to enemies affected by relevant hitboxes. With this I'll try adding it to my melee and ranged modes - slashing with sword and blasting spells. I've also added kill counter and sum of dealt damage to this prototype for fun:
I want to make a presentable prototype soon :)
2 notes
·
View notes
Text
Figured out radial textures!
For the longest time I couldn't understand how to scroll a texture from/towards the centre. I get the idea with using UV topology of a round mesh, but not the shader option with texture only. Turns out it is stupid simple. But so am I, so no wonder. It's just panning after Polar Coords and before the texture UV...
Combine two or more noise textures, offset speeds, add colour, and voila:
5 notes
·
View notes
Text
All hail the mighty and terrible Snot Skull!

3 notes
·
View notes
Text
Playing with shaders - silver sand
Either falling or blown by the wind. Several layers in parallax with added glitter ✨ One in-game location I have in mind is a black sand desert with silver glitter twinkling on the wind.


3 notes
·
View notes
Text
Playing with shaders - portal
I made this portal. Why? My game doesn't have portals... It's mostly UV distortions of various circles stacked on top of each other and a tile-able backdrop that's locked to screen view. I might add some portals now, this is looking fine so far. Will experiment with different shapes and some post-processing volumes when moving close to it.

6 notes
·
View notes
Text
Somebody suggested picking a tone of the game over message based on in-game criteria. That's a good idea! i am beyond confused as to how Tumblr comments work so I put thanks to whoever said that here. Cool idea dude, thanks! I'm thinking of adding a Revive option to get a second chance to fight on. So if this option is active, first death screen will have encouraging message, inspiring you to revive. But eventually you die a second time and the messages will be lamenting your downfall. Same if you decline the revive. Also, if there will be timer, some time-related messages could be shown when your clock runs out.
2 notes
·
View notes
Text
random end screen messages
I'm so getting ahead of myself. The core mechanics are in early drafts and I'm here thinking about stylisation of a game over screen. i need to focus and get back to basics.
I love randomisation. The illusion of pseudo-complexity is alluring to me. So for the end of the game i want to show a new message every time player dies. I made a script that takes over 70 texts from prepared list and shows one of them on the game over state. (will add various post-battle stats as well - enemies slain, total damage dealt, etc).
The tonal range is something, though...
61 notes
·
View notes
Text
Meet the protagonist
This bad boy is the current hero and saviour of human race. It's just an empty capsule shaped collider with a camera attached to an empty container for the head. Featuring:
Placeholder arms with a melee weapon and ranged spell. No animations yet. I want to make a bunch of animations for hands and randomise them for variety and pizzazz. two arms with spawn points for raycasts and future VFX.
Placeholder movement from a free template. Jumping doesn't work for some reason? Will rework with my own to adjust movement and add flying (and dashing?) ability.
Ranged attack ability - on LBM press draws a raycast over specified distance and checks for any objects tagged as "enemy". On hit triggers an event to apply damage to enemy unit and spawns a particle effect on impact point. Crosshair UI also changes from white to red to indicate attack availability.
Sphere collider to act as effective radius for pickups.


6 notes
·
View notes
Text
terrain!
Looked into terrain generation and doing it by hand seems like a chore.
There's this older software called L3DT that generates terrains. A lot of sliders and parameters for biomes and realistic pairings of natural landscape traits. Cool, but I only care about heightmaps. So I made a terrain, toggled edge wrapping for seamless edges, and exported it as RAW. In Unity I made a simple terrain and applied RAW map onto it. Voila, landscape generated!

Now, placing objects like rocks and whatnot procedurally is probably a complex task with math and logic, and I'm too stupid for that. In my head it could be as "simple" as finding random points on a mesh (facing upwards, to discard steep slopes and walls) and spawning objects on those points. Add a bit of randomised rotations and scale for more natural look, and that's it.
I made these dogshit placeholders from cubes to make a desert with rocks and giant ribs.

Guess what? ChatGPT spat out a script that does just that! With a bit of twiddling it now spawns prefabs in random amount from min/max range and randomises their scale and rotation. They spawn on runtime and are deleted upon exit. Amazing! It's probably a bad solution but I wouldn't know better as I'm not a programmer and have three brain cells, but this so far feels like magic to me.

And as those are static objects, Unity batches them for more efficient rendering. Neato. Will see how normal meshes will behave compared to these cubes.
A small problem is that some objects spawn above ground in air and some can overlap, but that's a problem for future me. For future me also: handle map edges in case I won't figure out generation of adjacent tiles and level streaming. Perhaps a single big tile with cliffs for edges, like a flying island?
2 notes
·
View notes
Text
Gameplay and narrative ideas rambling
I have too many ideas and too grand ambitions for this project for my own good. A playable bare-bones prototype would be enough, but my primate brain is hyperfocused on this game. I have no experience or much of relevant skills, but outlining some ideas shouldn't hurt. This blog is for me and future me (hello, random stranger, if you read this!) Before I change my mind a dozen times again, here's the basic gist of Spellsword as of now:
[ Gameplay ] Pretty much like any clone of Vampire Survivors (whatever the genre is. Project name in Unity is survivorslike) but in 3D and in first person view. Perhaps in third if it proves to be a better choice. You kill hordes of demons and level up until you fail and die. On each level up a random selection of skill advances is presented. You acquire skills that help you fight. Pretty basic stuff in this regard.
But, this type of game works by seeing the battlefield and manoeuvring between enemies. Easy in 2D, much harder in 3D with rotation and awareness limited to cone of vision. So, i need to see the arena from above. Jumping? Weird. Flying? Cool.
You get magic wings that will let you rise above and take in the situation, reposition, and attack from above. But you can't stay in the air indefinitely and cheese enemies. Wings will function like a jetpack - short bursts of mobility with fuel consumption management.
You get mana (or something) to power your magic wings by killing enemies in melee range with a blade. When airborne you switch to a ranged attack mode by shooting spells from your off-hand.
Ranged attacks are much more devastating and deal additional AoE damage. These kills give much experience but very little mana for wings.
Melee attacks give much mana but little experience. So the trick is balancing both options, upgrading skills by killing mobs, utilizing wings to clear large swathes of mobs, and not letting yourself be overwhelmed on the ground.
Attack modes will switch automatically depending on whether player is grounded or airborne. When grounded, spell hand will cast a shield to deflect or dampen damage. When airborne, blade will possibly deflect incoming projectiles, so the input stays simple and consistent in both modes. Maybe offhand attack in airborne will shoot player down like a meteorite to splash damage on impact?
Skill upgrades will help with damage in both close and long range, will unlock passive abilities, and perhaps some supers on a cooldown.
No money or currency is planned as drops from enemies, but that may change, if passive upgrade system would be added. Healing (?) can be done through pickups dropped by some enemies.
The world will be a relatively flat plane with some level geometry but the edges of the map are an open question. Map tiling and asset streaming are out of my skill range. Procedural endless generation sounds dope, but I might be limited to a large hand-crafted map.
[ Story ] drafts A dark fantasy setting in which a demonic invasion of horrid creatures descends upon the realm. From where? My ass, likely.
Option 1: You are responsible for the demons. Somehow. You're an aide to a god who orders you to fix your mess. He throws you down to earth and begrudgingly grants you powers as you advance. No respite in afterlife, you get resurrected time and time again.
Option 2: You were a mortal who died on the battlefield to said demons. The angered god raises you from the dead to repel them, as every man counts. He grants you powers. On every retry the new hero is another slain body from the battlefield.
Option 3: You were chosen by that god to prove your worth as warrior. Demonic swarm is your rite of passage. He grants you powers to see you grow in might. "Plot twist": once he was a mortal like you who levelled up enough to kill a god and took his place. Now he's looking for a worthy heir/opponent.
2 notes
·
View notes
Text
movement system
Before making this prototype I started another project and forked it into the current game.
Made a very simple 1st person movement system following YouTube tutorials. Avatar can walk, run, crouch, go up moderate slopes and slide them down, camera has head bobbing, and all of it is easily editable. Footstep sounds for various materials were implemented but then I broke something and it doesn't work anymore.
Then I began making interaction system for pressing buttons, opening doors and so on. HUD prompts worked, everything else didn't.
Later I tried adding some feature following YT tutorials again and broke everything so badly I had to remove the movement system.
For now i use a free template before I go back and make something better.
4 notes
·
View notes