About This Blog

I am a student at Futureworks currently in my first year of their Games Development Course. This blog largely comprises of work and illustrations made in relation to assignments, as well as the very occassional opinion pieces or information I happen to believe may be relevent to my fellow students on the course.
Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Thursday, 18 April 2013

Assignment 3 - Magic Conclusion

Because I didn't get much chance to even announce the last assignment, nor go through the work process. Something about programming has made keeping this blog up to date surprisingly difficult. Then again, I suppose there isn't really a lot you can show/demonstrate when it comes to programming besides the finished project. Oh well.

But regardless. Our assignment was pretty much a task of expanding upon some XNA based code work we've been doing in class. Adding a healthbar and an option to restart or quit the game, stop the player moving offscreen et cetera.

I've somewhat felt over the last few weeks that we have covered far too much ground in a short space of time, and as a result it was difficult to get to grips with the task at hand. But by plenty of internet searching and assistance from a programming acquaintance, I was just about able to achieve all of the above tasks in the nick of time, along with the inclusion of an additional platform (Seeing as I opted to make the project into a platformer rather than a four directional game.)

I haven't got a lot else to say. I'm going to go back and try to learn all of this work properly in my own time. While I'm not sure whether I'd ever want to focus on programming as a career choice, it maintains a hold on me due to the possibilities of someday being able to produce working concepts of game mechanics and ideas I've been jotting down over the years (more so since I've been on this course).

I digress. Have some screenshots.

Such an imaginative title screen. As with the previous assignment, I included the controls here for the sake of clarity.

This is the entire game right here. A floor, one platform. No items, Fox only, FINAL DESTINATION.

A jump animation was kind of included... and also demonstarting a functioning platform. I had a fair bit of trouble with said platform at first, from characters falling through them to characters walking on air beyond the platform if they did not jump.

I was too indifferent to make meaningful projectiles.

Demonstrating how the health bar reduces as players are damaged by the black blocks

Shockingly enough, there is a seperate game over screen for if the second player won.
 

Tuesday, 19 March 2013

Programming Assignment 2 - Conclusion

And some screenshots as well. Because I'm just that generous.

I shall recap the assignment in question, if I have capped the assignment in the first place. Our task was 5 fold -:

  • Use a two dimensional char array to create a maze
  • Use classes to seperate functions while still running the program
  • Restrict player movement to left and right directions unless there is a ladder to climb, and add environmental hazards that send the player back to the start if touched.
  • Add enemies that move two squares left and right, which also push the player back to the start if contact is made
  • Add a title and display the player's X and Y coordinates.
I had a lot of trouble with this assignment, I won't lie about it. Mostly due to not grasping how classes function and interact with one another. Thanks to collegues in the classroom, I was able to eventually wrap my head around this particular difficulty.

In the end, I was only able to achieve 4 of the objectives, and the one I didn't manage was the addition of enemies. Any attempt to add one ended up creating an alternate map. Maybe if I'd had a little more time to play around with the coding, I may have been able to find a way to resolve it, but managing four out of five tasks is nothing to be too disappointed by.

Items, Doors, Ladders, Title, Environmental Hazards, Coordinates, and as a bonus, Controls and Objective
  
I actually designed the level in such a way that each room would have introduced new elements, like the first room simply featured opening a door with a key, and then the second room introduced the ladder... the third room introduced spike hazards, and the fourth room would have featured an enemy to avoid before the fifth room being all about combining everything into one challenge. As mentioned, no enemies made it and so this idea more or less flew out of the window.

I also made elaborate use of ASCII symbols to create something a little more visually complete... I wasn't content with using default dashes or dots to make up the game. I suppose that is the artist in me trying to break free once again.

Just a screenshot demonstrating that the keys/hearts disappear when picked up, along with the doors. Also showing off ladder use.
And that is pretty much all I really have to say. I'm going to take a break and finish off the last aspects of the programming course before the holidays, and then I'll try to get to grips on this and see if I can finally work out the enemies.

Victory screen. And credit to those who helped me out in the assignment.

I may go back and take some screenshots of the first assignment, the text adventure. I may. Or may not.

Monday, 11 March 2013

Programming, General Blog

Writing this post because it has dawned on me that I've really failed to do so of late.

Even now, there really isn't all that much that I can say that would prove enlightening on what I've been up to for the last month. The way of working has been very different in Programming from the way we worked in Games Design, as fundamentally different subjects as they are.

I thought that I'd at least say that some of the fear I originally had with programming has dissipated. Not to say that I'm necessarily finding the subject easy, more that it appeals to my problem solving obsessive compulsive streak, and the only difficulty I can really say I'm experiencing is trying to do things without actually knowing the code necessary. If I know what code I can use and how/why it functions, then I can code and use it in many more ways... if I have no idea what I'm doing, obviously I'm not going to get anywhere.

It is all fine and dandy to say Google is good for helping out, but I've not been finding that to be the case exactly. There are only so many ways to phrase something you're trying to work out, and eeeeh.

