• entries
455
639
• views
421669

# Letters from the readers...

80 views

To start this entry we have a letter from a Mr J. Jeffers of Chiswick, Greater London. He writes;
Quote:
 I've not been keeping up with journals as much as I'd like, but I remember you writing about jobs a while back. You've got somewhere with it I take it?

Firstly, tsk at not reading journals, anyone would think you have a job or something [grin]

On the job front however, the job in question isn't any of the ones I've mentioned to you in the past.

The one with NaturalMotion is obviously a bust I'd have said, about a month without hearing anything tends to hint at that [wink]. The other one which was an outside possibility was with at the same company as a friend of mine in the TV subtitling business; how ever totally unshockingly nothing came of that [grin]

The job in question is with a friend of mine from my degree course. Only going to be a few mornings a week, however it keeps the bills paied and me in vodka so it works out perfectly from that point of view [smile].

For the record it takes me about 20mins to cycle from my house to his 'office' in a converted barn outside of town; that's with flatish tires on my bike as well, heh.

In other news, I was saying in the last entry about how default values were a problem, certainly where colours were concerned. Well, with that in mind I've gone back and made an adjustment to the 'getColorFromTable' function.

Instead of blindly reading 4 keys and hoping for the best it instead walks over the table, checking the key value for the 4 colour codes and setting the value. On startup the function sets the value to 'sane' numbers; rgb = 0, a = 255. I figure full alpha is going to be the most likely required usage pattern and rbg should nearly always all be there.

void getColorFromTable(lua_State *L, int index, GLubyte *colour){	lua_pushnil(L);	if(index < 0) index -= 1;			colour[0] = colour[1] = colour [2] = 0;	colour[3] = 255;		// default to full on for when we have no alpha information so that it's sane			while(lua_next(L,index))	{		lua_pushvalue(L,-2);		const char * key = lua_tolstring(L,-1,NULL);		if(key != NULL)		{			switch(key[0])			{			case 'r':			case 'R':				colour[0] = lua_tointeger(L,-2); break;			case 'g':			case 'G':				colour[1] = lua_tointeger(L,-2); break;			case 'b':			case 'B':				colour[2] = lua_tointeger(L,-2); break;			case 'a':			case 'A':				colour[3] = lua_tointeger(L,-2); break;			}		}		lua_pop(L,2);	// remove the duplicate of the 'key' and the value				}}

Maybe not as fast but certainly more 'correct' and correctness is more important than speed at this point; if you want speed when it comes to colour setting functions you can always supply rgb(a) seperately instead and void this routine all together.

I'm as yet to decide if the number/float and integer extraction routines need changing; 0 seems reasonably for them imo.

Tonight I'm going to change the event model; namely make one *chuckles*
At the moment all you can check for is the window closing, so I'm going to add support for returning all the events which have happened since the last time the query function was called; this is somewhat modeled after Pygame in that regard (and I guess VB6 as I'm pretty sure that had an event type as well.

This also means keyboard entry of data can be done [smile]
This'll be in the 'input' module I think as events are input after all.

If it was me, I'd have contacted NaturalMotion after a week or so to see what the deal was. If my application had indeed been unsuccessful, I'd want to know why and possibly how I could improve upon further applications. It is just that if I'd taken the time to customize my CV and write a cover letter, I'd at least want to get some feedback.

Glad you will be able to pay the vodka bills though and you can always bring a hip flask to help you through that 20 minute cycle [wink]

##### Link to comment
Quote:
 anyone would think you have a job or something
Well, technically I have a job... but I've not been into a company office in weeks nor have I seen any other employees. I'd be amazed if they even know that I work for them [lol]

Quote:
 Only going to be a few mornings a week, however it keeps the bills paied and me in vodka so it works out perfectly from that point of view [smile].
Sounds like an alright deal for me! If you've got spare time and you're not stressing out over paying bills and affording dinner then you're sorted [grin]

Shame the NaturalMotion guys let you down and it really doesn't make them look good if they can't even be bothered to tell you yay/nay [rolleyes] Guess you'll have plenty of spare time to pursue other similar opportunities if you want...

Jack

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account