Far Afield

A place to house devlogs of member’s projects.
User avatar
Sirocco
Site Admin
Posts: 734
Joined: Fri Feb 12, 2021 10:25 pm
Location: Outer Demoscenia
Contact:

Re: Far Afield

Post by Sirocco »

carra wrote: Wed Aug 03, 2022 7:58 am Well given how busy you have been I'd say you have earned your vacation. So be sure to rest well and work on your games only if you feel like it ;)
Believe me, I did :D
I ended up sinking ~75 hours into Xenoblade 3, and spent about 24 hours working on improving my house. Priorities ;)

Any way, I got the weird hitching taken care of. Apparently, when you use the SetTargetFPS() function, Raylib seems to set up an emulated vsync timer that it triggers the refresh with. At least, that's what I surmise given the behavior under Windows. I haven't taken a look under the hood to see exactly what's going on there -- I'm not 100% interested in the why. The fluctuations in frame timing were enough to get the scrolling to jitter every few seconds. It was pretty annoying.

I took that out of the equation, and used the FLAG_VSYNC_HINT at window initialization. This gave me a rock-solid 60 FPS with no hitching, stuttering, or weirdness whatsoever. I'm glad to have that behind me, but I'm also wishing this lib had a more comprehensive set of tutorials, or a good user manual. The cheat sheet will get you most of the way, but once something technical comes up, you gotta Google it and hope for the best, or be prepared to dive into the lib and see what the hell is going on :|
User avatar
Sirocco
Site Admin
Posts: 734
Joined: Fri Feb 12, 2021 10:25 pm
Location: Outer Demoscenia
Contact:

Re: Far Afield

Post by Sirocco »

I started converting Far Afield from SDL to Raylib last night. It's boring work, but I've done enough experimenting where I don't foresee anything too troublesome. Getting started is always the hardest part for me.
User avatar
Sirocco
Site Admin
Posts: 734
Joined: Fri Feb 12, 2021 10:25 pm
Location: Outer Demoscenia
Contact:

Re: Far Afield

Post by Sirocco »

Conversion is going well. Nothing really good to show off, that I haven't posted before ;) That's the down-side to converting... heh.
Got the compass, horizon, day/night cycling back in, along with my timers.
User avatar
Sirocco
Site Admin
Posts: 734
Joined: Fri Feb 12, 2021 10:25 pm
Location: Outer Demoscenia
Contact:

Re: Far Afield

Post by Sirocco »

Conversion is going great. I'm anticipating something major that'll block me for about a week, because when things go this well there's bound to be something amiss :P

Image

I got the main screen UI converted last night, and cleaned up some things I missed with the day/night cycling. Today I hope to continue working on the UI, getting the map drawn, and maybe shops as well. Map generation is going to be a big job, and I'm considering saving that for next weekend. I don't see any reason to rush that when I have historical data to work with for now.

It's also becoming apparent that I'll need to tweak some sprites to make them show up better under the CRT effect. This poor guy loses all the detail on his leg armor, for example.
User avatar
carra
Posts: 153
Joined: Thu May 13, 2021 10:39 am

Re: Far Afield

Post by carra »

That CRT filter looks sexy :)
User avatar
Sirocco
Site Admin
Posts: 734
Joined: Fri Feb 12, 2021 10:25 pm
Location: Outer Demoscenia
Contact:

Re: Far Afield

Post by Sirocco »

Thanks. And it's remarkably simple :) I think I scored a win by not trying to go overboard: just some simple RGB separation, scanlines, and a bit of bloom.
User avatar
Sirocco
Site Admin
Posts: 734
Joined: Fri Feb 12, 2021 10:25 pm
Location: Outer Demoscenia
Contact:

Re: Far Afield

Post by Sirocco »

Got some great work done this weekend... mostly boring stuff on the back-end of the project. I got SFXR files loaded into Raylib as sound samples, cleaned up a ton of inefficiency with the tile mapping/data, and as a bonus got springs animated so their influence on the area waxes and wanes as you interact with them. Raylib also has a much better sound solution out-of-the-box, compared to SDL. I would imagine that ~99% of people will be happy with the basic kit. Music is treated just like a sound effect, only streaming in chunks, so all the same controls apply, and it's dead simple to do pauses, cross-fades, and other rote actions.

It's a slog at this point, but I'm making steady progress and it's already paying off. \o/
User avatar
Sirocco
Site Admin
Posts: 734
Joined: Fri Feb 12, 2021 10:25 pm
Location: Outer Demoscenia
Contact:

Re: Far Afield

Post by Sirocco »

Cleanup is proceeding well, if somewhat slowly. I've been lazy recently, while I recharge my batteries from a long slog at work. I've also been cleaning up older vestiges of my framework's Allegro and SDL pasts, converting many of the calculations over to 0-1f normalized values, instead of the older 0-255 stuff. Along with that, I've revisited many of my math routines, and have been rechecking them for accuracy, and optimizing stuff that was obviously slow.

The Raylib conversion isn't a *huge* difference, size-wise. Worse case scenario, the routines are the same size. There have been some procedurally-heavy routines that have been trimmed to a third or quarter of their size, which is nice. The QTE routines are about a third their normal size. Raylib has a flexible DrawRing command that pretty much handles all the QTE effects.


Overall, I'm still excited to see how things have progressed, and it has given me an excuse to polish some of the game's rough bits along the way. More to come.
Attachments
Screenshot 2022-09-23 222859.png
Screenshot 2022-09-23 222859.png (181.11 KiB) Viewed 9851 times
User avatar
Sirocco
Site Admin
Posts: 734
Joined: Fri Feb 12, 2021 10:25 pm
Location: Outer Demoscenia
Contact:

Re: Far Afield

Post by Sirocco »

Just to remind myself, when projecting stuff in 3D, moving an object's Y coordinate doesn't automatically translate to clean vertical movement like it does in my 2D stuff :oops: I lost some time trying to ascertain why my explosions were drifting around the screen. Jeez. DUH.

Otherwise, I had a great day, and got a bunch of random stuff converted, cleaned up, and otherwise polished.
User avatar
carra
Posts: 153
Joined: Thu May 13, 2021 10:39 am

Re: Far Afield

Post by carra »

Well I don't know what the rombic effect is representing but it is looking quite cool, nice retro aesthetic! Pleased to see that you manage to stay on the project to evolve it with the little touches
Post Reply