Single player character?

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Single player character?

Post by Gambit37 »

I'm curious to know if a dungeon designer could tweak DSB to only allow a single champion?

Can all collisions/attacks be adjusted to work for a character that effectively fills all 4 subtiles?

Can the party marching order widget be disabled/ignored?

What other things might need to be considered/adjusted to make this work, if it's possible?
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Single player character?

Post by Sophia »

The main thing that makes it not possible right now is the code in the engine checks the marching order and only calls sys_party_col if a missile is in a position where it can actually hit someone. Including some way of disabling the marching order would be a good idea too. So I'd have to change those things, but they are not actually all that difficult changes.

However, there are also a lot of changes that would have to be made on the Lua level. Anything that queries the party's marching order and tries to respond to it would have to be modified. The code that automatically pivots a given party member in response to a monster attack from the side or the back would need to be changed to do something sensible as well: maybe your view would just automatically rotate, though that could get disorienting. Of course, the part of the monster AI that selects targets would need some significant tweaks, too.

So it's possible but it would be a lot of work.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Single player character?

Post by Gambit37 »

OK, thanks for the explanation. I'm not actively working on anything like that, but I think it might be fun to make single character games in DSB. I previously had ideas for adapting gamebooks and those only really work with one character. One for the future... 😉
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Single player character?

Post by Gambit37 »

I was thinking about this again and wondered: Rather than updating all the engine code, could I hack it in Lua by pre-populating four characters in the party, and updating their stats/food levels etc. to match the first character? Probably just some simple changes to sys_update()?

For the player facing, I could update any functions that call dsb_set_pfacing() so that all four champions are faced in the same direction as the one that was just changed. As for the player throwing missiles, I can live with the missiles always coming from the same side.

I would hide the marching order widget so that the player can't fiddle around with that either.

That way, the engine doesn't need to change and I can design the UI to only show something that represents one character.

This would be for an adventure where combat is a minimal part of the experience, so enemy encounters would be few and far between and heavily controlled by scripting/dungeon mechanics anyway. And there's no magic, so I don't need to worry about spells either.

I'm sure there are things I've not considered here, but in theory maybe it could work...?
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Single player character?

Post by Sophia »

It'll be a bit hacky but it could possibly work. I guess you could disable the marching order widget but randomly change the marching order around in code so missiles would come from either side.

The main remaining issue will be in the targeting of monsters' melee attacks, I think.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Single player character?

Post by Gambit37 »

Can size 4 (full tile) monsters attack all party positions? If so, I could simply make all monsters full-tile and have one encounter per tile. Saves a lot of hacking and fits the narrative just fine.
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Single player character?

Post by Sophia »

Like any monster, they can't attack the back row (unless they are specifically allowed to do that, like materializers) if there is a party member in front. This means there will be some issues if you use "dummy" party members, which will exist regardless of whether you make all monsters size 4 or not.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Single player character?

Post by Gambit37 »

OK, thanks. What about if there's only 1 party member?
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Single player character?

Post by Sophia »

If there's only 1 party member then we're basically back to the issues from earlier in the thread. Unless you want spin dodging to be a thing, the code in the engine that handles collisions would have to be modified. That's not that hard to do but it would require modifications to the supporting Lua as well.

If we want to tackle this, it would help if we can make a reasonably exhaustive list of everything that needs to be changed. Some of these things have to be changed in the engine and some can be changed in Lua, so don't worry if you don't know how to do some particular thing on the list, I'm just trying to think of everything so I have it in one place. So far what comes to mind are:

:arrow: Spin dodging presumably needs to not work. Missiles should be able to collide with the lone party member wherever.
:arrow: Monsters attacking from the sides or back should do... something else. If the marching order widget is disabled then changing facing automatically could annoy the player.
:arrow: Melee attacks should never give a "CAN'T REACH" complaint.
:arrow: Missiles would always come from one side. This is a minor visual thing but it might be worth looking at.

Anything I missed?
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Single player character?

Post by Gambit37 »

Cool, thanks, I'll need to have a think about the requirements. That said, this is such a long way off, it's for an idea I have for the dungeon *after* the one I'm currently working on. Which could be months (if not years) away based on my slow progress. I was just trying to think about it now and ask the questions so that when I came to it, I'd have some notes/ideas to look back on to work from. It's really not important anytime soon so please don't worry about it. 8)
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Single player character?

Post by Gambit37 »

Heh, just an FYI that I've thought of a better scenario which can make use of the standard 4 character slots, so I won't need any of the single character changes. Watch this space (eventually!)
Post Reply