Recent posts by BraydenBlack on Kongregate

Flag Post

Topic: Game Programming / AS3 - Fluid creation & class implementing issue

I used that tutorial too! The outcome of what i got looks like this definately not the best but if your wondering how i did it the source code can be found here if you have any questions about whats going on in it feel free to ask here (just know its definately not the best way to do it, im just not the best programmer ;) )

 
Flag Post

Topic: Game Programming / Circle Reaction

That tutorial is okay… it doesn’t really explain anything though, so that doesn’t help very much if your trying to understand the concepts behind it. But if you use that tutorial make sure you check if the distSquared < radiiSquared of the two balls, then take the square root of your distance once you know there’s a collision for added performance. And i believe several others have already gone over this topic quite thoroughly in other threads.

 
Flag Post

Topic: Game Programming / Coding on Timeline?

I make all my games with the timeline… i just prefer it and so does 2DArray i believe and he still manages to build nice games, although i will vouch that classes are better and are very necessary and useful, and with the timeline you gotta have a hawk eye when scrolling through 3000+ lines of code ;)

Originally posted by Drakim:

In short, don’t do it. Stay away from timeline coding and drugs.

I definitely agree with this.

 
Flag Post

Topic: Game Programming / Simple Liquid Simulation

This topic made me wanna try n re-create the effect in spewer, so i made a slime-like liquid simulation here It can get pretty laggy after 500 particles because of all the collisions but i’m working on optimizing it. Click-drag to spawn slime particles.

 
Flag Post

Topic: Game Programming / AS3, this elastic collision calculation for circles doesn't work

I wrote my circle v circle collision based on this, its written for java but its basically the same.

 
Flag Post

Topic: Game Programming / Camera

Originally posted by Senekis93:

Parenthesis.
(bg.x=-p.x -stage.stageWidth)*.5;

Will that even run, lol?

 
Flag Post

Topic: Game Programming / PGGC #3: Voting

Elyzius, Vesperbot, ErlendHL

 
Flag Post

Topic: Game Programming / Error 1009 Help.

Add the enter_frame listener after the object is on the stage?

 
Flag Post

Topic: Game Programming / Indie Goodbye

Why does this have to be on my birthday :(

 
Flag Post

Topic: Game Programming / iPhone Apps

Android > iPhone.

 
Flag Post

Topic: Game Programming / What music do you like listening to while programming?

Aint nothing like a little wu-tang clan to get you pumped for some programming.

 
Flag Post

Topic: Game Programming / Remove animation after completion

There’s no ‘parent’ in as2 but there is ‘_parent’.

 
Flag Post

Topic: Game Programming / Show us a screenshot of what you're working on!

Ballistic II.

 
Flag Post

Topic: Game Programming / Using addchild to add the same movie clip twice

Loop?


for(var i:int = 0; i < numBullets; i++) {
        var bullet:Bullet = new Bullet();
        stage.addChild(bullet);
        bullet.rotation = this.rotation;
	bullet.x = this.x-(i*10);
	bullet.y = this.y-(i*10);
	shootTimer = 0;
}

 
Flag Post

Topic: Game Programming / A* with NO diagonals

For my A* i did pretty much what adamkingdom suggested, and it looks exactly how he describes it.


if(cell.xpos - 1 >= 0) {
	adjacentCell = grid[cell.xpos - 1][cell.ypos];
	if(adjacentCell.cellType != FILLED && closedList.indexOf(adjacentCell) == -1) {
		adjacentCells.push(adjacentCell);
	}
}

if(cell.ypos - 1 >= 0) {
	adjacentCell = grid[cell.xpos][cell.ypos - 1];
	if(adjacentCell.cellType != FILLED && closedList.indexOf(adjacentCell) == -1) {
		adjacentCells.push(adjacentCell);
	}
}

if(cell.xpos + 1 <= gridWidth) {
	adjacentCell = grid[cell.xpos + 1][cell.ypos];
	if(adjacentCell.cellType != FILLED && closedList.indexOf(adjacentCell) == -1) {
		adjacentCells.push(adjacentCell);
	}
}

if(cell.ypos + 1 <= gridHeight) {
	adjacentCell = grid[cell.xpos][cell.ypos + 1];
	if(adjacentCell.cellType != FILLED && closedList.indexOf(adjacentCell) == -1) {
		adjacentCells.push(adjacentCell);
	}
}

Only checks cell’s that are to the immediate left,right,up and down of it. Also makes sure it doesn’t have a tile there already and that its not in the closed list.

 
Flag Post

Topic: Game Programming / Rays For Line Of Sight - Am I On The Right Track?

Probably not the best way to go about doing this, but here.. this might be helpful, looks more organized then your code is, thats for sure…

 
Flag Post

Topic: Game Programming / GiTD [#27] Entries and Discussion

Originally posted by dragon_of_celts:

Do multiple personalities count?

Sure they do! Imagine if they were all talented too. Where ones a programmer, artist and a musician. You’d be an indie dev legend ;)

 
Flag Post

Topic: Game Programming / GiTD [#27] Entries and Discussion

I think ill definitely be doing this one, haven’t participated in a while.

 
Flag Post

Topic: Game Programming / Why isn't my game saving on kong?

Ahhh… x.x thanks senekis… :P Now i feel stupid haha.

 
Flag Post

Topic: Game Programming / Why isn't my game saving on kong?

When i test my game locally, everything saves fine. But when i upload the game to kongregate, the game doesn’t save, is there something else i should be doing? And can someone test this themselves? (F & F) The game auto-saves.

This is how im saving.


var saveFile:SharedObject;

function checkSaveFile():void { // First function called in the game
	saveFile = SharedObject.getLocal("FFsave");
	if(saveFile != null) {
		curLevel = saveFile.data.curLevel;
		if(saveFile.data.curAttempts>1) curAttempts = saveFile.data.curAttempts-1;
		if(curLevel > 3) { //saveFile has completed tutorial levels
			option1Enabled = true;
			showTutorial = false;
		}
	} else saveGame();
}

function saveGame():void { //saves curren level and attempts to saveFile
	saveFile.data.curLevel = curLevel;
	saveFile.data.curAttempts = curAttempts;
	saveFile.flush();
}

And the saveGame() function is being called regularily throughout the game whenever the player completes a level/dies or beats the game.

Thanks to anyone who helps!

 
Flag Post

Topic: Game Programming / showing damage (solved)

= is for assignment while == is for equality

 
Flag Post

Topic: Game Programming / showing damage (solved)

Have a look at this and/or this

 
Flag Post

Topic: Game Programming / random for as3?(solved)

I found this tutorial helpful actually when i was learning. And Math.random() is in as2 and as3

 
Flag Post

Topic: Game Programming / removing all array items

There are many ways for this to be done but this would be the most common approach

array.length = 0;
 
Flag Post

Topic: Game Programming / How long have you been programming for?

Originally posted by skyboy:

Originally posted by Danny_Phantom_:

Nothing In General, I Wanted To Know How All These Programs And Games Work // What Happens Behind The Curtains.

ditto, minus the whole Capitalizing Every Word Of Every Sentence Typed Thing Going On Up There.

Yep.. And that whole capitalizing every word is weird hahaha.