Back to Roots: Triggers, Other Updates
Fearyourself has posted a pair of updates to the Back to Roots website detailing the progress he has made over the last week or so with his Ultima-inspired game engine.
In the first post, he talks about his progress on triggers, as well as another feature he has begun implementing:
Before I go to the main point of the entry, I?ve added in the handling of fountains (before I just had the rendering of them), now you can go drink from them and either get healed, cured, poisonned, or wounded.
I?ve been working on finishing the dungeons for U5 and have been working on the fact that daemons can summon other daemons. Now, if you remember the original game, this required a type of fade in of the new daemons and I implemented something that would look like that.
Of course, the original trigger mechanism is automatic and you don?t see a fade in, I?ve put one in now just to show how it works. I think it probably looks better than just automatically applying the trigger information.
Naturally, he released a video — two, in fact — showing his progress off:
In his most recent update, Fearyourself also noted that he had fixed a bug allowing corpses to be picked up, in addition to implementing entry into the Underworld and the requirement to know the correct Word of Power to enter a dungeon with.
And of course, there’s a video showing all that off:
As usual, Fearyourself continues to make excellent progress on Back to Roots, and it sounds like he will have all of Ultima 5 supported in it very soon!
Mad new features. The fountains are the best (though the fade effect is awesome, especially applied to the dungeon while turning). I hope fixing the bug meant you are now allowed to pick corpses up. Reminds me of the Thief article just posted…
The triggers where you can chain interactions together allow for a great number of gameplay possibilities. Lighting torches still on walls, flipping switches, pulling levers, pushing chairs and firing cannons.
What if Ultima had a fountain surrounded by daemons summoning other daemons that when draught upon bestowed constant gold coins out of your body. Your health would go down fast as your skin was shredded, but the coins that came out would be real. Maybe you could trick enemies into drinking from it by putting food in the water and watching from a distance. Kidding, of course, but that would be cool.
Damn good progress.
Thanks for the comments both :-). The fountains, I have to find a way to do the animations because I have no real idea on how to do it with the original graphics.
However, the fade in was done especially for two reasons : because I didn’t yet tackle the whole screen trembling animation yet, and the summoning of deamons normally makes the deamons appear pixel per pixel, something that seems difficult to simulate under OpenGL.
But, there still is a lot to be done but progress is being made 😉
Ps: Sadly no: corpses can no longer be picked up to follow Ultima 5’s way of doing it 😉
Sounds like translating pixel-based bitmap operations to regular OpenGL calls is either slow or a pain in the ass to implement. The alpha fade is extremely cool, but now I’m going crazy trying to think of how to do pixel operations on an OpenGL texture. There has to be a way to treat it like a 2D array, just reading and writing values to it. I don’t know what it is, but it must exist.
One thing I’m considering doing is instead of drawing a bunch of separate quads/tiles I’d create a grid out of triangle strips and individually texture it with the tile textures. If the elevations were different I think you’d manually have to calculate the surface normals, but for flat terrain it should work normally. It might speed up rendering since it’s less operations. Any thoughts?
Is animating fountains a matter of color-cycling? That would also be interesting to implement in OpenGL. I remember the days of programming for a 256 color palette. I’d set the perfect ranges in Deluxe Paint II and go to town in QuickBASIC 4.5.
On Ultima, I always liked the sounds of the campfire and the water fountains. Can you play sound effects like .wav or .ogg yet? I’m using SDL and it handles it okay but I haven’t fully researched the possibilities yet.
Yeah, the one solution I thought of using is a stencil buffer that you can hit with a type of mask. But I haven’t yet exactly looked at how it works. Since my fade in solution works and was done for the triggers but seems cool for the other uses, I’m happy with it :-). When I get time, I’ll look into it.
For the fountains, it’s the same issue as the pixel apparitions. The basic image in the files is the fountain entirely with drops around the place, and I think I just need to remove some drops from frame to frame. But it isn’t so easy in OpenGL.
I haven’t started working on the sound system. Most likely it will use the SDL_mixer library though OpenAL might be a good system to use as well.
Jc
I’m happy with the alpha fade as well.
It’s funny how graphics operations that I used to take for granted are like rebuilding the pyramids in modern graphics APIs. I wonder what kinds of hoops you’d have to jump through to do color cycling or per-pixel operations on a texture in OpenGL. You’d think it’d be easy.
Interesting about the fountain source image. They must have hard-coded alpha masking pixels to animate just one image. I need to break out Ultima V on dosbox to see what it looks like again (though I’ll probably die before finding a fountain in a dungeon).
The SDL library is pretty rudimentary from my experience with its implementation in GAMBAS. I don’t think you can even control stereo pan. I looked up OpenAL and it looks WAY more advanced. 3D sound and recording capabilities… Nice.