Be a Supporter!

One Line At A Time Game! Join In!

  • 1,546 Views
  • 53 Replies
New Topic Respond to this Topic
Max-Vador
Max-Vador
  • Member since: Nov. 12, 2005
  • Offline.
Forum Stats
Member
Level 13
Animator
One Line At A Time Game! Join In! 2012-11-09 14:19:27 Reply

As a community, let's write a script, doesn't matter what it does, but we can only write one line at a time.

Rules

1. No import classes(Let's assume this will run for anyone)
2. AS 3.0
3. Don't negate any prior posts(re-declaring variables or booleans)
4. Lines of brackets, if, and else statements will not count as your line
5. Quote the code above you when adding your code to it.
6. Don't double post to put in 2 lines.
7. You can refer to a movieclips, input fields, etc and we will just add this in the ending compile
8. Have Fun!

var slide:Boolean = false;
4urentertainment
4urentertainment
  • Member since: Aug. 1, 2008
  • Offline.
Forum Stats
Moderator
Level 13
Game Developer
Response to One Line At A Time Game! Join In! 2012-11-09 14:25:02 Reply

This is crazy. Absolutely insane!

But fine

var slide:Boolean = false;
var gravity:Number = 0;
Max-Vador
Max-Vador
  • Member since: Nov. 12, 2005
  • Offline.
Forum Stats
Member
Level 13
Animator
Response to One Line At A Time Game! Join In! 2012-11-09 14:32:43 Reply

At 11/9/12 02:25 PM, 4urentertainment wrote: This is crazy. Absolutely insane!

But fine

it'll be fun when we start to see where it's going

var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;

gonna be weird working some of the weirder variables i'm sure we'll get

egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Supporter
Level 05
Game Developer
Response to One Line At A Time Game! Join In! 2012-11-09 14:45:10 Reply

this actually sounds like a lot of fun :P

var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;

Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to One Line At A Time Game! Join In! 2012-11-09 14:59:35 Reply

var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;
var color:uint = 0xff0000; // red

Can you explain the if/else thing? Does "if (thing == stuff)" count as a line?

Diki
Diki
  • Member since: Jan. 31, 2004
  • Offline.
Forum Stats
Moderator
Level 13
Programmer
Response to One Line At A Time Game! Join In! 2012-11-09 15:03:24 Reply

var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;
var color:uint = 0xff0000; // red

while (true) {}

>:)

Max-Vador
Max-Vador
  • Member since: Nov. 12, 2005
  • Offline.
Forum Stats
Member
Level 13
Animator
Response to One Line At A Time Game! Join In! 2012-11-09 15:04:41 Reply

At 11/9/12 02:59 PM, MSGhero wrote: Can you explain the if/else thing? Does "if (thing == stuff)" count as a line?

like in normal syntax after formatting where it would put if or else on it's own line

