Katt's Arrow - official devlog thread

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

Bluefeather42
Red Slime
Posts: 87
Joined: Fri Jan 13, 2023 1:13 am

Katt's Arrow - official devlog thread

Post by Bluefeather42 »

EDIT: First of all...I have been remiss in not saying thanks to kylekrack for open sourcing the scripts to Charbile's Hatful Adventure and to James, TMC and whoever else for the Line of Sight and Fire Projectile scripts. Without that, this project wouldn't exist.

For a long, long time, I've had an idea for a "planet-hopping outer space bowhunting sim RPG" thing where you play as Lucian Katt, an aspiring "old derelict bowhunter" who goes from planet to planet hunting dangerous game and battling poachers, monsters, mutants, pirates, and other assorted soreheads. I've been hemming and hawing about it for years and can't really decide on a more goofy, cartoonish direction (as seen in the graphics thread) or a more "realistic" one with a human protagonist.

Anyway, I think I'll need to go all-custom. Or mostly custom. I think the biggest component will be the encounter system - what you "encounter" depends on the time of day, the weather, creature population, etc. I'd also like to do a custom battle system, although that I haven't really worked out yet.

No seriously I started wanting to make an RPG but I blacked out and when I woke up I had the following sketch
Image
and had the Line-of-Sight script on the wiki added to my plotscript file

Basically this is my Unreal Engine project from a few years ago, brought back as a tile-based stealth slow-shooter thing. OHR probably isn't the sane choice, but I intensely dislike the other engines I've tried, and this idea will not leave.
Last edited by Bluefeather42 on Fri Feb 14, 2025 2:31 am, edited 4 times in total.
Bluefeather42
Red Slime
Posts: 87
Joined: Fri Jan 13, 2023 1:13 am

Re: Katt's Arrow - official devlog thread

Post by Bluefeather42 »

So far I have:
The player character walkabout - one "normal", one for minor stealth, one for completely in stealth
a basic wandering around monster
The basic line-of-sight-script working
a test map

I am currently working on:
A Zone-and timer-based Stealth system. I.e. if you stand in a shadowed area for a second or two, Lucian's sprite turns into a dark silhouette. Stand a little longer, and he goes transparent except for his eyes.
Image
If Lucian moves or shoots, he'll blow his cover, so to speak.
God willing, Different creatures will have different levels of awareness. Some you'll need to be fully "stealthed" or be out of their Line of sight entirely. Others are a bit more forgiving. I would also like to add abilities that allow him to not lose his stealth status while moving.

As soon as I get the stealth working with the LOS, I'll be tweaking the zones so that the creatures don't clip into trees and such.
To work on later:
-Projectiles, collisions, and damage. The basic projectile script already sort of works, though I took out the "arc" part of it, but I need to make an "on keypress" script for the player's shooting as well as allow creatures to shoot, or use melee attacks. I think those will just be collision-based, nothing fancy. Creatures also need an "alarmed" status that reduces the damage they take - i.e, if they haven't spotted Lucian, they'll take full damage. If they have, they'll take (significantly) less damage.
-Different creatures, with different speeds, sizes, and toughness.
-Randomly spawning creatures when the map is entered.
-Camera movement. I'd like to stick with the default resolution, but with the default camera, you can easily blunder into a creature. I'd like to allow the player to move the camera somewhat in whichever direction.
-A "dash" ability for Lucian to allow him some chance to escape. Obviously, this'll ruin his stealth, but at that point it's already ruined.

To work on even later
-Actual maps.
-More planets to wander around, and the space travel system I AM NOT MAKING SPACE BATTLES DON'T EVEN ASK
-The Hot Coffee minigame
-Free energy
-Figuring out why we drive on parkways and park on driveways
-Battlescripting
Bluefeather42
Red Slime
Posts: 87
Joined: Fri Jan 13, 2023 1:13 am

Re: Katt's Arrow - official devlog thread

Post by Bluefeather42 »

Still *Kind Of* debating the "Realistic" option. It has its merits.

Not much done this weekend. I did Pseudocode the "Stealth Loop" that should run whenever Lucian's in the field, so to speak, to try and work the logic out

EDIT EDIT:

After spending about three hours fiddling with the scripts, I realized my original plan, which involves "levels" of stealth, one where he's shadowed and the other where his sprite turns transparent, is probably too complicated to plotscript. Instead, I'm going to check whether he's in shadow and moving, and have two skills he can learn - one allows him to maintain stealth while moving, and another that allows him to go into stealth even on open ground while he's not moving. If that makes any sense. I think I'm just going to use the transparent sprite in either case.
With also using solid objects to block LOS, I think this will be fine.

When I get the stealth worked out, then I have to work on the shooting mechanics. Blech.
Bluefeather42
Red Slime
Posts: 87
Joined: Fri Jan 13, 2023 1:13 am

