To make hunger and woundedness more notable...

Out-of-character discussion forum for players of Cantr II to discuss new ideas for the development of the Cantr II game.

Moderators: Public Relations Department, Players Department, Programming Department, Game Mechanics (RD)

User avatar
Doodle_Jack
Posts: 235
Joined: Mon Nov 29, 2004 1:34 pm
Location: Netherlands (Tilburg)

Postby Doodle_Jack » Wed Sep 14, 2005 11:15 am

Jos Elkink wrote:But that means that the colour is calculated just once when you click on the events page - it's not updated while you're looking at it... that's what you mean, right?


Right. :wink:
User avatar
Jur Schagen
Administrator Emeritus
Posts: 507
Joined: Wed Apr 21, 2004 11:25 pm
Location: Amsterdam, Netherlands

Postby Jur Schagen » Wed Sep 14, 2005 11:43 am

What's wrong with the smileys of old? That used to show it not only to the char itself, but to anyone else as well... couldn't they be revived? Can't remember why they were removed... it was either server strain or the separating of hunger from health. If it was the latter, couldn't we just showing the lower one?

On a side note - shouldn't the hunger bar be visible to the rest of the world as well?
KEEPER: What is the air-speed velocity of an unladen swallow?
ARTHUR: What do you mean? An African or European swallow?
KEEPER: What? I...I don't know that! Auuuuuuuugh!

check out: www.myspace.com/fredlesshuh
User avatar
Nick
Posts: 3606
Joined: Tue Jul 15, 2003 8:27 pm
Location: Halifax, Canada

Postby Nick » Wed Sep 14, 2005 11:51 am

Don't too hastily whisk away our Cantr green... :-(

But I suppose at least, it would make up for our relic "smiley face" buttons.
User avatar
SekoETC
Posts: 15526
Joined: Wed May 05, 2004 11:07 am
Location: Finland
Contact:

Postby SekoETC » Wed Sep 14, 2005 12:27 pm

Jos Elkink wrote::?:
I think I misunderstand something. Do we mean by gradual that you actually see it change when you look at it, or just gradually more dark depending on your health, which means it changes slower than that you clock on the page?

What I mean is - it should be fairly simple to implement it in such a way that the background of the events list is coloured depending on your health / hunger. I quite like that idea. But that means that the colour is calculated just once when you click on the events page - it's not updated while you're looking at it... that's what you mean, right?

The colour should then depend on the health, but not linearly, so that it's only really visible when it gets bad. Some kind of exponential function. If anyone really wants to help this being implemented (mind you: no decision has been made yet), give me some formula how to calculate the colour :) ...

Jos


Yes, the change wouldn't happen in real time but only when the page is opened/refreshed. The colour would depend on the level of woundedness/hunger, but since people tend to tweak with their eating and in some places healing food is not available and you may be a bit wounded for years without really suffering from it, you shouldn't suffer a terrible visual effect when the character is still mostly in good shape.

And I think it can be linear, just put there some exeptions:

Code: Select all

if (hunger>50) faintScript();
if (healthloss>50) woundsScript();

function woundsScript()
{
redValue=(healthloss-49)*5;
greenValue=68-((healthloss-49)*4);

/*some code here to change these values into hexadecimal, I don't
know how to do it in a simple way.
*/

document.bgColor="#" + redHex + greenHex + blueHex;
}

Normal Cantr green is #004400, 44hex is 68dec.

I have seen a JavaScript that changed the background colour in real time but I really don't think that's needed here and besides, it would slow down the loading a lot.

Edit: And what I noticed is correct capitalization matters a lot. here I've been cursing for hours when all the time I'd written bgcolor instead of bgColor. Grr...
Not-so-sad panda
User avatar
SekoETC
Posts: 15526
Joined: Wed May 05, 2004 11:07 am
Location: Finland
Contact:

Postby SekoETC » Wed Sep 14, 2005 12:52 pm

Code: Select all

<html><head>
<script language="JavaScript">
var backcolor, red=0, green=44, blue=0, redHex="00", greenHex="44", blueHex="00";

function hit()
{
red=red+2;
if (red>99) red=99;

if (green>0) green=green-1;

if (blue>0) blue=blue-1;

process();
}

function faint()
{
if (red<=blue) red=red+2;
if (red>99) red=99;

if (green<=blue) green=green+2;
if (green>99) green=99;

blue=blue+2;
if (blue>99) blue=99;

process();
}

function process()
{
if (red<10) redHex = "0" + red
else redHex=red;

if (green<10) greenHex = "0" + green
else greenHex=green;

if (blue<10) blueHex = "0" + blue
else blueHex=blue;

backcolor="#" + redHex + greenHex + blueHex;

document.bgColor = backcolor;
document.form1.box.value=backcolor;
}

</script>
</head>

<form name="form1">
<body BGCOLOR="#004400" text="white">
<input type="button" value="Click here to make the background redder" onClick="hit()">
<p>
<input type="button" value="Click here to make the background grayer" onClick="faint()">
<p>
Current background color value: <input type="text" name="box" lenght=8>
</form>
</body>
</html>