//some stuff 
}else{ 
//other stuff

that won't count as a line since you aren't actually writing a line, but what you wrote in your example WOULD be a line since you're writing "if" and the contingency

ProfessorFlash
ProfessorFlash
  • Member since: Oct. 6, 2007
  • Offline.
Forum Stats
Member
Level 32
Programmer
Response to One Line At A Time Game! Join In! 2012-11-09 15:14:23 Reply

var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;
var color:uint = 0xff0000; // red

while (true) {
break;
}

You can solve pretty much any problem you may have with AS3 by consulting the AS3 Language reference.

egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Supporter
Level 05
Game Developer
Response to One Line At A Time Game! Join In! 2012-11-09 15:15:49 Reply

var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;
var color:uint = 0xff0000; // red

while (true) {
	break;
}

I win :D


Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
Max-Vador
Max-Vador
  • Member since: Nov. 12, 2005
  • Offline.
Forum Stats
Member
Level 13
Animator
Response to One Line At A Time Game! Join In! 2012-11-09 15:16:57 Reply

At 11/9/12 03:15 PM, egg82 wrote:
I win :D

while that's negating, i don't mind since he was just code trolling lol

next post can just omit those lines

egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Supporter
Level 05
Game Developer
Response to One Line At A Time Game! Join In! 2012-11-09 15:17:26 Reply

At 11/9/12 03:14 PM, ProfessorFlash wrote: while (true) {
break;
}

damnit, a minute too slow xD


Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
4urentertainment
4urentertainment
  • Member since: Aug. 1, 2008
  • Offline.
Forum Stats
Moderator
Level 13
Game Developer
Response to One Line At A Time Game! Join In! 2012-11-09 15:20:56 Reply

Let's make things interesting

var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;
var color:uint = 0xff0000; // red

while (true) {
break;
}

addEventListener(Event.ENTER_FRAME,Loop);
egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Supporter
Level 05
Game Developer
Response to One Line At A Time Game! Join In! 2012-11-09 15:22:58 Reply

oh, crap, is this in the Flash IDE, then?
I guess we're leaving out public and private as well... This is going to be an interesting game xD

var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;
var color:uint = 0xff0000; // red

while (true) {
break;
}

addEventListener(Event.ENTER_FRAME,Loop);

function Loop(e:Event):void {

}

Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
Max-Vador
Max-Vador
  • Member since: Nov. 12, 2005
  • Offline.
Forum Stats
Member
Level 13
Animator
Response to One Line At A Time Game! Join In! 2012-11-09 15:25:24 Reply

At 11/9/12 03:22 PM, egg82 wrote: oh, crap, is this in the Flash IDE, then?
I guess we're leaving out public and private as well... This is going to be an interesting game xD

we're assuming flash so if you want to refer to movieclips or fields it's permissable

4urentertainment
4urentertainment
  • Member since: Aug. 1, 2008
  • Offline.
Forum Stats
Moderator
Level 13
Game Developer
Response to One Line At A Time Game! Join In! 2012-11-09 15:30:21 Reply

We're gonna do this old school brah.

No on-stage movieclips. Someone should be able to copy/paste the end result in flash or whatever IDE he wants and play a game. So that means drawing your graphics!

var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;
var color:uint = 0xff0000; // red

var player:MovieClip = new MovieClip();

addEventListener(Event.ENTER_FRAME,Loop);

function Loop(e:Event):void {

}
Max-Vador
Max-Vador
  • Member since: Nov. 12, 2005
  • Offline.
Forum Stats
Member
Level 13
Animator
Response to One Line At A Time Game! Join In! 2012-11-09 15:32:46 Reply

At 11/9/12 03:30 PM, 4urentertainment wrote: We're gonna do this old school brah.

No on-stage movieclips. Someone should be able to copy/paste the end result in flash or whatever IDE he wants and play a :game. So that means drawing your graphics!

haha you just turned this into 1000 lines O_o

Max-Vador
Max-Vador
  • Member since: Nov. 12, 2005
  • Offline.
Forum Stats
Member
Level 13
Animator
Response to One Line At A Time Game! Join In! 2012-11-09 15:34:41 Reply

var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;
var color:uint = 0xff0000; // red
 
var player:MovieClip = new MovieClip();
var coin:MovieClip = new MovieClip(); 

addEventListener(Event.ENTER_FRAME,Loop);
 
function Loop(e:Event):void {
 
 }
egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Supporter
Level 05
Game Developer
Response to One Line At A Time Game! Join In! 2012-11-09 15:35:04 Reply

is a whole MovieClip necessary?
aww, all right...

var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;
var color:uint = 0xff0000; // red

var player:MovieClip = new MovieClip();

function init():void {

}

addEventListener(Event.ENTER_FRAME,Loop);

function Loop(e:Event):void {

}

Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
4urentertainment
4urentertainment
  • Member since: Aug. 1, 2008
  • Offline.
Forum Stats
Moderator
Level 13
Game Developer
Response to One Line At A Time Game! Join In! 2012-11-09 15:43:40 Reply

var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;
var color:uint = 0xff0000; // red

var player:MovieClip = new MovieClip();
var coin:MovieClip = new MovieClip(); 

function init():void {

}

function drawPlayer():void {
player.graphics.clear();
}

addEventListener(Event.ENTER_FRAME,Loop);

function Loop(e:Event):void {

}
MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to One Line At A Time Game! Join In! 2012-11-09 15:49:20 Reply

var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;
var color:uint = 0xff0000; // red

var player:MovieClip = new MovieClip();
var coin:MovieClip = new MovieClip(); 

function init():void {

}

function drawPlayer():void {
   player.graphics.clear();
   player.graphics.beginFill(0x00ff00); // <--
}

addEventListener(Event.ENTER_FRAME,Loop);

function Loop(e:Event):void {
  
}

Let's add a notifier to make it clear which line is new

Max-Vador
Max-Vador
  • Member since: Nov. 12, 2005
  • Offline.
Forum Stats
Member
Level 13
Animator
Response to One Line At A Time Game! Join In! 2012-11-09 15:53:26 Reply

var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;
var color:uint = 0xff0000; // red

var player:MovieClip = new MovieClip();
var coin:MovieClip = new MovieClip();

function init():void {

}

function drawPlayer():void {
player.graphics.clear();
player.graphics.beginFill(0x00ff00);
player.graphics.drawRect(0, 0, 100,100); // <--
}

addEventListener(Event.ENTER_FRAME,Loop);

function Loop(e:Event):void {

}

egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Supporter
Level 05
Game Developer
Response to One Line At A Time Game! Join In! 2012-11-09 16:06:08 Reply

var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;
var color:uint = 0xff0000; // red
var player:MovieClip = new MovieClip();
var coin:MovieClip = new MovieClip();

function init():void {
	drawPlayer(); // <--
}

function drawPlayer():void {
	player.graphics.clear();
	player.graphics.beginFill(0x00ff00);
	player.graphics.drawRect(0, 0, 100,100);
}

addEventListener(Event.ENTER_FRAME,Loop);

function Loop(e:Event):void {
	
}

Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
Mattster
Mattster
  • Member since: Nov. 21, 2007
  • Offline.
Forum Stats
Member
Level 20
Game Developer
Response to One Line At A Time Game! Join In! 2012-11-09 16:21:07 Reply

var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;
var color:uint = 0xff0000; // red
var player:MovieClip = new MovieClip();
var coin:MovieClip = new MovieClip();
var coins:Vector.<MovieClip> = new Vector.<MovieClip>(); // <---

function init():void {
	drawPlayer();
}

function drawPlayer():void {
	player.graphics.clear();
	player.graphics.beginFill(0x00ff00);
	player.graphics.drawRect(0, 0, 100,100);
}

addEventListener(Event.ENTER_FRAME,Loop);

function Loop(e:Event):void {
	
}
MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to One Line At A Time Game! Join In! 2012-11-09 16:47:30 Reply

var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;
var color:uint = 0xff0000; // red
var player:MovieClip = new MovieClip();
var coin:MovieClip = new MovieClip();
var coins:Vector.<MovieClip> = new Vector.<MovieClip>();

function init():void {
	drawPlayer();
        addChild(player); // <--
}

function drawPlayer():void {
	player.graphics.clear();
	player.graphics.beginFill(0x00ff00);
	player.graphics.drawRect(0, 0, 100,100);
}

addEventListener(Event.ENTER_FRAME,Loop);

function Loop(e:Event):void {
	
}
Max-Vador
Max-Vador
  • Member since: Nov. 12, 2005
  • Offline.
Forum Stats
Member
Level 13
Animator
Response to One Line At A Time Game! Join In! 2012-11-09 16:52:28 Reply

var instructions:String; //<--
var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;
var color:uint = 0xff0000; // red
var player:MovieClip = new MovieClip();
var coin:MovieClip = new MovieClip();
var coins:Vector.<MovieClip> = new Vector.<MovieClip>();

function init():void {
	drawPlayer();
}

function drawPlayer():void {
	player.graphics.clear();
	player.graphics.beginFill(0x00ff00);
	player.graphics.drawRect(0, 0, 100,100);
}

addEventListener(Event.ENTER_FRAME,Loop);

function Loop(e:Event):void {
	
}
egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Supporter
Level 05
Game Developer
Response to One Line At A Time Game! Join In! 2012-11-09 16:59:55 Reply

var instructions:String;
var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;
var color:uint = 0xff0000; // red
var player:MovieClip = new MovieClip();
var coin:MovieClip = new MovieClip();
var coins:Vector.<MovieClip> = new Vector.<MovieClip>();

function keyDown(keyCode:uint):Boolean { // <-- (yeah, i'm going the cheap route with keyboard events)
	
}

function init():void {
	drawPlayer();
        addChild(player);
}

function drawPlayer():void {
	player.graphics.clear();
	player.graphics.beginFill(0x00ff00);
	player.graphics.drawRect(0, 0, 100,100);
}

addEventListener(Event.ENTER_FRAME,Loop);

function Loop(e:Event):void {
	
}

Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
Sandremss128
Sandremss128
  • Member since: Aug. 22, 2009
  • Offline.
Forum Stats
Supporter
Level 11
Programmer
Response to One Line At A Time Game! Join In! 2012-11-10 01:03:49 Reply

var instructions:String;
var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;
var color:uint = 0xff0000; // red
var player:MovieClip = new MovieClip();
var coin:MovieClip = new MovieClip();
var coins:Vector.<MovieClip> = new Vector.<MovieClip>();

function keyDown(keyCode:uint):Boolean { // <-- (yeah, i'm going the cheap route with keyboard events)
	
}

function init():void {
	drawPlayer();
        addChild(player);
}

function drawPlayer():void {
	player.graphics.clear();
	player.graphics.beginFill(0x00ff00);
	player.graphics.drawRect(0, 0, 100,100);
	player.graphics.endFill();				//<-- end those fills damn it :P
}

addEventListener(Event.ENTER_FRAME,Loop);

function Loop(e:Event):void {
	
}
MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to One Line At A Time Game! Join In! 2012-11-10 01:27:06 Reply

var instructions:String;
var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;
var color:uint = 0xff0000; // red
var player:MovieClip = new MovieClip();
var coin:MovieClip = new MovieClip();
var coins:Vector.<MovieClip> = new Vector.<MovieClip>();

function keyDown(keyCode:uint):Boolean {
	
}

function init():void {
	drawPlayer();
        addChild(player);
}

function drawPlayer():void {
	player.graphics.clear();
	player.graphics.beginFill(0x00ff00);
	player.graphics.drawRect(0, 0, 100,100);
	player.graphics.endFill();
}

function initCoins():void { // <--

}

addEventListener(Event.ENTER_FRAME,Loop);

function Loop(e:Event):void {
	
}
egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Supporter
Level 05
Game Developer
Response to One Line At A Time Game! Join In! 2012-11-10 01:30:49 Reply

var instructions:String;
var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;
var color:uint = 0xff0000; // red
var keys:Vector.<Boolean> =  new Vector.<Boolean>; // <--

var player:MovieClip = new MovieClip();
var coin:MovieClip = new MovieClip();
var coins:Vector.<MovieClip> = new Vector.<MovieClip>();

function keyDown(keyCode:uint):Boolean {
	
}

function init():void {
	drawPlayer();
        addChild(player);
}

function drawPlayer():void {
	player.graphics.clear();
	player.graphics.beginFill(0x00ff00);
	player.graphics.drawRect(0, 0, 100,100);
	player.graphics.endFill();
}

function initCoins():void {
	
}

addEventListener(Event.ENTER_FRAME,Loop);

function Loop(e:Event):void {
	
}

Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to One Line At A Time Game! Join In! 2012-11-10 01:40:32 Reply

Wait...addEventListener needs to go inside a function...

I'll let you finish your key stuff since I've never seen it done that way o.o
var instructions:String;

var slide:Boolean = false;
var gravity:Number = 0;
var death:Boolean = false;
var jump:Number = 0;

var color:uint = 0xff0000; // red

var keys:Vector.<Boolean> =  new Vector.<Boolean>;

var player:MovieClip = new MovieClip();

var coin:MovieClip = new MovieClip();
var coins:Vector.<MovieClip> = new Vector.<MovieClip>();

function keyDown(keyCode:uint):Boolean {
	
}

function init():void {
	drawPlayer();
        addChild(player);
}

function drawPlayer():void {
	player.graphics.clear();
	player.graphics.beginFill(0x00ff00);
	player.graphics.drawRect(0, 0, 100,100);
	player.graphics.endFill();
}

function initCoins():void {
	
	for (var i:uint = 0; i < 10; i++) {  // <--

	}
}

addEventListener(Event.ENTER_FRAME,Loop);  // ???

function Loop(e:Event):void {
	
}