Recent posts by legacycf on Kongregate

Flag Post

Topic: Game Programming / game timer vs. enterFrame events.

I recently got back into flash programming, and I’m making a game in my free time.

Basically I want to know which is more efficient/ reliable/popular in AS3: using one game timer in the document class, using the enterFrame event in individual classes, or some middle ground in between.

 
Flag Post

Topic: Game Programming / Need help smoothing the rotation of a MovieClip

Originally posted by UnknownGuardian:

Have a boolean set to true in the key event function, then check if that boolean is true in the object class.

Thanks for the reply!

Took me a while to figure out exactly what you meant, but i got it to work. can’t believe it was that simple.

here’s the re-edited event listeners in case anyone else has this problem:

 		public function checkKeyDown(e:KeyboardEvent):void
		{
			//trace(e.keyCode.toString());
			switch(e.keyCode)
			{
				case 37:
				bullet.Left = true;
				break;
				case 39:
				bullet.Right = true;
				break;
			}
			
		}
		
		public function checkKeyUp(e:KeyboardEvent):void
		{
			switch(e.keyCode)
			{
				case 37:
				bullet.Left = false;
				break;
				case 39:
				bullet.Right = false;
				break;
			}
		}

instead of calling the rotation function directly from the key event listener, I called it from the Timer event. works smoothly now.

Thanks again UnknownGuardian!

 
Flag Post

Topic: Game Programming / Need help smoothing the rotation of a MovieClip

I have a little time before the summer semester starts, so I wanted to program (or start anyway) a simple game.

What I am attempting to do is rotate a MovieClip using the keyboard (arrows for testing). The problem I am having is that once the left or right key is pressed, the object rotates once, momentarily pauses, and then continues to rotate smoothly.

Heres my code that works with the rotation:

in document class:

	public function checkKeyDown(e:KeyboardEvent):void
	{
		//trace(e.keyCode.toString());
		switch(e.keyCode)
		{
			case 37:
			object.curveLeft();
			break;
			case 39:
			object.curveRight();
			break;
		}
			
	}

in the object class:

		private var curveVelocity:int;

		curveVelocity= 10;

		public function curveLeft():void
		{
			rotation-=curveVelocity;
		}
		
		public function curveRight():void
		{
			rotation+=curveVelocity;
		}

So, is there a way to smooth out the initial rotation? I remember having this problem with movement (x and y position) before, but don’t remember how I resolved it.

 
Flag Post

Topic: Kongregate Labs / Learning to program games

for math skills I suggest that you have a good understanding of basic algebra and trigonometry. algebra is key for almost any type of programming you do, and trig is good for when you’re working with angles (aiming in a game for instance).

for learning how to do AI and stuff like that outside of school, I would honestly just use google to search for tutorials. I’m still in college for computer science, but I honestly learn more from the web than i do from my classes.

and of course theres always forums full of people willing to help you with specific questions about programming :)

 
Flag Post

Topic: Game Programming / [AS3] Mouse wheel scrolling problem

I had this same problem when i was making a sniper game.

I don’t think anyones found a way to fix that yet, I still see people having this problem all the time and I don’t think I’ve seen a game that has successfully used the mouse wheel.

 
Flag Post

Topic: Off-topic / Type "etagergnoK" with your eyes closed

etagergnook

….damn

 
Flag Post

Topic: Collaborations / Zombie Game Collaboration

Originally posted by petesahooligan:

I just wanted to say that I truly appreciate a solicitation that actually includes a design brief and overview of the roles needed. Others should use your post as a model. Good job.

Thanks! I was thinking it would help get more responses and speed up the process of getting a collab started, but it has not had the effect i was hoping for :/

 
Flag Post

Topic: Collaborations / Zombie Game Collaboration

Originally posted by angelstreet:

Hi, I couldn’t access to your document. Could you send it by mail joachim_djibril[at]hotmail.com
Cheers

sorry about that, I fixed the permissions on the document. I’ll still send you a copy.

 
Flag Post

Topic: Collaborations / Zombie Game Collaboration

Almost a year ago I had an idea for a zombie game. I joined a collaboration group but the group fell apart because people were focused on things that had nothing to do with the actual game (“lets build a website!”). So now, I am going to try once again.

Here is a game design document I created a while ago (updated):

Game Design Document

I am looking for people to fill the following positions right now:

1 or 2 Programmers in AS3 – Most likely secondary programmers, but I’m willing to let someone who is more advanced in AS3 than I am to take the lead programmer position.

Artists:

Background artist: Someone who can make urban area backgrounds, (apartment building interior, exterior, and city streets)

character design/artist: Zombies, animals, main character (Read GDD, open for some interpretation).

weapon design/artist: There is a list of weapons in the design document, don’t worry about the “special” weapons right now.

**Obviously animation skills are required for the character and weapons artist, and it wouldn’t hurt for the background artist to have some experience either.

Story writerPLEASE READ THIS CAREFULLY. For once, a game collab does actually need an “idea” person, but you actually have to know what your doing. If you’ve worked on a game before with some success, please contact me. I just need help getting down the details of the story. If you haven’t had experience please don’t contact me or post here with an idea you just randomly pulled out of your head, really think about them first.