Annnd wheeeeeee! :D (Copy into notepad, save as *.html, remember the quotation marks and start clicking.)

Edit: forgot a couple of variables.

Edit 2: Now this has the gray part too!
Last edited by SekoETC on Wed Sep 14, 2005 3:56 pm, edited 2 times in total.
Not-so-sad panda
User avatar
Nick
Posts: 3606
Joined: Tue Jul 15, 2003 8:27 pm
Location: Halifax, Canada

Postby Nick » Wed Sep 14, 2005 12:53 pm

50? It would only be cool if it was executed no matter how damaged you were.

10% damage wouldnt create a drastic stage, but it should be noticeable.
User avatar
SekoETC
Posts: 15526
Joined: Wed May 05, 2004 11:07 am
Location: Finland
Contact:

Postby SekoETC » Wed Sep 14, 2005 1:14 pm

Yeah ok, now that I've been testing the colours in the beginning aren't screaming enough to make people bounce on the walls, so it might as well start from 0.
Not-so-sad panda
User avatar
KVZ
Players Dept. Member
Posts: 5318
Joined: Sun Sep 28, 2003 7:04 am
Location: NightCity.2088.EXE
Contact:

Postby KVZ » Wed Sep 14, 2005 11:34 pm

Jur Schagen wrote:What's wrong with the smileys of old? That used to show it not only to the char itself, but to anyone else as well... couldn't they be revived? Can't remember why they were removed... it was either server strain or the separating of hunger from health. If it was the latter, couldn't we just showing the lower one?

On a side note - shouldn't the hunger bar be visible to the rest of the world as well?


I like old smileys! Please give them back to us :) And hunger bar visible to the other chars would be nice too... Someone will know when to feed some of his hungry and sleeping friends.
Corruption born inside. I'm part of dark side / A.F.K. / We'll steal your dreams and control your minds
https://x.com/MindKiLLERx2088
Image
User avatar
wichita
Administrator Emeritus
Posts: 4427
Joined: Mon Jan 17, 2005 6:46 pm
Location: Suomessa!

Postby wichita » Thu Sep 15, 2005 1:21 am

I like the idea. It would spice things up.
"Y-O-U! It's just two extra letters! Come on, people! This is the internet, not a barn!" --Kid President
User avatar
A Neo Irony
Posts: 114
Joined: Tue Aug 23, 2005 7:23 am
Location: Right behind you.

Postby A Neo Irony » Thu Sep 15, 2005 1:59 am

I think it ought to show something to the other characters that your person is so hurt or so hungry. For example:

1297-You see Note Theif bleeding.

1385-You hear Sleeper's stomach growl.

You could show those messages once a day, a bit like it does when people sneeze.
User avatar
Octavio
Posts: 154
Joined: Sat Sep 24, 2005 9:27 am
Location: Portugal

Postby Octavio » Sat Mar 25, 2006 4:14 pm

I love this idea! And I also think it should be a straight colour change from 0% to 100%.
And implementing this would be simple enough.
Carpe Diem
User avatar
Hellzon
Posts: 437
Joined: Mon Dec 12, 2005 11:35 pm
Location: Sweden, 12 points

Postby Hellzon » Sat Mar 25, 2006 4:27 pm

Hmm, I was worried that the page would get hard to read, but Seko demonstrated that it might not.

Still, I'm against it on principle. We have visually impaired players, I'd like to hear some of their opinions before I change my mind.

Anyway, I expanded on Seko's sample file. The Java code is hers, I just added a picture and some white and orange text, so we can get a better view of what the finished product might look like. It's here:

http://home.student.uu.se/anhe8197/cantr.html

/Hellzon
[21:35] Sunni: no peeing on people in chat!
tiddy ogg
Posts: 1402
Joined: Sun Oct 02, 2005 8:53 pm
Location: Southampton, England
Contact:

Postby tiddy ogg » Sat Mar 25, 2006 7:55 pm

Well, as a text-speech user, it shouldn't make any difference to me, and manyy VI people set their own colours, so againn it shouldn't matter... but of course there may be some who don't change the colours.
Neither of the first 2 groups would notice the change, thus wouldn't be alerted by it, not that that matters imho, but it is those with slight impairment that might find it impossible.
AngelSpice
Posts: 475
Joined: Sun Dec 12, 2004 5:28 am

Postby AngelSpice » Sat Mar 25, 2006 8:03 pm

I didn't notice any changes in the background color. Was I supposed to?
User avatar
SekoETC
Posts: 15526
Joined: Wed May 05, 2004 11:07 am
Location: Finland
Contact:

Postby SekoETC » Sat Mar 25, 2006 8:12 pm

You were, upon clicking the button. It sure works alright for me but be noted, in the beginning the changes are rather subtle. Do the numbers in the box change? If not, JavaScript might be disabled in your browser. For the first button 5 clicks creates a notable change, while for the second it takes 15 clicks. (It's about the missing hexadecimal numbers A through F, which creates a bigger jump between 9 and 0.)
Not-so-sad panda

Return to “Suggestions”

Who is online

Users browsing this forum: No registered users and 1 guest