Right now, we've been set a task to make a primative 2D game in a C# Console Application. I vaguely understand the base code that allows the program to function, but I have no idea about many of the things we've been additionally asked to do, like making things disappear when the player walks over it, or enemies that move 2 spaces back and forth. I can't see any of that particularly working with the knowledge I have at present, nor have I really been able to solve the problems via google. All I've found is that there is no way to change the contents of an array, and that can't be true. It would help to know what to be looking for rather than gunning blind. At least until there is enough knowledge to actually be able to confidently search for extra knowledge. I feel like I'm missing pieces of a puzzle.

The only thing I really did figure out on my own was making the player only move left and right apart from when ladders are present. Even that isn't really very useful to me right now, and I'm planning to work out if there is a way to make the code function by observing what is one cell UNDER the player character instead of directly behind the player character. Which would resolve the issue of being able to move left and right in the air... but I have no idea if it will even work.

Ughuhuh. I'm sure I'll work it all out eventually.

Wednesday, 13 February 2013

Assignment 1 Part 5 - Nearing The End

With the hand in date occurring at the end of Thursday's lecture, I've still got a fair amount of work to get on with. It is going to transpire that my game isn't going to be very big, but that being said I have been viewing this assignment more as a test of being able to make use of the various statements and loops.

This is the chief reason I decided to make a game based on Mass Effect. It gave me a reasonably challenging task in working out how to replicate the various functions of the actual game series.

And as I write this now, I have succeeded in making conversations that loop and and advance the events of the game. One conversation will conclude differently if the player first speaks to another character that reveals the betrayal of the individual being spoken to. And I'm about to finish the conversation that triggers this option and try to include a brief section of the player escaping from their prison cell. I'm not too worried about this failing to manage the latter though... I'm more pleased that I managed to work things out so that the player's status bar remains in place, a problem that I solved after finding that the screen cleared in the character customization section, which I wanted to avoid for the game itself.

I'm satisfied. Finding creative ways of using ints, strings and bools has made the assignment a productive one.

Monday, 11 February 2013

Assignment 1 Part 4 - Choices, Choices

I'm making a fair amount of progress within this assignment, although I remain convinced that I'm probably not going to be able to make a full adventure. It might just be one of those things where I'll want to continue adding to it even after the hand in date. I'm increasingly seeing the work as a test of how I can use the knowledge from college then as an attempt to make an actual text adventure.

With character customization neatened up and complete, I've been able to start on the story itself, which I've mapped out in an Open Office document. While this was going to be quite the quest, I'm lowering my scope to dealing with three areas, each testing a particular mechanic I want to include.

I have been using ints and if/else statements to help with the character conversations I'm drafting out at the moment. Chiefly, if I want to add bonus points to paragon or renegade stats, I don't want that to be exploitable. I've been able to use switch cases with if/else statements to successfully carry out basic conversation... and after each conversation ends, an int is changed so that if the player inputs "Speak to Teammate" for example, they will speak... but if they do it for a second time, it will say that that command has already been used. I've gone a little further with this in regard to not allowing event progression until at least one other person has been spoken to. 

Probably not all that necessary, but I mostly wanted to see if I could do such a thing.

Furthermore, I'm working out small ways to change certain things in the game depending on choices the player makes in the customization screen. For example, in the second area, an enemy may be observed at a distance. Unless you are an infiltrator, you will have to encounter this enemy once you reach the other side of the room.... of course, if you ARE an infiltrator, you will be able to use a unique skill to take down said enemy from a distance and avoid that event entirely.

So yeah, I'm perhaps being a bit elaborate. The only thing left that I really need to do is to create a game over screen with the option to restart or quit. I doubt I'm going to be able to allow the player to restart at a previous point without screwing up the player stats, so I'm going to just try and look everything around back to the main screen. A bit of a cop out, but I don't know how to do otherwise for now.




Wednesday, 6 February 2013

Assignment 1 Part 3 - Text Adventure Rising

//Thought I'd write an update so far. I'm basically at the point now where I can get started on the //actual adventure, for all it is worth. I don't think I'm going to be able to make too much... man.

//If I'd known what I know today over the weekend.

//Martin was kind enough to look over the massive amount of code in the program I put together over //the weekend, and showed me an alternative way to achieve the same aim without the sheer amount //of lines I'd used... and sitting at a far more respectable 1000 lines, it functions exactly the same way. //It really has been amazing to see how much more efficient one can be with just a /little/ extra //knowledge.

//Making an int for the number of questions asked and increasing it's number by one for each //question answered was truely beautiful... so of course, I have to thank Martin heartily for helping //me improve my work. I was able to complete the rest of the character customization, as well as //create a seperate loop at the beginning of the game that would allow me to offer the option of //starting with a default character instead of going through the customization. (Well... most of it. It //ties in nicely with the last customization loop which allows the player to start the game or reset their //customization and start over).

//So now it is onto the game proper. I know I'm probably not going to manage anything particularly //long (if I can even achieve THAT), which means that I'm going to focus more on making those //decisions made at the start of the game visible.

//I've also been inspired by the brief coding exercise at the start of Tuesday's lesson. I wish I'd written //it down, because ugh... I got the greatest idea for a little sequence where a player has to escape //within a certain number of turns, and if they don't make it, GAME OVER. Hmm...

