Search Results
Searched for posts by vasiliy in all forums

Showing results 191 - 200 out of 431 total
Modify your search
Posted by vasiliy, Feb 6 at 2:29 am
i finally found the source of Eldritch Zombie. it was… interesting. Florea (exiled priestess of Silva in New Attnam) is not a config under `priest` class in k8I, she is a separate `exiledpriest` class. this is because she has more logic than the normal priest, and it is easier to have that code separated instead of clutter main priest class with it. Florea herself is `Config SILVA;`, but… the base `exiledpriest` config had neither `IsAbstract`, nor proper bitmap positions.

now, "zombie creator" is using original head for new zombie. as base config is not abstract, the creator is free to make a zombie out of it. but there is no proper body bitmap position, so the head defaults to `(0, 0)`. and we have a pair of legs there. voila, here's our Eldritch Zombie. base config also has no name set, and for some reason (prolly due to out-of-bounds access bug) the game was using a random name for such zombie. and it is quite rare too. so i've seen it several times, and each time it was something different. of course, i checked the corresponding classes time and time again, without any success — as there was nothing wrong with them.

i found it by accident, looking at "SecretKnowledge" lists. there was a priest with only legs, which looks suspiciosly like our E.Z. i had to add some debug dumps, but finally i found the culprit.
Posted by vasiliy, Feb 5 at 10:18 pm
deactivating mines is very useful.
1. get ring of searching.
2. deactivate some mines, take one with you.
3. oops, a werewolf. and you have a shitty equipment.
4. activate mine, throw to werewolf. he is no more.
5. profit.
6. kick booby-trapped door.
7. your other mines go BOOM. you are no more.
8. no more profit.
Posted by vasiliy, Feb 5 at 7:17 pm
yeah, books will be interesting. maybe even with proper pagination, why not. i believe they should be shown in an overlaid window, because reading a page takes time, and the player should be able to see what's going on around, and stop reading if Sherry, for example, wants join the party.
Posted by vasiliy, Feb 5 at 6:32 pm
yeah, it is quite easy to disarm a mine. the process fails mostly at the start of the game, when your Dex is low, but most mines are in GC, and you usually have enough Dex by that time to succeed most of the time. i am not really keen in balancing such things, so i simply took `(User->GetAttribute(DEXTERITY) < femath::LoopRoll(90, 1000))` code from beartrap. this is how "failed to arm" is determined there, and i used it as disarm check for all traps.

i wanted mines to be fairly easy to disarm, because sometimes they block some path which i want to take. if they're hard to disarm, then it is not really better than simply kicking them and hope for the best, and i feel that there should be some advantages to try and do better work using your hands.

