Friday, 24 October 2014

Virtual Expedition

Started a new blog which is also about programming but just more general than related to game dev. I doubt I'll be posting on here anymore so if you're interested stay tuned to the new one.   

Image works as link

Appreciated guys.

Tuesday, 16 July 2013

How bitterly disappointing

Soooooo, a game I've been working on for approximately 5 - 6 months decided to go and mess me up by glitching itself. Then the other backup version I had on my computer somehow developed the same problem as soon as I tested it approximately 15 minutes later.  The glitch itself doesn't corrupt the file in the sense I can't open it, but it for some reason deleted everything inside quite a few movieclips. So after a few days of splicing different files attempting to piece together the product I had beforehand, I almost managed to fully recover the file, but there is still a tedious chunk of work that needs to be done.

Due to this I decided I'm going to abandon this project, for now. Perhaps I'll come back and rework on it at a later date, but for now I'm going to focus on other things. In a way I think this has almost been positive in the sense it frees me up to try experimenting with different code and gameplay mechanics.

I had an idea for a game a few weeks back and so that's what I'll be devoting most of my programming time to. It's called Mediocrity and I have a base concept but other than that I don't know much else about it.
I'll try and keep updating at major key points in production and hopefully finish it before the winter.

Anyway if anybody wants to see what I had before the first project went and messed itself up here it is :
Ultro City

Monday, 8 July 2013

As3 Saving & Loading with SharedObjects

Creating a Save Function AS3? 

So basically I've never actually implemented an actual saving & loading function in a game before, but I figured it was about time I pulled my finger out and get experimental. 

I have a brief experience working with SharedObject (the class used to create cookies), and I remember that I had to individually specify the properties to be saved or loaded :

demoVariable =

This being incredibly tedious as you would have to write a line of code for each and every variable used, not to mention you would have to write the reverse for both loading and saving. Which immediately got me thinking, there must be a faster way (being the diligent, enthusiastic,  hard worker that I am). 

So I started experimenting with arrays & planned to hopefully use a loop function to interchange the values of each. as an example I had the saveArray:Array which would be the in game properties such as expPoints, currentLevel etc & the loadArray:Array which would be the properties that were saved onto the computer. By having the two arrays arranged with corresponding variables (from each array) in the same index order, by using a loop function, I could accurately transfer the values from each variable.
But I soon realised & remembered that arrays use references and not values, meaning that if I used;

for (var i:Number = 0; i < saveArray.length; i ++)
    saveArray[i] = loadArray[i];                                 

The property stored in saveArray[i] slot wouldn't become the same as the value in loadArray[i], but the slot itself would become the value in the loadArray[i] slot. 

So going back to the drawing board I was trying to think of a way that I could easily transfer the two properties, and I in fact found a method that was faster and more efficient. I created an array loadArray:Array and I created string variables for each slot which had the same name as  the variables of the game counters which were in the my class PlayerMain (eg "currentLevel", "Exp"). By using the string in the array as a reference for the variable I was searching for in PlayerMain I could create a new variable in SharedObjects which would be conveniently named the same as the variable it remembers  and also give it the same property. 

Exp3 class : 

public function GetLoad(getNum:Number):String    
return loadArray[getNum];                                 


Save class : 

for (var i:Number = 0; i < Exp3.loadArray.length; i ++)
var thisOne:String = Exp3.instance.GetLoad(i);[thisOne] = PlayerMain[thisOne];         


Another highly convenient thing about this is the fact that to load saved data you only need to reverse the order in which the saveData and PlayerMain are in, also by using the same array for both loading and saving variables, if I accidentally misspelled  a variable which was saved and therefore made a saved variable null, when loading it wouldn't replace the current variable as the variable name of the saved property doesn't match, therefore not potentially breaking the game by nullifying a necessary variable. 

Monday, 22 April 2013

General Update

I've decided it would probably be in my best interest to start blogging more frequently. So yeah, going to try and bust one of these out every month or so.

So, projects : 

GAME // 
Title : Ultro City
Game Type : Flash game, AS3
Genre : Action / Platformer / Beat 'em Up
Progress : 15%

Basically this is a game about a young individual in his urban/steam punk home, who through unfortunate circumstances  is placed in unpleasant predicaments attempting to save his city. The game is story driven  though I'm predominantly trying to make an interesting combat system. I've already implemented the majority of the player moves, combo system, and weaponry, and more or less developed the equip menu, and the inventory menu + all equip able items. I have the basic template down for enemies, and so making more enemies is now mostly reliant on the animation and design of new enemies. I have done the majority of the foundations for the game, but the game itself doesn't have much depth, such as playable levels or even a background for that matter. Hopefully I'll have introduced a few playable levels the next time I make a post. But yeah, just take a look at what I have so far. (excuse the backgrounds, they'll be made shortly)

 Upgrade Menu for stats (purchasable with exp    points for every level up)

I also have some of the basic illustrations of characters, I have a few more and also some concept illustrations of level designs but I'm having technical difficulties so I'll have to show them later.

Malia - Friend of protagonist :
Zayne - Ice Dragon, friend of protagonist 

Later on I'll probably have a demo for testing etc.


Title : 1/2s (Halves)
Genre : Drama / Psychological
Progress : 0.1% (More or less completely theoretical)

At the moment I'm currently toying with the idea I've had for a while of making a comic. The comic would be based on two people that're always spending time in each others company, they both share many ideals but are complete polar opposites when it comes to taking action. This comic wouldn't be solely based on the two characters, it would more be a medium to highlight and debate various social and emotional topics I've either misunderstood or have an unusual view on, though there would be a running linear narrative. At the moment I've come up with a character design for on of the characters but nothings solidified.

Again I would have an image, but technical difficulties. I'll upload the illustrations on the next post.

Deviant Art - My various Drawings/Illustrations so far
Newgrounds Profile - Check out my Animations/Games so far

Thanks for reading guys.