Monday, 4 February 2013

Assignment 1 part 2 - Character Customization

Thought I'd make a quick update before I start the jobs I have to get on with today.

It took near enough the full weekend, and rather a lot more lines of code than I really though, but at this point now I've succeeded in recreating the character customization feature in Mass Effect in do while and switch statements.

This involved an awful lot of branching as the choices stacked up. As mentioned in the previous entry, I have

name    

  • name (ccname + "Marshall");

gender  
  •  male = (+1 male);
  • female = (+1 female);
history  
  • spacer = (+4 paragon, +1 spacer);
  • citadel born = (+4 renegade, + 1 citadel);
  • colonist = (+2 paragon, +2 renegade, +1 colonist);
profile   
  • sole survivor = (+1 survivor);
  • war hero = (+2 paragon, + 1 warhero);
  • ruthless = (+2 renegade, + 1 ruthless);
class      
  • Soldier = (health = (health + 25), soldier + 1);
  • Infiltrator = (infiltrator + 1);
  • Adept = (adept + 1);
  • Engineer = (engineer + 1);

And so gender branches out in two directions, and then each of those branch out in three directions... and then each of THOSE branch out in three directions... and THEN THOSE branch out in four directions. And at the end, I put in an option to start the game or reset... which wipes out all the int changes involved with the individual choices and returns you to the beginning of the customization screen.

I cut down the number of classes to 4, and while they won't act all that differently, I hope to use the ints to provide extra options for the player to choose as they interact and travel through the area I'm going to be doing. For example, a soldier may get an exclusive option to kick down a blocked door that the other classes may not get, and a character with high renegade points may get an extra conversation topic.

***

Long story short, I got more done than I thought I'd have done by now, it works, and I'm taking a day off to try and relax. I want to put in an option to skip the character creation with a default load out to allow a player to quick start.

It is likely that I'm doing something overly complicated, (Over 8000 lines for this section alone!) but I generally follow a rule that I'll try and take my learning as far as I can. I have to look into a couple of things that may help me make things look a little prettier (And work out how to make the window bigger), but I also want to avoid trying to use commands and lines/code that I'm not yet familiar with.

 I'm also compensating for the complexity of the character creation by making the story itself not so wide branching. It really will be a choose your own adventure, I don't intend on allowing back tracking (Although I will be allowing for some investigation)... something like that WOULD be beyond my present skills.

Friday, 1 February 2013

Assignment 1 - Text Adventure

I just thought that now we've got an actual assignment on hand, that I can resume blogging. I've had no real reason to do so up to now, partly out of desire not to clog the blog up with irrelevant topics.

(And also, I don't actually have a copy of the assignment. I only honestly recall that it has to be able to restart without exiting the program, and involve a combination of if/else and do/while statements.)

***

And so it begins. Or rather, it began on Tuesday but I didn't touch the coding until I had a clearer idea of what I was intending to create. It was a relatively simple choice between doing something more easily achievable and complete, or trying to use the knowledge I've acquired in class over the last 4 weeks to build something more complicated.

"Bill Dup Adventure"

Simply been an expansion on a task we did in class a week ago, with the tale of my sketchbook alter ego Bill Dup in his attempt to find out exactly why he can't open the door to his flat. This idea would have largely followed what I call a Frankensian logic with some surrealist/black humour... and that is more or less all I can really say.

"Mass Effect - Untitled Side Adventure"

A more complicated text based adventure set in Bioware's Mass Effect Universe, with segments of exploring, talking, and combat. Players can choose a default character or create their own to affect their path through a shorter adventure, and even gain a team mate or two as they break out of a prison under siege. Because I didn't want to use established characters, the player character will be a mercenary or similar such things that won't involve the System Alliance Navy or N7.

***

And I sided with complicated. Which I just know is going to come back and bite me on my pleasantly plump posterior somewhere down the road, but the idea excited me more, and I still feel that it will be a real challenge and thus also a learning experience.

The theory of how it will work remains rather sound, at least in my head. I will have to prepare for plenty of cut and paste depending on choices.

But so far, I've made a title screen (With coloured background and font no less) and I'm in the process of creating the character customization page which will consist of

  • Name
  • Gender
  • Pre Service History
  • Psychological Profile
  • Class
As far as how these are going to work is concerned... as in the real Mass Effect games, History and Profile are mostly for bestowing early points to a player's Paragon/Renegade stats which I am presently using ints for. I have created further ints for each of the selected profiles and histories which I will randomly use for conversation or exploration options... and the Paragon/Renegade stats will allow for further conversation actions. Player Class will affect combat sections of the game, from what sort of weapon a player uses to any further actions I can come up with.

Unlike the title screen, I've not yet finished this section, and I'm going to be trying to niggle out the finer details further in. I think I want to make this section back trackable as well in case a player wants to change any details they've put in place. Using the Default character will set stats and name to a standard loadout.

Soon as I feel I have enough work to warrant it, I will be uploading some screen grabs.

For now, peace out!