How Hard Is It to Make a Shockwave/Flash Game?

question anything pertaining to the craft
Post Reply
Maj
Posts: 6753
Joined: Wed Dec 13, 2006 12:53 am
Location: Los Angeles
Contact:

How Hard Is It to Make a Shockwave/Flash Game?

Post by Maj »

This topic has got nothing to do with combo videos, but it belongs here cuz this is the de facto projects forum.

Assuming that we have all the artwork we need (since we'll be using SF2 sprites for the most part), how hard is it to build something that feels like a Street Fighter game? Do i need extensive programming knowledge (cuz i have none) or are the design tools user-friendly?

By the way i'm thinking of a strictly One-Player game so there's no need to worry about versus play or netcode. Keyboard controls are fine.
Xenozip.
Posts: 1574
Joined: Mon Dec 18, 2006 2:24 pm
Location: N.EC
Contact:

Re: How Hard Is It to Make a Shockwave/Flash Game?

Post by Xenozip. »

Macromedia Flash uses something called ActionScript, which is a mushy and bastardized form of Java with some chunks of other stuff thrown in.

You wouldn't necessarily need to have gone to school and learned programming by the book in order to accomplish such a task, but if you are starting with zero knowledge then it's going to be a huge learning process. This could either be a very good thing or a very bad thing depending on a couple factors that could either help the situation or exacerbate preexisting issues.

First being math. If you enjoy mathematics then you're in the green. If not, you could still get it done but it will make the task more troublesome.

Second being the kind of self-taught learner you are. In my experience there's two kinds: the ones that get extremely aggravated when they know what they want but don't know how to do it, and the ones that actually become excited when they figure out what they want and are eager to learn how to do it. If you're in the former group, then you could still possibly get it done, maybe even solo, but it's going to be a very arduous task that isn't likely to get completed very quickly.

If you have both working against you then you might need to collaborate with some one that has experience in that sort of thing.

Hmm, well. Let me dig up some old projects of mine so you can take a peek at what action script looks like.

Code: Select all

this.onLoad = function() {
	_root.numba = 200;
	_root.numba2 = 70;
	_root.numba3 = 167;
	_root.numba6 = 1;
	TextField5 = "";
	TextField6 = "He";
	text = "Hello everybody. How are you today? We hope you're doing well. Things are looking on the up and up for us over here. The weather is nice and we're all having a blast!";
};
this.onEnterFrame = function() {
	if (_root.numba>2) {
		newNum = _root.numba-8;
		_root.numba = newNum;
		_root.daNum = newNum;
		// asdf		
		// asdf		
		myTextFormat = new TextFormat();
		myTextFormat.leading = newNum;
		myTextField.setTextFormat(myTextFormat);
		// asdf		
		// asdf		
		TextFormat2 = new TextFormat();
		TextFormat2.indent = newNum;
		TextField2.setTextFormat(TextFormat2);
		// asdf		
		// asdf		
		TextFormat4 = new TextFormat();
		TextFormat4.leftMargin = newNum;
		TextField4.setTextFormat(TextFormat4);
	} else {
		break;
	}
	if (_root.numba2<11) {
		break;
	} else {
		newNum2 = _root.numba2-3;
		_root.numba2 = newNum2;
		TextFormat3 = new TextFormat();
		TextFormat3.size = newNum2;
		TextField3.setTextFormat(TextFormat3);
	}
	// Controlls for
	// TextField5
	if (_root.numba3<2) {
		break;
	} else {
		newNum3 = _root.numba3-2;
		_root.numba3 = newNum3;
		outPut = substring(text, newNum3, 2);
		TextField5 = output+TextField5;
	}
	// Controlls for
	// TextField6
	if (_root.numba6>167) {
		break;
	} else {
		newNum6 = _root.numba6+2;
		_root.numba6 = newNum6;
		outPut2 = substring(text, newNum6, 2);
		TextField6 = TextField6+output2;
	}
};
The above is a very simple text doohickie that was intended as an example of ways to display text and you can see what it does here:
http://www.justnopoint.com/xenoblip/tmp/text_toyz.html

Code: Select all

_root.box3._alpha = 85;
_root.box4._alpha = 70;
_root.box5._alpha = 55;
_root.box6._alpha = 40;
_root.box7._alpha = 25;
_root.box8._alpha = 10;
// asdf
_root.abox3._alpha = 85;
_root.abox4._alpha = 70;
_root.abox5._alpha = 55;
_root.abox6._alpha = 40;
_root.abox7._alpha = 25;
_root.abox8._alpha = 10;
//asdf
_root.bbox3._alpha = 80;
_root.bbox4._alpha = 60;
_root.bbox5._alpha = 40;
_root.bbox6._alpha = 20;
_root.bbox7._alpha = 25;
stop();

___________________________________

onClipEvent (load) {
	Afriction = .2;
	Aspeedratio = .55;
	Ayspeed = 2;
	_root.targY = 100;
}
onClipEvent (enterFrame) {
	Ayspeed = Ayspeed*Afriction+(_root.targY-_y)*Aspeedratio;
	this._y += Ayspeed;
}
____________________________________

onClipEvent (enterFrame) {
	onRollOver = function () {
		_root.targY = this._y;
		_root.targY2 = this._y;
	};
}
The above is another stupid doohickie to demonstrate motion when you do shit with shit, and stuff, seen here (hover your mouse over the stupid gray boxes):
http://www.justnopoint.com/xenoblip/tmp/laffor2.html

Code: Select all

bounce = -.3;
grav = .5;
numPaddles = 6;
oneSlice = 360 / numPaddles;
count = 0;
for (i = 0; i < numPaddles; i++)
{
	pad = attachMovie("paddle", "p" + count, count++);
	pad._x = 520;
	pad._y = 230;
	pad._rotation = pad.base = i * oneSlice;
}
function checkp(ball, pad)
{
	var bounds = pad.getBounds(_root);
	if (ball._x > bounds.xMin && ball._x < bounds.xMax)
	{
		var dx = ball._x - pad._x;
		var dy = ball._y - pad._y;
		var angle = pad._rotation * Math.PI / 180;
		var cosa = Math.cos(angle);
		var sina = Math.sin(angle);
		var y1 = dy * cosa - dx * sina;
		var vy1 = ball.vy * cosa - ball.vx * sina;
		if (y1 > -10 && y1 < vy1)
		{
			var x1 = dx * cosa + dy * sina;
			var vx1 = ball.vx * cosa + ball.vy * sina;
			y1 = -10;
			vy1 *= bounce;
			dx = x1 * cosa - y1 * sina;
			dy = y1 * cosa + x1 * sina;
			ball._x = pad._x + dx;
			ball._y = pad._y + dy;
			ball.vx = vx1 * cosa - vy1 * sina;
			ball.vy = vy1 * cosa + vx1 * sina;
			vr -= vy1 * dx * .001;
		}
	}
}
function checkfloor(ball)
{
	var bounds = floor.getBounds(_root);
	if (ball._x > bounds.xMin && ball._x < bounds.xMax)
	{
		var dx = ball._x - floor._x;
		var dy = ball._y - floor._y;
		var angle = floor._rotation * Math.PI / 180;
		var cosa = Math.cos(angle);
		var sina = Math.sin(angle);
		var y1 = dy * cosa - dx * sina;
		var vy1 = ball.vy * cosa - ball.vx * sina;
		if (y1 > -10 && y1 < vy1)
		{
			var x1 = dx * cosa + dy * sina;
			var vx1 = ball.vx * cosa + ball.vy * sina;
			y1 = -10;
			vy1 *= bounce;
			dx = x1 * cosa - y1 * sina;
			dy = y1 * cosa + x1 * sina;
			ball._x = floor._x + dx;
			ball._y = floor._y + dy;
			ball.vx = vx1 * cosa - vy1 * sina;
			ball.vy = vy1 * cosa + vx1 * sina;
		}
	}
}
onEnterFrame = function ()
{
	if (getTimer() - start > 1000)
	{
		start = getTimer();
		ball=attachMovie("ball", "b" + count, count++, {_x:50, _y:10, vx:Math.random(), vy:Math.random(), onEnterFrame:ballMove});
		ball.gotoAndStop(Math.floor(Math.random()*7)+1);
	}
	vr *= .95;
	baseRot += vr;
	wheel._rotation=baseRot;
	for (i = 0; i <= numPaddles; i++)
	{
		_root["p" + i]._rotation = baseRot + _root["p" + i].base;
	}
};
function ballMove()
{
	this._rotation+=this.vx*Math.PI;
	this.vy += grav;
	this._x += this.vx;
	this._y += this.vy;
	if (this._x > 540 || this._x < 0 || this._y > 400)
	{
		this.removeMovieClip();
	}
	var pp;
	for (var i = 0; i <=numPaddles; i++)
	{
		pp = _root["p" + i];
		checkp(this, pp);
	}
	checkfloor(this);
	checkwheel(this);
}
function checkwheel(ball)
{
	var dx = ball._x - wheel._x;
	var dy = ball._y - wheel._y;
	var dist = Math.sqrt(dx * dx + dy * dy);
	if (dist < 60)
	{
		var angle = Math.atan2(dy, dx);
		ball._x = wheel._x + Math.cos(angle) * 60;
		ball._y = wheel._y + Math.sin(angle) * 60;
		var ballspeed = Math.sqrt(ball.vx * ball.vx + ball.vy * ball.vy);
		ball.vx = Math.cos(angle) * ballspeed * -bounce;
		ball.vy = Math.sin(angle) * ballspeed * -bounce;
	}
}
The above is an example of using math to simulate physics. Which is what you'd be doing a lot of if you created a fighter. Output here:
http://www.justnopoint.com/xenoblip/eyeamp.html

And one last example..

Code: Select all

 fscommand("fullscreen", "false");
fscommand("showmenu", "false");
fscommand("allowscale", "false");
_root.daLogue.daCongrat._visible = false;
_root.daLogue.daRes = "<b>Japanese kana, Puzzle 3: katakana 3</b>.<br><br>Instructions:<br>To begin the puzzle, press the "Begin" button below. Click and drag the Japanese katakana that appear on the left side of the puzzle once the puzzle has begun. Match the katakana with the corresponding Roman letters on the right.<br><br>For more information about this puzzle, katakana, hiragana, and kanji, please scroll down and view the rest of this page.<br><br>Note: The kana scramble each time you play.";
highest = "5"
for (name in _root) {
	if (typeof (_root[name]) == "movieclip") {
		_root[name]._x = Math.ceil(_root[name]._x);
		_root[name]._y = Math.ceil(_root[name]._y);
	}
}
daGrab = function () {
	rand = Math.floor(Math.random()*daCount);
	doIt = daRay[rand];
	daRay.splice(rand, 1);
	daCount = daCount-1;
};
daScramble = function () {
	_root.daLogue._visible = false;
	_root.daLogue.daCongrat._visible = false;
	daTries = 0;
	daWrong = 0;
	_root.daLogue.daRes = "";
	_root.daCW = "";
	// additional pieces
	daRay = new Array("P1", "P2", "P3", "P4", "P5", "P6", "P7", "P8", "P9", "P10");
	// # of pieces
	daCount = 10;
	// i < piece #
	for (i=1; i<11; i++) {
		with (_root["P"+i]) {
			gotoAndStop(1);
			noSnap = "";
		}
	}
	// 1-5
	daGrab();
	_root[+doIt]._x = 40;
	_root[+doIt]._y = 40;
	daGrab();
	_root[+doIt]._x = 40;
	_root[+doIt]._y = 110;
	daGrab();
	_root[+doIt]._x = 40;
	_root[+doIt]._y = 180;
	daGrab();
	_root[+doIt]._x = 40;
	_root[+doIt]._y = 250;
	daGrab();
	_root[+doIt]._x = 40;
	_root[+doIt]._y = 320;
	// 6-10
	daGrab();
	_root[+doIt]._x = 110;
	_root[+doIt]._y = 40;
	daGrab();
	_root[+doIt]._x = 110;
	_root[+doIt]._y = 110;
	daGrab();
	_root[+doIt]._x = 110;
	_root[+doIt]._y = 180;
	daGrab();
	_root[+doIt]._x = 110;
	_root[+doIt]._y = 250;
	daGrab();
	_root[+doIt]._x = 110;
	_root[+doIt]._y = 320;
};
function strDrag(whichP) {
	xCor = _root[whichP]._x;
	yCor = _root[whichP]._y;
	startDrag(_root[whichP], true, 31, 31, 449, 349);
}
function sNap(whichP) {
	stopDrag();
	daDrop =  substring(eval(_root[whichP]._droptarget)._name, 1, 1);
	if (daDrop == "B") {
		checkIt(whichP);
		daTries = daTries+1;
		isItDone();
		_root[whichP]._x = eval(_root[whichP]._droptarget)._x;
		_root[whichP]._y = eval(_root[whichP]._droptarget)._y;
		_root[whichP].noSnap = "yes";
	} else {
		_root[whichP]._x = xCor;
		_root[whichP]._y = yCor;
	}
}
function checkIt(whichP) {
	daPiece = _root[whichP]._name;
	daChecked =  substring(eval(_root[whichP]._droptarget)._name, 2, 2)
	if (daPiece == "P"+daChecked) {
		_root[whichP].gotoAndStop(2);
		daCW = "Correct.<br>(tadashii)";
	} else {
		_root[whichP].gotoAndStop(3);
		daWrong = daWrong+1;
		daCW = "Wrong.<br>(chigau)";
	}
}
function isItDone() {
	// daTries >= piece #
	if (daTries>=10) {
		daCW = "";
		_root.daLogue._visible = true;
		daPer = Math.round(daWrong/daTries*100);
		daRight = daTries-daWrong;
		if (daPer<30) {
			_root.daLogue.daRes = "You got "+daRight+" out of "+daTries+" correct.<br>Score: "+Math.round(daRight/daTries*100)+"%<br><br>Good job, you passed!<br><br>Try to get 100%";
		} else {
			_root.daLogue.daRes = "You got "+daRight+" out of "+daTries+" correct.<br>Score: "+Math.round(daRight/daTries*100)+"%<br><br>Sorry, you failed.<BR>A passing grade is 70% or higher.<br>Try again!";
		}
		if (Math.round(daRight/daTries*100) == 100) {
			_root.daLogue.daCongrat._visible = true;
			_root.daLogue.daRes = "You got "+daRight+" out of "+daTries+" correct.<br>Score: "+Math.round(daRight/daTries*100)+"%<br><br>Good job, you passed!<br><br>You scored 100%<br>Congratulations!";
		}
	}
}
stop();
The above catastrophe is an example of creating an array of items, then scrambling the order of items by process of elimination. Basically, it identifies each object and then randomly selects one of them from the list, places it on the field, and eliminates that item from the list. An extremely roundabout way of doing it but this project is about 5 years old, lol. Anyway, output here:
http://www.justnopoint.com/xenoblip/kat ... zzle3.html
Looks like Jolly Ranchers & Baskin's Sherbet.
Xenozip.
Posts: 1574
Joined: Mon Dec 18, 2006 2:24 pm
Location: N.EC
Contact:

Re: How Hard Is It to Make a Shockwave/Flash Game?

Post by Xenozip. »

God, looking at old code is pain.

["What the fuck was I thinking?"]xN
Looks like Jolly Ranchers & Baskin's Sherbet.
Maj
Posts: 6753
Joined: Wed Dec 13, 2006 12:53 am
Location: Los Angeles
Contact:

Re: How Hard Is It to Make a Shockwave/Flash Game?

Post by Maj »

Damn. I was hoping it would be a lot simpler than that. I've got no problem with math but i'd have to learn programming almost from scratch. After that it would probably take forever to construct anything resembling a Street Fighter engine. Since i'm a rank amateur, the first working draft would undoubtedly turn into garbage and i'd have to start all over at least once. Needless to say i don't have that kind of time.
Xenozip.
Posts: 1574
Joined: Mon Dec 18, 2006 2:24 pm
Location: N.EC
Contact:

Re: How Hard Is It to Make a Shockwave/Flash Game?

Post by Xenozip. »

What was the purpose, anyhow?

You could try Mugen. I know, "lol mugen". But mugen is mostly only crap because the people who make builds don't put any real effort into making the system mechanics any good or similar to any game. It's actually capable of mimicking games rather well, it's just that out of the 500+ builds I've seen there's only one single one that actually did.
Looks like Jolly Ranchers & Baskin's Sherbet.
Maj
Posts: 6753
Joined: Wed Dec 13, 2006 12:53 am
Location: Los Angeles
Contact:

Re: How Hard Is It to Make a Shockwave/Flash Game?

Post by Maj »

In this particular case my problem with Mugen is that it's not accessible enough. What i want to do is intended to be 100% mainstream.
Xenozip. wrote:What was the purpose, anyhow?
The plan was to use this thread to explain all that, but this tangent seems like a good point to start a new thread. I'll move this one to the Resources section and we can revert to it in the unlikely event that someone else has general questions regarding Flash games.
Xenozip.
Posts: 1574
Joined: Mon Dec 18, 2006 2:24 pm
Location: N.EC
Contact:

Re: How Hard Is It to Make a Shockwave/Flash Game?

Post by Xenozip. »

Buh?
Looks like Jolly Ranchers & Baskin's Sherbet.
Post Reply