Search Blog Posts

Posts Tagged ‘ActionScript’

Building Beesteroids!

Wednesday, October 22nd, 2008

Well since last Friday and this week it has been a fairly hardcore when it comes to action scripting, if only i could write essays this well! I have finaly completed a near complete game ready to show Nigel. The make of the game is “Beesteroids”. The game is a single player shoot-em up in a modern touch up of the classic Asteroids game.

If you fancy a go drop me an email and i’ll happily give you the link to have a play.

The Intro Screen:

 

Instructions Screens:

 

Game Play:

 

The scoreboard:

Thanks to Tom Wotton for being honest (hes the one who ruined my screen grab by claiming he is a gay boy!).

IDAT311 Proposal

Friday, October 17th, 2008

“Create something which does something”

What will I make?

For this module I will design and create a working prototype of a single player shooter game. I plan to produce a modern version of the classic asteroids game released in 1979 by Atari Inc. Using Adobe Flash CS3 and the Flash Media Server 3 I will create an updatable scoring system, which will enable a real time data, users will be able to potentially watch other players climb the rankings on the score board. Sticking to the set criteria I will use an object orientated approach to the design and structure of the coding. Objects will also take on “lifelike behaviours”, for this I will give objects their own set of individual characteristics, for example dynamic speed, gravity and so forth. Bee’s will fly and the plane will have a thrust like momentum, bullets will also act in a projectile way relevant to the current speed of the plane.

Game functionality:

Following the original concept of asteroids, with a modern touch the user will be presented with a series of levels on which he/she must progress. This is done by killing enemy bees on the stage, this will enable the user to gain points and advance to the next level. Collisions with the bees results in damage to the players health, this adds to the gaming experience giving the game some level of difficult , which will intensify as the user progresses.

Things to consider:

As the game will be creating objects dynamically along with movieclips and actionscript code (a significant number of them), I will need to consider how I will manage these objects and create effective ways to reduce and remove them when they are no longer needed, reducing the overall load on the operating system. Updating the score via the FMS will also be done in a way that reduces network traffic, enabling even the lowest of bandwidth users the opportunity to run the game effectively without lagging or delay.

To minimise code and to utilise simpler/effective ways of coding I will adopt the object orientated way of coding, creating 3 master actionscript classes Bee.as, Bullet.as, and Plane.as. Each of which will have their own characteristics and functions.

Actionscript Flip Movieclip

Thursday, October 16th, 2008

Simple short and sweet. If you have ever needed to flip a movieclip so its infact facing the other way use the following:

mymovieclipname._xscale=-100;

Shuffling an Array in Actionscript

Wednesday, May 28th, 2008

Using arrays in flash is always a handy and efficient way to work with variables etc. But some times its handy to be able to shuffle the results in the array, for example when creating a quiz to allow a random set of questions.

Using the code below (actionscript 2.0 but should still work in 3.0) we create an array and trace the results.

The Code

Array.prototype.shuffle=function(){
for(i=0;i<this.length;i++){
var tempvar=this[i];
var ranVar=random(this.length);
this[i]=this[ranVar];
this[ranVar]=tempvar;
}
}
myArray=["flash","dreamweaver","illustrator","in-design","photoshop"];
myArray.shuffle();
trace(myArray);

This would return a trace with answers such as:
‘dreamweaver, flash, in-design, photoshop, illustrator’

For loops in Flash - Setting global variables

Tuesday, May 27th, 2008

A common ‘mistake’ when working with any programming language is over use of code, or rather not being efficient with code. The most common mistake, and most easily rectified is repetition of similar or exact snippet of code, over and over and over and over and over and over again…. just like the example actionscript code shown below.

Example of Inefficient use of code

_global.variable1 = 0;
_global.variable2 = 0;
_global.variable3 = 0;
_global.variable4 = 0;
_global.variable5 = 0;
_global.variable6 = 0;
_global.variable7 = 0;
_global.variable8 = 0;
_global.variable9 = 0;
_global.variable10 = 0;
_global.variable11 = 0;
_global.variable12 = 0;
_global.variable13 = 0;

In the above example we are simply setting a whole load of global variables in flash. You can imagine that if the number of variables increased, say for example 40 variables, you would need 40 lines of code to achieve the desired result.

To simplify this process i have created a simple snippet of code could be contained within a for loop, creating and setting all of these variables in only 3 lines of code. By using a for loop we can add or decrease the amount of variables increased by changing just one variable.

Efficient use of code

/// set how many variables should be created
number_of_times = 13;

/// loop 13 times creating 13 variables with the value of 0
for (var i = 1; i<(number_of_times+1); i++) {
_global["slide"+i] = 0;
}

The Benefits

This makes it much easier to increase or decrease the amount of variables created, simply change “number_of_times = 13″ to a greater number.
If for example we wanted to rename the varaibale from “variable” to “myVariable” we would ammend one line of code… not 13 as shown in the initial example.

This method can be applied in a variet of different ways helping you become more productive and efficent with your code.

I hope this simple little explanation helps someone out.

The Concept behind the project

Tuesday, June 12th, 2007

The Readymade Generator – Alan Bourne – 273616 – iDAT203 – Conceptual Art

The beginning
Initially this project started life tackling the idea of concepts and the methods and approaches with which we come up with concepts. The direction in which I approached this idea was by developing ideas and prototypes to understand how we create concepts, and more importantly what is a good concept? To try to answer this problem I set myself the challenge of designing a concept generator. This would hopefully benefit me and help tackle the question to provide a concept for me to work with. After only 2 weeks developing the generator my ideas and concept shifted.