Re: Katt's Arrow - official devlog thread

Post by Bluefeather42 »

Minor update: adding a simple “…&& stealth < 1” to the LOS script made stealth more or less fully functional.

Now I believe I will make a map and play around with it before starting the projectiles.

I will also have to make bigger trees and other map features. When I started my tileset I planned for a JRPG it wasn’t a big deal but now that NPCs that are at least twice Lucian’s size will be roaming the maps clipping will be an issue. Also a forest of trees all roughly three feet high is silly.
Bluefeather42
Red Slime
Posts: 87
Joined: Fri Jan 13, 2023 1:13 am

Re: Katt's Arrow - official devlog thread

Post by Bluefeather42 »

Worked on the tilesets some. Made the trees bigger, and I need some waterfalls so after an hour I have...two tiles. Still, better than nothing.

I also have a map roughed out on paper of the first location, which will be a wildlife management area on a relatively civilized world. Now, at least, when I draw it in engine, the trees will be appropriately massive and give lots of nice, friendly shadows for Lucian to hide in. Along with some really...unfriendly...shadows...

Image

Image

Does anybody have a better way to post these images than imgur? I'm thinking of starting a substack for these devlogs. Or trying videos again.
Bluefeather42
Red Slime
Posts: 87
Joined: Fri Jan 13, 2023 1:13 am

Re: Katt's Arrow - official devlog thread

Post by Bluefeather42 »

Working on shooting. Currently my "keypress handler" script is called by the autorun Main Loop script but I'm not sure if that will cause problems down the road. I know it'll take some work getting the arrow scripts to work with the "On Keypress" script trigger for the map (because of wait commands in the script), so I'm debating between the two. Also I need some sort of animation for shooting the arrow. Obviously.
Image

Yes, the arrow is bigger than Lucian. Once again, still debating whether cartoonish is the route I want to go here.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7711
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Re: Katt's Arrow - official devlog thread

Post by Bob the Hamster »

That is a beautiful spear :v:

If you want to keep it if and cartoonist, but to still have it read like an arrow, consider having a big bow appear and disappear.

Also if you have an always-running main loop, then yes I think it is okay to keep your key handling in there. Just remember you can't have "wait" commands in the key handler, and it is okay if you want to handle everything in the main loop. That's a valid pattern.
Bluefeather42
Red Slime
Posts: 87
Joined: Fri Jan 13, 2023 1:13 am

Re: Katt's Arrow - official devlog thread

Post by Bluefeather42 »

Bob the Hamster wrote: Sun Feb 02, 2025 4:49 pm That is a beautiful spear :v:
Heh. In New Guinea they use points so large they don't even bother with fletchings. Image
the 20x20 arrow sprite looked too much like a crossbow bolt so I went 30x30. Wanted it to be a little bit detailed with feathers and taper.
If you want to keep it if and cartoonist, but to still have it read like an arrow, consider having a big bow appear and disappear.
Good point (pun not intended). I do have a very quick draw-loose animation, I just haven't really implemented it yet.
Also if you have an always-running main loop, then yes I think it is okay to keep your key handling in there. Just remember you can't have "wait" commands in the key handler, and it is okay if you want to handle everything in the main loop. That's a valid pattern.
That's good to know! The main loop seems to be handling everything so I'll stick with that for now. Thanks for the help!

Next, I work on preventing Lucian from moving while shooting because he's not a YouTuber (and I don't want to animate it, sue me) and briefly losing his stealth status when he does shoot.
Bluefeather42
Red Slime
Posts: 87
Joined: Fri Jan 13, 2023 1:13 am

Re: Katt's Arrow - official devlog thread

Post by Bluefeather42 »

After having played around with timers and spent way more of my day than I'd care to admit thinking about it (I'm sure my coworkers thought I was constipated) I've come to the conclusion that I'll have to rewrite my stealth system, at least if I want to go with this whole shadow-light thing.
Currently, I use a global variable labeled "stealth", which is from 0 (not stealthy at all) to 3 (completely stealthy, sprite turns transparent).

The thought experiment that led me to working on this idea began with a Daggerfall/Morrowind-like stealth system, with the player's stealth skill added to a random number (modified by things like lighting and movement) compared to a creature's stealth stat or whatever - moving and shooting would drastically reduce stealth, standing still, and standing still while in a shadowy zone would drastically increase it.

I think I'll have to do something like that, minus the "roll". Constantly check for the zone Lucian's in and whether or not he's moving (and how fast) and just have the "in shadow" be an effect in a separate script.

Back to the drawing board!
Bluefeather42
Red Slime
Posts: 87
Joined: Fri Jan 13, 2023 1:13 am

Re: Katt's Arrow - official devlog thread

Post by Bluefeather42 »

