Questions for DarkGod (or others)

If you have a module that you'd like comments on or would like to know how to create your very own module, post here

Moderator: Moderator

Message
Author
Grey
Loremaster
Posts: 3517
Joined: Thu Sep 23, 2010 10:18 pm
Location: London, England
Contact:

Re: Questions for DarkGod (or others)

#16 Post by Grey »

Managed to get it working as I wanted by changing the .frag to:

float grey = gl_FragColor.r*0+gl_FragColor.g*0.5+gl_FragColor.b*0.5;

This means the red doesn't get desaturated at all, whilst the other colours get completely muted. Combined with a blur shader it looks awesome :D Thanks, DarkGod!
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Questions for DarkGod (or others)

#17 Post by darkgod »

Screenshot! :)
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

faustgeist
Halfling
Posts: 98
Joined: Wed Mar 02, 2011 6:59 pm

Re: Questions for DarkGod (or others)

#18 Post by faustgeist »

Whoa, DG,

Did we just get a sneak-peek screen shot of beta38?

Whatever it was, I LIKE IT! :)

~Robin

Grey
Loremaster
Posts: 3517
Joined: Thu Sep 23, 2010 10:18 pm
Location: London, England
Contact:

Re: Questions for DarkGod (or others)

#19 Post by Grey »

darkgod wrote:Screenshot! :)
Hmm, well, I've only got it going in Run from the Shadow, so it doesn't look all that impressive. Imagine a future game with lots of blood splatter and this effect though ;)
Attachments
shadow-colour.png
shadow-colour.png (29.5 KiB) Viewed 5653 times
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes

bricks
Sher'Tul
Posts: 1262
Joined: Mon Jun 13, 2011 4:10 pm

Re: Questions for DarkGod (or others)

#20 Post by bricks »

BLOOD! BLOOD FOR THE BLOOD GOD!

Is it possible to blur locally? It'd be cool if distance objects were very blurry, but those close-up were in sharp relief (especially if the effect scaled with "rage," which I'm guessing is the intent).
Sorry about all the parentheses (sometimes I like to clarify things).

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Questions for DarkGod (or others)

#21 Post by darkgod »

Possible yes, veyr much harder, yes too
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

eliotn
Wyrmic
Posts: 244
Joined: Mon Sep 26, 2011 1:49 pm

Re: Questions for DarkGod (or others)

#22 Post by eliotn »

Is it possible to delay an ability, meaning you cast it, and sometime later, it activates?

bricks
Sher'Tul
Posts: 1262
Joined: Mon Jun 13, 2011 4:10 pm

Re: Questions for DarkGod (or others)

#23 Post by bricks »

I think someone was actually looking into that a while back. A simple method could use timed effects and activate when the timer runs out, while a more sophisticated approach could rewrite the talents code to handle a fourth talent type (in addition to activated, sustained, and passive). What's trickier is deciding how you want the talent to function - can the player cancel it? can the player choose to activate it any time after it is charged, or does it have to be used on that turn? do enemy attacks (stun-style effects) interrupt "casting"? Another method - turn it into a spiked sustained talent effect, but give it a timer that must count down before the talent will do anything after being spiked.
Sorry about all the parentheses (sometimes I like to clarify things).

Goblinz
Module Developer
Posts: 163
Joined: Tue Dec 14, 2010 3:23 am
Location: Where I need to be

Re: Questions for DarkGod (or others)

#24 Post by Goblinz »

you could also use timed effects to do this. If people want I can make a few example talents for this
Those who complain are just Volunteering to fix the problem

<yufra> every vault designer should ask themselves exactly that: What Would Grey Do?

Grey
Loremaster
Posts: 3517
Joined: Thu Sep 23, 2010 10:18 pm
Location: London, England
Contact:

Re: Questions for DarkGod (or others)

#25 Post by Grey »

Rod of Recall or Angolwen Teleport from ToME4 are the obvious examples of delayed action spells.
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes

Grey
Loremaster
Posts: 3517
Joined: Thu Sep 23, 2010 10:18 pm
Location: London, England
Contact:

Re: Questions for DarkGod (or others)

#26 Post by Grey »

Some more Qs, if anyone can help:

1. Can I change the colour of the main character mid-game? It doesn't seem so, strangely... I can set the initial values, but further attempts to change it fail.

2. How to make enemies invisible to the player (so no targeting square) except under certain conditions?

3. How to measure the distance between two actors? I could write a little Pythagorean script, but I'm guessing there's something in the engine already?

4. How do I turn on the T-Engine wall-sliding feature?

5. For tiger eye: How do I turn on the hex mode? I'm sure you've told me before, but I forget now...
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Questions for DarkGod (or others)

#27 Post by yufra »

Grey wrote: 1. Can I change the colour of the main character mid-game? It doesn't seem so, strangely... I can set the initial values, but further attempts to change it fail.
You can, but need to force the C code to update its "mo" (short for map object I believe). I dug up some code that I used way back in beta18 for Viral Resistance in ASCII mode. Add this to your Player class' "act" function (and tweak the actual RGB values of course):

Code: Select all

self.color_r = 50
self.color_g = 50
self.color_b = 50
if self._mo then
    self._mo:invalidate()
    game.level.map:updateMap(self.x, self.y)
end
2. How to make enemies invisible to the player (so no targeting square) except under certain conditions?
It is a bit late, but I think that all you need to do is tweak the "canSee" function on your Player class. If this returns false then you should not be able to see the NPC.
3. How to measure the distance between two actors? I could write a little Pythagorean script, but I'm guessing there's something in the engine already?
The "core.fov.dist" function is what you are looking for.
5. For tiger eye: How do I turn on the hex mode? I'm sure you've told me before, but I forget now...
Put the following code in your "load.lua":

Code: Select all

core.fov.set_algorithm("hex")
<DarkGod> lets say it's intended

tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

Re: Questions for DarkGod (or others)

#28 Post by tiger_eye »

Grey wrote:4. How do I turn on the T-Engine wall-sliding feature?
Put the following in your load.lua (or wherever):

Code: Select all

config.settings.player_slide = true
and call "tx, ty = self:tryPlayerSlide(x, y)" as appropriate (you may want to check out the player's move function in tome).
darkgod wrote:OMFG tiger eye you are my hero!

Grey
Loremaster
Posts: 3517
Joined: Thu Sep 23, 2010 10:18 pm
Location: London, England
Contact:

Re: Questions for DarkGod (or others)

#29 Post by Grey »

Cool, got all that working easily. Now, how about that smooth shading stuff that looked good with the hex mode?

Edit: Hrm, and for some reason it now takes quite a while to load the module...
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes

tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

Re: Questions for DarkGod (or others)

#30 Post by tiger_eye »

Grey wrote:Cool, got all that working easily. Now, how about that smooth shading stuff that looked good with the hex mode?
I think that is from "map._map:drawSeensTexture". See the "displayMap" function in tome's "Game.lua" (line 1000).
darkgod wrote:OMFG tiger eye you are my hero!

Post Reply