also, "pressure off" mines might be "disarmed" by another means: leaving something heavy enough on them. (by the way, a mine won't blow up if your weight is less then 5kg too, this is in the code.) some people already suggested such change, it is somewhere in one of ideas thread.

and it's also not that easy to implement too, because there is no such event as "on leaving a square". currently, the character which is moved onto the square checks for anything "interesting" there. yet there is no easy-to-use code to perform such checks when the character moves away. and we should consider various types of movement — like teleporting, for example. it is doable, but may need changes in several places in the code.

it would be much better to have it coded another way: the square itself should react to "enter" and "leave" events, and the characters simply sending such events. this will allow to add arbitrary square effects without changing a lot of the code each time. actually, `character` class is doing too many things on its own, things that should be delegated to other entities. but that's how the game is written, alas.

one day i will prolly do it "the right way", but i'm not sure what the day it will be. also, this will make stealing code from vanilla harder.

but i still feel that throwing ideas so people could tell their opinions is important. because i sux at game design.
Posted by vasiliy, Feb 5 at 4:05 pm
wow. with people so willing to help with texts, i almost feel obliged to implement "history scrolls"! it would be a shame to waste such talents. so i'll definitely move this feature closer to the top of TODO list.

and thank you all for your support. that's why, i guess, even wild ideas should be made public — people actually may like them more than expected.


p.s.: i also found myself carrying several bear traps around now, because it is fun to arm it, and then throw to an enemy. it may miss, but it may hit too! (or may trap yourself when you try to arm it. even more fun.)


p.p.s.: and as we have the way to disarm mines… maybe we should change the mine to explode when you're moving away from it? not always, because it will make mines mostly not a threat. but sometimes it could be like this, and you'll actually be able to disarm it. like, say, 30% of mines could be "pressure off" kind.
Posted by vasiliy, Feb 5 at 2:15 pm
by the way, replaced all `RAND() % smth` expressions with proper `RAND_N(smth)`. as i am using multiplication instead of modulo, it is usually faster.

that is, for `RAND_N(42)` we can look at 32-bit random number as a fractional part of 64-bit fixed-point float, and at `N` (42) as normal integer. so we can multiply them to get full 64-bit fixed point number, and throw away fractional part — i.e. low 32 bits. as both numbers are less then 1 in this representation, we'll get our desired `[0..N)` range. and on most, if not all, current-day 32-bit CPUs we have 32x32->64 multiplication instruction. division is not guaranteed, though, and it is almost always slower than multiplication.

it doesn't matter much in terms of speed, of course, but why not? also, it is easier this way to replace bounded random number generation with uniform, for example. (because what we have with modulo or multiplication is biased; there is RAND_GOOD in femath to get unbiased bounded rn, but it is used only in several places, due to be slower than biased.)

tbh, we don't even need statistically good PRNG for IVAN, any LFSR will do as fine, but, again, why not?

i am also switched from PCG32 to Bob Jenkins' small PRNG. they both good, but i like Bob's one better, because it doesn't use LFSR, and hence doesn't require 64x64 multiplication.


p.s.: if all this sounds like some orcish speech to you, don't worry. most people (including me) don't know much about pseudorandom number generation anyway. we usually choose PRNG which we like most, and then just stick to our guns.
Posted by vasiliy, Feb 5 at 12:35 pm
there are even more unused sprites in various sheets. like photocamera, for example. and we have unused worldmap POI icons too. there is also something that looks like… heavily armored steam tank, i believe (it's hard to tell with IVAN palette, i need to draw it in-game to check).
Posted by vasiliy, Feb 5 at 7:08 am
also, for random encounters we prolly need some new unique monsters too. i'm mostly thinking about desert-themed ones: there definitely should be at least quicksand (not a monster, of course , and sandworms moving in the sand. tbh, i'd like to have totally unique mosters for encounters, to give the player some actual reason to not leave encounters immediately. preferably unique monsters with some unique traits, so playing random encounter level will require some change of tactics. i don't have anything more detailed on this yet, tho, just… random thoughts.

p.s.: btw, the car sprite we already have could be used for Fallout reference. of course, it doesn't look like Highwayman, but hey, this is another reality, we don't need to be precise to pull this joke.
Posted by vasiliy, Feb 5 at 6:57 am
yeah, considering that this will be a random encounder, and there's nothing much to do there actually, this is one of the places where appropriate music will Just Work, creating the atmosphere and mood. i tried to explain why k8I cannot play music, but it doesn't mean i don't want to have it at least in this particular place. (when i finally implement random encounters, thats it .
Posted by vasiliy, Feb 4 at 1:06 pm
sadly, k8I don't have a music player. mostly for two reasons: 1) adding it will require a sound system rewrite (not that hard, but i'm soooo lazy), and 2) we'll need to have a sound font for midi playback, and good sound fonts are HUGE (and not all of them are free).

one day i'll throw away SDL Mixer, and replace it with OpenAL and custom sound loaders, but it won't be soon. mostly because i prefer to listen some speed/power metal anyway, so i don't need in-game music that much.

p.s.: command console is SO useful… even with a limited set of commands. how could i live without it all this time?!