The story of the rogue exclamation mark (!) or how I lost 4 hours of my life.
Posted by Joshua Smyth (Admin) in Uncategorized on July 23, 2009
This story contains no information of interest to anyone what-so-ever.
But it annoyed me, so let me vent.
I was already over my time-estimate, and I had a bug. It was strange, the system was sending out two emails and one had an exclamation mark; just randomly right in the footer – But the other was fine. After staring at my code and deciding that there was nothing wrong I decided to view-source in the browser – Yup, email had an exclamation mark right in the middle.
But I wasn’t putting it in there, and the code to attach the footer to each email was exactly the same. However only one email was displaying an exclamation mark.
See this project was in .php on a linux server – I’m not a php guru, nor a linux expert – previous to last month I had written approximately 50 lines of php code, and I’ve run linux, well never.
So I was convinced it was my bug, something I’d done wrong, something about the php_mail() function that I didn’t know about – It didn’t help that the server hadn’t been patched since 2004 and was still running php 4.2 so I couldn’t use any of the email libraries that kept being recommended in my google searches and promised to make my life easier.
So I entered a new test order into the system, and I got my two emails – One with an exclamation mark and one without, but this time the exclamation mark had moved. My previous testing at always shown it in the same place.
Test and measure, it’s the scientific method.
So I try entering a new order, this time adding exactly 4 characters to the address on the order form. This time the exclamation mark has moved exactly 4 places to the left.
Ah ha, I’ve got something! – I thought to myself. The system was no longer random, no longer chaotic, I had something deterministic – I had no idea why but the length of the email was causing an exclamation mark to be inserted
I modified my code output the email to the browser before sending it to php_mail() – No exclamation mark, formating all correct, everything fine. But when I recieved the email – exclamation mark.
It turns out that sendmail inserts an exclamation mark into an email if it receives a string that is too long without a line break. Why? I have no idea.
Because I was sending HTML I wasn’t bothering to insert line breaks ‘\n’ into my string before passing it to php_mail() – Instead I was using <br>
So some programmer, somewhere at sometime working on sendmail decided that if a string was too long they would split it up by inserting an ! character – This is probably some strange legacy thing from eons ago before HTML was even invented.
And only one of the emails was inserting an exclamation mark because the other was under the threshold for the maximum length before sendmail inserts an exclamation mark.
So that’s a boring story about how I lost 4 hours of my life and one of the stupid reasons why software is often over budget and over schedule.
!
Your unique selling point is now more important than ever – [part one]
Posted by Joshua Smyth (Admin) in Business of Software, Game Design, Indie Game Development, marketing on July 17, 2009
Reports are coming in that the games industry is not quite so recession resistant as previously thought. What we have been witnessing over the last 1-2 years is a nose dive in prices for downloadable games, the near disapearance of PC games from retail stores. And the re-release of lots of back catalog titles.
All of this is a good thing™
Games have been historically expensive, backwards compatability has always been a pain, and only being able to choose from the ‘top 40′ equivilent at your local store was hurting the medium as an art form.
All of this means the game has changed. Dramatically.
As someone with disposable income, there are alot of games out there for me to choose from. I’ve mentioned before that I’ve got way too many unplayed games on my shelf with not enough time to play them all.
And now with the low prices seen across the board for digital distribution from the likes of Steam, Big Fish Games, The iPhone App Store, Gamers Gate, Good Old Games, PSN and XBLA – For less than a take-away meal I can buy more than an entire weekends worth of entertainment.
The flip side to this is of course – How sustainable is this model for the developers of games?
The music industry got a shake-up in the early 2000′s and I have a feeling it’s going to be the games industries turn to have to re-think business and the way it turns ideas into products. And unfortunately, unlike the games industry, we can’t earn money by playing live shows. T-Shirts maybe, but live shows? Probably not.
I think we are going to see more small studios, making smaller-budget (and by small-budget, I don’t imply low-quality at all) niche titles. (ie. like the old days.)
And with niche titles, it’s all about the unique selling point.
If I have $10-$20 to spend, and a spare weekend, I need a reason to buy your game and not someone elses.
The irony here is that it’s not price that will be my deciding factor, it will be all the irrational fuzzy aspects of my personality which will lead to me making a purchasing decision – It might be interesting story, art style, maybe promote some message I agree with, invoke my sense of nostalga or capture my interest in some other way.
In any case, your game has to be in some way special.
Developers, indies in particular, have to think what their game stands for – what does it, I dare say – mean?
Taking a break for July
Posted by Joshua Smyth (Admin) in Uncategorized on July 17, 2009
I’m taking a break from working on my game this month. Mainly because I’ve been terribly busy at the day job. But I got a nice raise this year – So that’s good.
I have been thinking about trying to port the engine to C#/Mono – If I can deploy it with the mono runtime and not require a seperate download I think it will be the way to go.
C++ is nice for what it’s good at, but I don’t think it’s a very good fit for my project. I’m far more efficent with the C# language and given that I program mostly in C# at work – If I can get a proof of concept hello world app out, it will help with the context switching overhead so I don’t have to reorganise my brain to remember how C++ does things.
I’ll also have to see if I can get Lua and SDL working with mono.
Of course, getting all these different libraries to work togeather might be more trouble than its worth.
(Oh, I guess that means I’m buying a mac)
RPG Project – Update End of June 2009
Posted by Joshua Smyth (Admin) in rQuest on June 29, 2009
This month I was far more productive with my still-not-named episodic RPG project – Using two monitors makes life so much nicer.
This month also marks a special occasion as I’ve now been working on the project in my spare time for one whole year now.
Time sure flies..
This month I’ve added features for NPCs to the map/world editor and spent a little time working on the datastructure for NPC dialog trees. The thing with dialog trees is that they’re not actually trees – But rather directed graphs. When you think of modeling conversations as a series of nodes which represent the state the conversation is in and a set of response options which represent a transition function to another state in the conversation, it’s actually quite simple.
I’ll be using lua scripts for the dialogs, that way I can easily add conditional responses – For example you wouldn’t want to accuse someone of murder unless you had gathered enough evidence to support the claim.
Also I’ve decided on doing a ‘pilot episode’ which will probably be a 3-4 hour long game to test the engine and actually produce a finished product before the turn of the century. I’ve sketched out some details for a side-story which will take place in the same world as the other episodes, but will involve a different protagonist.
See you next month.
I lasted fifty days
Posted by Joshua Smyth (Admin) in Uncategorized on June 23, 2009
So I’ve mentioned before that I’ve had way too many games to play and not enough time to play them. I thought I’d try a little experiment to see if I could go 120 days without buying a new game.
I lasted fifty days.
And it’s only because a certain PS2 RPG came up on special on an online store for a decent price and I already own part 2 of the series.
Of course I don’t have time to play it and it will sit on my shelf for some time. But at least it won’t slip into the void.
rQuest – End of May – Update
Posted by Joshua Smyth (Admin) in Uncategorized on June 2, 2009
Didn’t get that much done programming wise for the game this month.
Instead I have been working on more storyline / project management style stuff. I’ve sketched out the map for episode one and a basic storyline and am beginning to make an asset list for items that I will either need to make myself or outsource as commission pieces.
Two notable things however.
- I bought a 22″ Monitor to go alongside my 19″ – This should make me more productive.
- I got a copy of The Ultimate Guide to Video Game Writing and Design – And its a darn good book. I’ll probably pass it round once I’ve finished with it.
So that’s it. Nothing much to report, but checking in none-the-less.
rQuest End of April – Update
Posted by Joshua Smyth (Admin) in rQuest on April 27, 2009
Its not quite the end of the month, but it’s close enough to write my monthly review on the rQuest project.
Work this month was slow as I’m starting to pick up other (non-computer or only semi-computer related) projects / hobbies to do in the evenings.
Programming a video game after spending 8 hours a day programming line of business applications can be a little hard on the brain, eyes and body. Getting exercise and spending time away from the computer to degauss in the evenings can be really satisfying. Realistically I can only commit approx 8 hours per week for rQuest, but thats ok – as it’s a non-zero amount and it’s surprising what you can acomplish in an on-the-ball-ready-and-focused 8 hours.
This month I created the CRUD to add items to the project – For all your wands and shields and swords of much smiting +12 against trolls.
Screenshot Below
This was actually one of the more boring tasks to do as it is stupidly similar to what most database front-end working programmers do day in and day out – Someone has a product and it has these data fields which mean stuff and an end-user needs to enter new products and edit existing products etc…
Basically if I was running a medieval shop (or is that shoppe?) this months work would have been scarily similar to the functional specification of that shop.
I also did a little bit of story development. So the ‘soft’ areas of the game, if still neglected haven’t exactly been forgotten about.
As I have worked on the game editor it has become pretty obvious that I need to get another monitor – Often I need to run two IDEs (Visual Studio for C#, CodeBlocks for C++) with perhaps a paint program, or an Internet browser open. (Three monitors would be cooler, but my budget doesn’t extend that far just yet.) It’s almost an exercise in inefficiency to keep developing on only a single monitor.
So next month it’s dual monitors!
I Bought a Nintendo DS
Posted by Joshua Smyth (Admin) in Offtopic / Real Life on April 21, 2009
And it’s awesome.
I know, I know, I’m like 5 years behind the curve. I’ve been wanting to get one for a while and last weekend I was anticipating a long bus journey, so in order to give myself something to do so I bit the bullet and bought a DS.
And it’s awesome.
I probably wouldn’t have got one if I hadn’t seen “My Japanese Coach” on the store shelves. Which is essentially what you think it is – A Japanese language tutor.
Having a touch screen and memory games and being able to hear the words when you touch them with the stylus makes it much more fun than sitting in a classroom and feeling dumb because the other kids seem to get it much quicker than you do.
It also has a dictionary, phrase book and other more advanced stuff that I’m just not up to yet (I’m only on lesson 5)
Brain Training came free with the DS which is also fun. And although it took a couple of days for the game to recognise my handwriting (or was it me who started to recognise how the game interpreted my handwriting?) It’s really neat to see little graphs about how much quicker you get at being able to do 20 quick fire arithmetic questions.
Also has lots of Sudoku puzzles which entertained me on the bus.
Playing the DS has rekindled a sort of passing interest in games as educational tools. Thinking back at all the parser driven and point and click adventure games as a kid I probably learnt alot simply through osmosis. And educational titles such as Carmen Sandiego where, you know, actually fun. Unfortunately a cursary look at all the educational titles for the DS makes it hard to gauge the titles worth – It’s hard to tell if a product is simply trying to appeal to parents by using familar licenses. (Dora the Explorer, Sponge Bob etc..) And thus sell more copies, or whether they are actually worth what they are pedaling.
I think these heldheld devices are more suited to these educational titles than larger PCs as they don’t require alot of space, bulky input devices, keys that do the wrong thing if you hit them (the dreaded windows key for example) and there’s something about the stylus and touch screen that just feels right.
I can see why the DS has sold 75 million units worldwide – It’s more than just a toy, its a useful and entertaining tool.
Notes:
A) I bought a DS lite, I would have liked a DSi but didn’t think that paying twice the price was worth a 0.3 megapixel camera that I would never use.
B) I also bought Sonic Rush which is a decent old school Sonic game.
C) The iPhone is probably another good medium for educational software due to its touch screen but the problem with it is that 1) It’s a phone and 2) No one is going to buy one for their nine year old.
D) The DS is region free, so when I feel my Japanese is good enough, I can play actual Japanese games.
Now On Twitter
Posted by Joshua Smyth (Admin) in Offtopic / Real Life on April 7, 2009
Well I’ve been on it a while, but if you would like to see what I’m up to outside of my (rather) infrequent blog posts you can follow me at http://twitter.com/joshuasmyth
That is if you are not bored by tech stuff, video games, going for runs or my latest drumkit addition.
rQuest – End of March Update
Posted by Joshua Smyth (Admin) in rQuest on April 5, 2009
March was a pretty slow month for me.
Most work this month was spent re-organising the level editor, which is slowly transitioning into a complete game editor.
Instead of creating maps, you now create a project – Which contains multiple maps and each project has its own data for monsters, npcs, scripts and tilesets. This is largely a bi-product of deciding to go episodic, but it also centralises much of the workflow involved in creating a game.
This process will take a while as it’s much more complicated to write an application that manages n things when you only originally planned to handle one thing.
So work this month will probably continue to improve on the game editor. But I should really get around to getting the C++ game engine UI stuff implemented sometime.
Also, does anyone know of a (Preferably Cheap) syntax highlighting edit box for .Net? – I want to add the ability to edit LUA scripts into the game editor and would like to have some syntax highlighting.