Two Down, One to Go

Two Down, One to Go

May 23

So there’s only one assignment left for this year. Oh and two exams but that’s different. However the last assignment is a bit of a bugger, Javascript. Not the most invigorating subject but oh well it has to be done. I’m not really the biggest fan of JS, I admire what can be cone with it but I’m not a form believer in it. Considering JS can be turned off with the flick of a switch a whole site can be destroyed in seconds. Not exactly the nicest idea really. So Javascript can take a back seat when I design sites.

Anyway enough of the slight dislike towards Javascript. Summer is coming, it’s already getting hot and I’ve already been for a beach session. Things are looking good. All the work I’ve handed in has achieved a pretty high mark so I’m really happy with all of that, I’m just a bit worried about the upcoming exams as they aren’t my strong point. But who knows what could happen with them. I’l have to wait and see.

2 Weeks left and counting.

PS. My new PC is a beast ;)

March? Oh it's almost gone

March? Oh it's almost gone

Mar 22

So March has been pretty slow, I’ve only had two small assignments to do, apart from the Login System mentioned in the post before there are a few more along the road which aren’t entirely huge, the only large one I can think of is Digital Media for Mike which seems quite large, but I think it’s completion time shouldn’t be as long as the first Media assignment. There’s not much else to say really, except now the weather is looking better, there’s some nice looking sunrises when I walk to the bus stop, I’ll be getting back into photography hopefully.

From If to Else

From If to Else

Mar 15

WebDoc "Pages" PreviewSo the latest assignment for PHP is involving making a Register and Login System for clients to view and control their settings. It’s not exactly on the same scale as creating an RPG, I think these two assignments were the wrong way around, or maybe the first one was to gauge the level of skills in the group, not sure. As I had already started work on a CMS it was quite easy to use some of the basic parts of it to show as the final piece.

I’ve just finished functionalizing the main administration script that controls pretty much everything that’s not classed as aesthetics. So that’s about 90% of the CMS completed. I’m going to add user list displays for anyone classed as Administrator, everyone else won’t even be given the link in the navigation (more dynamics). On the subject of the navigation, the actual links are built entirely through php, this means that each section of the site can have different nav bar links and some parts contain sub nav bars with links relating to the current content. So basically I’m forcing as much dynamic scripting as I possibly can into this project. I don’t think it will be as effective otherwise. More to come soon.

Sorted. In The Bag. Done

Sorted. In The Bag. Done

Feb 28

So it’s finally done. I’ve complete building The Demons Lair which has taken a while to get fully completed. There’s been so many set backs that I was beginning to get worried I’d never finish it. But low and behold, it’s all in the bag! That doesn’t mean that I don’t want to add anything though, I never got around to adding enemies which made me slightly disappointed, I just didn’t have enough time to add it and make sure it’s bulletproof.

yes!

Dramatic representation of me in excitement

So yes as the picture is showing above, I’m happy that’s all out the way.

I’ve just started work on the next scripting assignment which seems more to my liking. It’s a web tool instead of a game which is much more interesting to design and code so I’m enjoying starting this one. The basic outline is too have an administration page to control users who have registered with the site. These users will be able to access certain content which can only be accessed by being logged in. Simple really, the registration form needs to have all the standard error trapping and validation as any other form would have, this goes for pretty much anything where there’s an input box basically. Anyway moving on, the premise for this project is simple, so I’m in no worry about completion on this one, the game assignment was such a vast project it began to get problematic near the end. Hopefully this won’t be the same.

February has been an off an on month, there’s been so much to put together lately time to myself has taken a back seat, however now that I have cleared one of the monster assignments I think I can take a breather. Bring on March.

Tempus Fugit

Tempus Fugit

Feb 18

After that last post outlining the fiasco’s that I had encountered. I had to really knuckle down and re-write the parts that were causing issues. The problem with my main foreach loop was that it was trying to do too much in one go. I first tried to split the foreach loops up but with no luck. Finally the only way to get it all working correctly was to remove one of the MySQL queries from the code and replace it with an array from the game session, and for some stupid and extremely annoying reason white space was finding its’ way into my arrays… I’m not sure, it’s one of those php things which is always a pain to sort out. But now it’s done so all is good.

The actual game fully runs at the moment, however there’s no win scenario so it’s a bit pointless doing much on it at the moment. I should have the full version complete by tomorrow.

Achieving Efficiency

Achieving Efficiency

Feb 16

This one could go on for a bit, so I’ll try to be short and set out things into sections.

Bugs and Fixes

So there’s been a lot of problem with bugs near the end of the programming assignment. When I first started out there was next to nothing in the way of bugs. But now it seems as I stitch the final part of the canvas, other parts are beginning to rip. My main script is programmed chronologically, so now I work at the bottom of the page, it feels like I’m working in the basement of a large building where all the little things make the building tick, strange analogy but it’s what it feels like.

What I always find, as a programmer of sorts, is that the smallest most insignificant parts of programming cause the most damage and hassle, why? Because they have to assert themselves somehow! If they’re not noticed in the final outcome then to make things equal they’re a pain in the backside behind the scenes! That’s my theory on it anyway.  I’m sure I’m not the only crazy guy thinking this.

I think I’ve spent more time overall on this assignment debugging it, than actually doing some  proper coding. It’s a bit annoying at times as I feel like I’m not getting anywhere, then suddenly out of nowhere I’ll manage to fully fix the problem and feel slightly better about it! Here’s a couple of the main bugs which are currently killing my will to live.

Problem Number 1

First and foremost, there is a major problem with my puzzle coding, I’ve designed it so that there are no hard-coded parts to the script, it’s all database driven. And by doing this means I only have to add new entries to the puzzle table for it to appear in the game. Dynamicity at its’ purest. Anyway at the moment I can only seem to add a maximum of two items to the puzzle, by items I mean items required to complete the puzzle. The reason is most likely to do with whitespace or something that’s going terribly wrong inside my insane two tier foreach loop:

foreach ($items_required as $item_required) {
if (in_array($item_required,$inv)) {
foreach ($objects as $object) {
if ($count == 1) {$object = str_replace(" ","",$object);}
if (in_array($object,$items_required))  { $i = $i + 1;}
}}}

Ok so for people not php orientated, or not code orientated in general. Here’s what this little beast does.