The concept generator has evolved into the Readymade Generator which is presented to you today. It can be argued that the concept generator did the job exactly as that it was designed for. From the initial concept generator prototype the readymade generator was born.

Concept
My concept is now clear and it challenges the use of online sources to create user generated readymade art. If a readymade is “an object manufactured for some other purpose, presented by an artist as a work of art” (Readymades no date) why can’t that object be from an online source?
The main idea and workings behind the Readymade Generator is to claim objects from the internet (such as images or text) and then allow an artist to rearrange the design and layout, giving the objects new meaning.

The images produced by the Readymade Generator in collaboration with the user or ‘Artist’ raise the same point as Marcel Duchamp did with his Readymades. The generated images can “be seen as a sort of irony to defining art itself, because the images say here it is, a thing that I call art, I didn’t even make it myself” (Ades et al.1999; 151).

The produced work is determined by the artist, he or she must set down the rules of the content by specifying the keywords on which the system performs its searches.

When all of the objects have been loaded into the system the user must then decide which objects should be included in the final piece. Image and text choices have to be made and layout and position of the objects are also factors that the artist must also decide. These are the processes any artist must make whether the work is of a digital or physical nature.

The artist then has the choice or deciding to include their work in the online gallery, or to discard the work entirely. The images in the gallery have been previously uploaded by other artists, these artworks and images produced from the Readymade generator are products of the artist.

By including an online art work gallery artists can submit their work, this is included for a reason. Like many artists not all of their work is displayed in galleries, some artists work gets left behind, forgotten about or the artist is just not happy with the work. By allowing users to upload their work they are saying that the work is complete, finished or done with. This is also true for the inclusion of an artist signature which the artist must make the choice to sign the work.

The images may seem meaningless and of an unaesthetic nature, however this is the exact point that the project is trying to create. The produced images are designed to take the meaning of the existing images and text out of context, to give them a new meaning.

Technical implementation
The system has been created in Adobe Flash making it accessible to all users who have the internet or access to a PC/Mac. By using a number of current technologies the system semantically pulls information from the web depending on user keyword searches. The information and data is displayed using Actionscript 2 scripting making the system dynamic and ever changing, this also allows user interaction with the retrieved objects, which in turn results in some freedom of expression for the individual artist and creates difference in the resulting piece. PHP coding is also used to obtain website html code which is later used in the application for data filtering and dynamic display. The scripts website location is determined by the system rules and user keywords. This information then builds a URL for the PHP code to rip.

Currently the system uses three online sources for its content. Google was decided on early in the project development stage as research showed that its image results are one of the best, this also provides advanced image search results which are retrieved and dynamically loaded. By using Google image search the system is able to claim resources from the entire web. Based on keyword search relevancy, images are pulled from Google and displayed in a random fashion. Their layer hierarchy when stacked, is based on there position in Google’s search page, so the more relevant images appear much clearer. As Google rescans content on a regular basis the position of the images will change, this also allows for expansion of the project as new images appear online and are scanned by Google, they too can be included.

English Wikipedia pages have also been integrated as part of the search, if the precise words are entered correctly; content from Wikipedia is loaded into the title area and the scrollable text box area. The reason Wikipedia was used for this content is its Web 2 properties, the content is ever changing and this allows expansion for the project, as the site develops more and more information will be retrieved. Questions have been raised regarding Web 2 and its validity of information but for the purpose of this project the meaning of the text is irrelevant the content is what counts.

Finally the last resource that has been included is Artistquotes.net, this has been implemented to include famous artist quotes, this is highly dependant on keyword searches but returns a number of relevant results when the correct names are used.

Evaluation
I believe that the system I have created backs up all of the research and theory behind the concept and design. As discussed earlier it has been designed with the idea of expansion in mind, by using the ever-growing online sources the possibilities are infinite. At present the system is still very limited as Artists Quotes and Wikipedia results require accurate user input but due to the time constraints this is something that had to be over looked slightly. In the future I see the system implementing voice recognition, this could also be linked up to music to generate the readymade artwork.

Bibliography
Ades, D., Cox, N. & Hopkins, D. (1999), Marcel Duchamp, Thames and Hudson, London. Godfrey, T. (1998), Conceptual Art, Phaidon Press Limited, London. Paul, C. (2003), Digital Art, Thames and Hudson, London. Stallabrass, J. (2003), Internet Art , Tate Publishing, London. Wood, P. (2002), Movements in Modern Art - Conceptual Art, Tate Publishing, London.

Webography
Readymades (no date) [online] Available: http://www.artlex.com/ArtLex/r/readymade.html [date accessed: 08 April 2007]

Where to Start

Thursday, April 12th, 2007

So I still have no concept! So it’s time to make something to really get this module going.
As discussed earlier about my proposal to create a concept generator. This is where I will base my starting point. The plan is to generate a concepts from online resources all in one place, a tool used for research, development and implementation of a final product. From this I hope to discover what, if any concept I can create/focus on.

The plan so far is to create an application in flash which will provide search engine results in one location, witling down results to a bare minimum to help research a key area. This I will do using a number of technologies, Flash, Actionscript 2, PHP, Google Web and Image Search, Artistquotes.net and Wikipedia for some web 2 content. 

With this information the user will be able to see artists work, links to websites containing information about their work and any other relevant topics.

Rite on with coding it.

© Copyright 2003-2008 Minimalistic Designs | Terms | Links | Sitemap
Website Design Liskeard - www.minimalistics.co.uk