That’s it for now, If you are interested, you can post here or email me at:
los1992@gmail.com

 
Flag Post

Topic: Collaborations / What do people look for in an idle game?

well the point of an idle game as i see it, is too have something to look at while your chatting with your fellow kongs (is that right?). so I think it really needs to have something happening every few seconds. just a guy/character walking in the same direction and leveling up every minute or so is extremely boring to watch. add some humorous events to keep it interesting.

 
Flag Post

Topic: Collaborations / Mods delete this thread please

just to let you guys know, I’m checking my whispers now.

 
Flag Post

Topic: Game Programming / (Solved)Rotating a movie clip to point at the mouse. (AS3)

Originally posted by Vara:

edit: do those math functions work for AS3?

I believe the Math class is exacly the same in AS3 as in AS2.

alright thanks.

 
Flag Post

Topic: Game Programming / (Solved)Rotating a movie clip to point at the mouse. (AS3)

Originally posted by skyboy:

convert to radians: number * Math.PI/180;

convert from radians: number * 180/Math.PI;

get x/y: y + Math.sin(radians) * radius; x + Math.cos(radians) * radius;

get angle: Math.atan2(y, x); /* this is another way, for half a circle --> */ Math.atan(y/x); // both output radians

mouse coords: _root._xmouse; _root._ymouse; // <-- for AS2, dunno about AS3

gun coords: gun._x; gun._y; // for AS2, remove the _ for AS3; you should have the center of the gun be at the center of the movie clip, and have the barrel point to the right because that is 0 degrees

Proper Code Formatting Guide.

Adobe AS2 LiveDocs.

Adobe AS3 LiveDocs.

and yes, you are close; just missing the actual code

ok, i have the code for getting the x,y coordinate, the x/y, but i dont see what/why you are converting to radians.

oh wait, nevermind, im an idiot i get it now. XD

thanks for the help.

edit: do those math functions work for AS3?

 
Flag Post

Topic: Collaborations / Mods delete this thread please

Originally posted by darkenedgames:

Im not sure what that is why dont you add it

i dont have the password for ilabs. at least i dont think i do.

 
Flag Post

Topic: Collaborations / Mods delete this thread please

Originally posted by darkenedgames:

anything I should add? I posted this

maybe something about extensive knowledge of AS3 Events? im learning but there are lots of them.

 
Flag Post

Topic: Game Programming / (Solved)Rotating a movie clip to point at the mouse. (AS3)

for a game im working on i want to turn a movieclip (a weapon) towards the mouse. can someone tell me how to do this? heres what i had so far:

take the x,y coordinate of the mouse, and the center of the gun, find the slope of the line that connects the two and somehow convert that into degree’s for the rotation property.

am i anywhere close?

 
Flag Post

Topic: Collaborations / Mods delete this thread please

i was actually going to post something like this later on. i definitely need another programmer.

 
Flag Post

Topic: Collaborations / Delete this thread mods

Originally posted by Firefly1337:

i’m trying to learn coding, codydj how much did you poay to get flash?

i know you asked cody but before i got my master collection ( i was going to just get photoshop and flash, but saw that the master collection was practically the same price) for my birthday, i was honestly just redoing the trial over and over again XD. as far as i know, theres not much difference between the trials and the purchased versions.

edit: oops, i said the master collection, but i just went to my adobe folder and it said design premium. XD

 
Flag Post

Topic: Collaborations / Delete this thread mods

Originally posted by darkenedgames:

can you load onto paint select top lower it and erase oen pixel then it should be ok

yeah that should work.

 
Flag Post

Topic: Collaborations / Delete this thread mods

sorry, whenever im on kongregate, unless im playing agame, i usually just logon every few minutes to check up on things. i dont usually stay logged on.

 
Flag Post

Topic: Collaborations / Delete this thread mods

Originally posted by darkenedgames:

can tehse be used for both magnum and rifle or what?

Also, I absolutely suck at the muzzle fire ask cody

these look great. magnum rounds are shorter and more round at the front. is that ok?

 
Flag Post

Topic: Collaborations / Delete this thread mods

Originally posted by darkenedgames:

np Ill get right on those, got all night via new years

http://i933.photobucket.com/albums/ad178/darkwings125/rifle.jpg -rifle

http://i933.photobucket.com/albums/ad178/darkwings125/gununfinished.png -magnum

thanks i’ll get to work on these.

 
Flag Post

Topic: Collaborations / Delete this thread mods

Originally posted by darkenedgames:

shall I make ammo?

yes please do make some ammo. and if possible, some muzzle flashes for the guns?. and those guns are amazing. Zombie co. XD.

can you send me the image files? i’ll try to get some gun mechanics going ASAP.

 
Flag Post

Topic: Collaborations / Delete this thread mods

Originally posted by codydj:

oh ok well maybe we can do an AS2 project after this so i can help a little :)

if you want, since your learning AS2, we can do an AS2 version as well. after im done with the as3 version, it might be easier to code it with AS2.

 
Flag Post

Topic: Collaborations / Delete this thread mods

Originally posted by codydj:

Legacy are you using AS3?

yeah, it seems easier for this kind of game.