Alright, so the new version of my stealth system is pretty much functional. It's still very binary...trinary? Is that a word? Anyway, Lucian's default "stealth" rating/score/stat is 10. Currently, moving gives a -10 penalty. Shooting also gives -10 when the "fire arrow1" script is called. I'm not entirely sure how long that lasts, but it is working - verified by calling a text box. Stealth shouldn't be able to go below 0, since I added a line to reset it to 10 if it does.

If Lucian is standing still on open ground, stealth is 10. There won't be much of anything that won't spot him.
If Lucian is in shadow, standing still, stealth jumps up to 20. Lucian is somewhat concealed, if he doesn't move.
If he's in deeper shadows, say, in dense tree cover, stealth hits 30. He's very well concealed, and remains somewhat concealed even if he moves around or shoots.

I also need to add either a run button or a "dash" ability to allow Lucian to escape if things go south. Either way, it'll knock stealth down to 0.

Next, it'll be the shooting animations. For real this time!

Anyway, if anybody wants to see the stealth scripts:

Code: Select all

script, lucianloop, begin
#try to set it up where Lucian cannot shoot while moving.  Look into global "each step" script and Timers instead of Wait commands
	stealthloop

end

script, main loop, begin
	variable (thismap)
	thismap := current map

	while (thismap == current map) do (
		keypresshandler
		lucianloop
		shadowdudes loop
	)

end

script, stealthloop, begin

variable(shadow)
#ambient light is temporary, setting here to make the equation work
ambientlight := 0
############# Set opacity of Lucian's sprite based on lighting zone ###################################################

	if (read zone (2, hero X, hero Y)) then (
		set opacity (LKsprite, 50)
		shadow := 10
	) else if (read zone (3, hero X, hero Y)) then (
		set opacity (LKsprite, 25)
		shadow := 20
	) else (
		set opacity (LKsprite, 100)
		shadow := 0
	)

######################## Update stealth #############################################################################

	switch (hero is walking) do (
		case(true) do (
			stealth := (BaseStealth + shadow + ambientlight -- 20)
		) 
		case(false) do ( 
			stealth := (BaseStealth + shadow + ambientlight)
		)
	)

	if (stealth <= 0) then (
		stealth := 10
	)

end

Bluefeather42
Red Slime
Posts: 87
Joined: Fri Jan 13, 2023 1:13 am

Re: Katt's Arrow - official devlog thread

Post by Bluefeather42 »

Another brief update: I have reduced my "wait" commands to a single one in my Main Loop and have replaced them with timers. I ran into a bug in the projectile scripts where it either a) caused a crash due to an errant "wait" in the LOS scripts or B) created an arrow every tick that the shoot button was held.
I solved it with one single line of code:

Code: Select all

set timer(4, 1, 1, @fire arrow1)
in my keypress handler script.

I don't know whether to feel smart or dumb.

EDIT: of course, now I have a bug where the arrows aren't DESPAWNING if the shoot button is pressed quick enough, but hopefully adjusting the timer fixes that.
Bluefeather42
Red Slime
Posts: 87
Joined: Fri Jan 13, 2023 1:13 am

Re: Katt's Arrow - official devlog thread

Post by Bluefeather42 »

First of all...I have been remiss in not saying thanks to kylekrack for open sourcing the scripts to Charbile's Hatful Adventure and to James and whoever else for the Line of Sight and Fire Projectile scripts. Without that, this project wouldn't exist.

And, as promised, I have a very rudimentary shooting animation that is very quick but syncs up really well. It's just a 20X20 sprite so I'm not too concerned. I also nixed the idea of not letting Lucian shoot while moving. I can't figure out how to get it to work and it doesn't seem worth it since it basically knocks Stealth down to 0.
Image
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7711
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Re: Katt's Arrow - official devlog thread

Post by Bob the Hamster »

Nice. I like the bow frame. Just that little bit does make the arrow look more arrowish :)
Bluefeather42
Red Slime
Posts: 87
Joined: Fri Jan 13, 2023 1:13 am

Re: Katt's Arrow - official devlog thread

Post by Bluefeather42 »

Bob the Hamster wrote: Fri Feb 14, 2025 11:24 am Nice. I like the bow frame. Just that little bit does make the arrow look more arrowish :)
Thanks! I guess now that with Jocoserious I need to go through and add extra frames to my walkabouts!

Been focusing on other stuff for the past week, but the next thing to fiddle with is projectile collisions. So, from what I've seen, I need to make a layer for the hitboxes, then in the update projectile script loop through all the slices on that layer to see if it hits anything, or is there a better way?
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7711
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Re: Katt's Arrow - official devlog thread

Post by Bob the Hamster »

Yes, you can do that with the "slice collide" command, or with the "find colliding slice" command. Both can do the job, just use whichever is easiest to understand.
Post Reply