Be a Supporter!
Response to: Create placeholder for coordinates? Posted May 31st, 2014 in Game Development

At 5/31/14 03:39 AM, slugrail wrote: var p:Point=new Point(100,50);
//p.x, p.y

Thank you I will try this out. I didn't see your post before I just made my last one. I'll give it a try.

Response to: Create placeholder for coordinates? Posted May 31st, 2014 in Game Development

With my current knowledge I only see two ways to do this:

1) I type out the coordinates every time I addChild a new laser

2) I physically put in placeholders myself. I would put a laser placeholders in the spots where I know a lasers will eventually pop up in game, make them the same size as my lasers, and then turn the alpha on all the placeholders to 0 or set visible to false. That way I could then do:

addChild(laser)
laser.x = placeholder1.x;
laser.y = placeholder1.y;

It would work but I don't know if having a dozen or so invisible objects on the stage would create performance issues....plus I'm just trying to increase my knowledge by asking you guys if there is a better way to go about this.


So in my prototype game it is kinda laid out like a maze. Now with each level I want to add lasers to specific areas inside the maze. Some levels will require me adding more lasers/ removing lasers/ or just moving them to different areas. Now I know there will be times where lasers will be re-added to the exact spot they used to be. I also know that it may not be the same kind of laser (some will blink on/off and some will be steady).

What I'm wondering is there a way to create a placeholder variable. So instead of every time I add a laser I do:

addChild(laser);
laser.x = 250;
laser.y = 200;

I could do something like:

addChild(laser);
laser.x = placeholder.x;
laser.y = placeholder.y;

// Or someway to super condense it

That was all just pseudo code made up hoping to get my point across. I was just hoping I could set up predetermined areas across the level (cuz the layout never changes from level to level just stuff is added or moved around) where I could easily addChild objects to these placeholders without having to retype out the coordinates every time.

Response to: EnterFrame for movement Posted May 30th, 2014 in Game Development

I didn't read any of the earlier posts, but you can set the velocities to 0 before you even check which keys are down.

Idk if you've seen it already, but I made this to handle key stuff.

You're totally right dude. I had actually already set the velocities to zero but I didn't do it inside the EnterFrame. I did that and now it works without needing the else statements. Thank you! I knew it was something simple I was overlooking.

I will have to look at your keys.as again. When I first looked at it months ago I couldn't comprehend it do to my knowledge at the time. Maybe this time around I will have a better understanding of how to utilize it in my projects..

Response to: EnterFrame for movement Posted May 30th, 2014 in Game Development

Sorry about spacing in code I provided. It's correct in my project it just got weird when I copy and pasted it.

Onto your problem. You add the x and y values by vx and vy respectively but you set vx and vy to +-5 and never change it back to 0 (when the object should stop).

I know I didn't set it back to 0. I thought I wouldn't have to do that since I had the booleans but I was wrong.

At 5/30/14 06:11 AM, slugrail wrote: if (_leftKey) {
_vx = -5;
} else {
_vx = 0;
}

Your above code is how I want the character to stop. I don't want any deceleration (I know how to do friction for that). The problem is that if I do your example above it works just for that one key (moving to the left). If I add those else statements for right key then it disables the left key entirely. The same goes for up/ down it disables one of them.

I eventually got it working with:

if (_leftKey)
			{
				_vx = -5;
			}
			else
			{
				_vx = 0;
			}
			if (_rightKey)
			{
				_vx = 5;
			}
			if (_upKey)
			{
				_vy = -5;
			}
			else 
			{
				_vy = 0;
			}
			if (_downKey)
			{
				_vy = 5;
			}

And while it works I don't fully understand why it works with the else statements in those exact spots. Any other configuration failed.

EnterFrame for movement Posted May 30th, 2014 in Game Development

I've always controlled my character's movement inside the keyDown and keyUp handlers. However, I recently read that this should be handled inside the EnterFrame. So using booleans I created this:

private function onKeyDown(event:KeyboardEvent):void
		{
			if (event.keyCode == Keyboard.LEFT)
			{
				_leftKey = true;
			}
			else if (event.keyCode == Keyboard.RIGHT)
			{
				_rightKey = true;
			}
			else if (event.keyCode == Keyboard.UP)
			{
				_upKey = true
			}
			else if (event.keyCode == Keyboard.DOWN)
			{
				_downKey = true;
			}
		}
		private function onKeyUp(event:KeyboardEvent):void
		{
			if (event.keyCode == Keyboard.LEFT)
			{
				_leftKey = false;
			}
			if (event.keyCode == Keyboard.RIGHT)
			{
				_rightKey = false;
			}
			if (event.keyCode == Keyboard.UP)
			{
				_upKey = false;
			}
			if (event.keyCode == Keyboard.DOWN)
			{
				_downKey = false;
			}
		}
		public function onEnterFrame(event:Event):void
		{
			//Move the player
			x += _vx;
			y += _vy;
			
			if (_leftKey)
			{
				_vx = -5;
			}
			if (_rightKey)
			{
				_vx = 5;
			}
			if (_upKey)
			{
				_vy = -5;
			}
			if (_downKey)
			{
				_vy = 5;
			}
                  }

Works like a charm but the character never stops moving once it starts. What I mean is the character never stops moving even after I release the key. I traced it and the booleans become false with the key releases. What simple thing am I overlooking?

Response to: Can you author multi-embeded ads? Posted May 29th, 2014 in Game Development

Yeah, I don't even think I'm going to do it. I was just thinking about "hey that be neat if you could make a game for NG thts like mobile games that have multi ads in them." But right now my game is so WIP I shouldn't be focusing on ads, but rather gameplay. :D

Haha yeah. Well depending on the simplicity of the game you could always push it to a mobile device using adobe air and then blast those ads :P

Best of luck to you.

Response to: Can you author multi-embeded ads? Posted May 29th, 2014 in Game Development

Yeah, I can understand that the more than one ad (besides the preloader one) can cause a serious dropoff in retaining players because the game is stuffed. What about embededing just "simple" image ads throughout the whole game? Or would that not work.

I still say don't do it.....but if you're hell bent on the idea and you think you have an addicting/great game then yeah use the image ads that the player just closes out. No one would want to sit through another video ad (other than the one that plays before game loads).

Response to: Can you author multi-embeded ads? Posted May 28th, 2014 in Game Development

Except it's not a mobile game.

So don't do it....

Very rarely is it tolerated on a non-mobile platform and it could kill your game. That is unless you have the best game ever created that is just so damn addicting that people will feverishly wait through the ad to keep going. Seriously.

Response to: Flash ad approval Posted May 28th, 2014 in Game Development

At 5/27/14 03:22 AM, Az9Studios wrote: Hey guys, I made my game available for preview a couple days ago, but still haven't received approval for my loading screen newgrounds flash ad. How long does this usually take from your experience? Is it possible that I missed some kind of step? This is my first time trying to implement an ad here

If the API says it working in your project when you test it and you've requested ads in your project system settings then you're good to go you just have to wait. Can take up to a week sometimes especially if you did it over a weekend.

Response to: What are your rates for projects? Posted May 19th, 2014 in Audio

Thank you for all of the response guys I truly do appreciate it. I am going to have to make some inquires with some artists to better help me determine if it is more worth it to score my games myself or not.

Thanks again everyone.

Response to: Back into AS - Dry of ideas :/ Posted May 14th, 2014 in Game Development

I also wouldnt mind doing colabs, but beware, I have NEVER finished a game and my time is rather limited.

That'll definitely make people want to collaborate with you.....yeah.....

Response to: What are your rates for projects? Posted May 13th, 2014 in Audio

At 5/13/14 06:40 AM, Bspendlove wrote:
At 5/13/14 01:22 AM, Hero101 wrote: or would their words vie email giving me permission be enough.
I'd say: Create an agreement on paper (PDF) stating that the musician gives you permission to use their music commercially and earn money via ad's and ask them politely if the would be able to sign it. I'm pretty sure that should be enough in the long run

I agree it definitely would. Just seems like a hassle for the musician which makes me feel like a dick if he is already giving me free music. But I guess better safe than sorry.

Response to: What are your rates for projects? Posted May 13th, 2014 in Audio

I've talked to some artists that have said go ahead and use their music for free even though I would be making a few pennies off of ads. Is there any physical way to prove it was given to me free or would their words vie email giving me permission be enough. Not that I expect anyone to change their mind should the game take off and sue my ass but it's better to have all ends covered.

Response to: What are your rates for projects? Posted May 12th, 2014 in Audio

At 5/12/14 12:15 PM, MrBellington wrote: In my experience, rates are seldom publically-discussed.

Ah yeah good point. Thank you for the reply.

What are your rates for projects? Posted May 12th, 2014 in Audio

That may not be the best title for this post so let me clarify.

I've been learning to code on/off the past year to make flash games. At the start of this year I decided to give the majority of my time to programming to see how much I could learn in one year's time. I've made a few simple games here and there and uploaded one recently to this site. For that game I used cheap royalty-free music (didn't mind paying for it as I wanted the song for one of my films - filmmaking is actually what I do). Now I told myself I would eventually start scoring my own games sometime this year (played music for almost a decade now); however, I am quickly learning that coding takes up a vast majority of my time let alone the art assets.

So I was curious how much of a revenue cut you guys ask for if someone wants to use one of your songs in their game? I'm not saying that I (or any game developer) asks you to create an original score from scratch to match the mood of the game. I'm wondering how much you generally ask for if the person is interested in one of your already completed songs here on newgrounds?

Just trying to get a general idea of how much percentage of the revenue you guys ask for? Personally trying to decide whether I want to take the time to score my games myself or not.

Response to: Starting as a Flash programmer Posted May 11th, 2014 in Game Development

Don't learn AS2. Learn AS3. Yes, it has a steeper learning curve but it is wayyy more efficient than AS2. Also like the other user stated - start small. Give up that dream of an RPG game.....for now. Make very small, basic games as you continue to learn new code. RPG's are crazy difficult yet every beginner wants to make one....until they start learning how hard it is to code. Start small and build from there.

In short: Learn AS3, don't give up, make small game demos/projects as you learn new code, and lastly - don't give up.

Best of luck to you.

Response to: First Game for iOS! Posted May 11th, 2014 in Programming

I really appreciate your suggestions Hero101, since it is my first game on the iOS framework I decided not adding any ads until I've introduced new game modes. I'll take in mind your suggestion on my next update!

Thank you very much!

No problemo. I just released my first game here on newgrounds last month. Still have a lot more to learn (AS3) but I love it. Pretty soon going to start looking into how to make mobile games as well. I'll keep your game on my phone in case you update it :)

Best of luck to you.

Response to: First Game for iOS! Posted May 11th, 2014 in Programming

I was going to be annoyed if there was any ads in the game whatsoever because then I feel like you are just trying to gather traffic to increase profit....but you didn't have any, so:

I liked your game. For your first mobile game I think you did really well. It gets kinda old though after score of 100 but that increased drop of meteors does help alleviate this. Really loved the music in the game - it's what really kept me going. My only issue is that you can be hit by a meteor and then immediately be hit by another. Given that the meteors usually drop in groups this results instant game over if caught in one of the groups onscreen. I would suggest making it so that you are invincible for a brief period after getting hit to remedy this issue.

Keep up the good work.

Response to: Flash Games Help Posted May 11th, 2014 in Game Development

At 5/9/14 07:37 PM, sorohanro wrote: Hi there
I'm usually lurking in the audio forum, that's what I do mostly, so, my experience with Flash is very limited (made one movie may years ago).
I need some help:
We have a team and we would like to make some simple funny games, like dress-up or those funny e-cards where you upload your photo and you have "yourself" crazy dancing (like the JibJab stuff).

These forums are not that slow it's just that it's against the forum rules to say google it. So I'll help you get started by addressing your questions.

- is there a resource of learning to do specifically that?

You say you have a team but I guess no one knows how to program. You (or someone on said team) needs to learn to code. Learn AS3 (ActionScript 3.0). The internet is littered with basic tutorials to help you learn the basics. There are also tutorials for dress-up games like you said you wanted to make but those will only take you so far if you don't understand the code; thus, you should learn it.

- are there some scripts that I can get (free or paid)

Short answer: probably. But there is little point in trying to find a free script if you don't understand the code. Additionally, why pay for it if you could write it yourself (besides the fact that source code you pay for can be rather pricey).

- is there somebody that can help with that here? and for what kind of price?

Possibly someone on here would be willing to help you for a cut of the overall revenue. Most people that are into programming are usually busy with their own projects as they want to make their own games as well. But you never know. I believe there is a collab section here on the website where you could look for a partner.

Oh, also we need the user to get some code so that they can take the result to their blog.

I don't really understand what you mean by this, sorry.

My advice is to have someone on your team learn code. I don't know how big your team is, or why you even need a whole team, but it's best if someone knows there workings of how to code. This will open up many gateways to further improve your simple game ideas and future projects.

Response to: TicTacToe Game Posted May 5th, 2014 in Game Development

Honestly tho the web is full of quite a few tic-tac-toe tutorials. I recommend doing one of them. Just don't copy/paste the code to just have a game under your belt. Study it. Analyze it. If there is something you don't understand or recognize in the code then spend the day researching it until you grasp what it means and how it is used. That way you not only taught yourself new code, but you will also then understand how it works and will be able to manipulate it to make the game truly yours and not just a ripped game.

Response to: TicTacToe Game Posted May 5th, 2014 in Game Development

At 5/3/14 05:34 PM, Vampx35 wrote: Is there anything specific about booleans that I can utilize?

Nothing really specific about booleans they are either true or false. Again there are more advanced ways to go about it with arrays and loops but I'm still learning and haven't grasped that knowledge myself. One of the many other advanced users could help you with that direction.

The long, difficult, discombobulated way to do it without those methods is using booleans. You could create a boolean for the player and the AI / player 2 so you know who's turn it is. You could then create one for each tic-tac-toe "square" to define if it is empty or not (use to check if square is empty - allow X or O to be placed - or occupied - not allow). As you can see this is definitely not the most proficient way to go about it but it is doable.

Response to: Api Connector Play Button Stops Posted May 3rd, 2014 in Game Development

Use code tags to make code more readable. They are on the left side panel.

I don't know exactly what's wrong. You'll probably have to hard code the play button.

Something like:

var flashAd:FlashAd;
flashAd = new FlashAd();
flashAd.playButton.addEventListener(MouseEvent.CLICK, onPlayButton)

function onPlayButton(e:MouseEvent):void
{
     play();
}

This is untested AS3 code.

Response to: Api Connector Play Button Stops Posted May 3rd, 2014 in Game Development

At 5/3/14 03:38 AM, Logo wrote:
At 5/3/14 03:16 AM, Hero101 wrote: Are you using it for the Flash Ads? Preloader component?
Yeah, just the one on the first frame of the API fla with ads enabled.

Open up the API Component in Flash library (double click on it inside your project). You'll be able to see all of it's layers. It has actions script frames throughout it. Click on an actionscript frame and press F9 to bring up the actions panel. Go through each one until you find the command that fires when the play button is pressed. Yours may be set to a gotoAndStop rather than gotoAndPlay.

Response to: Api Connector Play Button Stops Posted May 3rd, 2014 in Game Development

Are you using it for the Flash Ads? Preloader component?

Response to: Need help with some simple code Posted May 3rd, 2014 in Game Development

1. where do I put the button input
2. your code has seemed to make it so all the stop actions I put through out the flash don't work anymore

This is why you shouldn't code in frames. Code your stop commands in the document class (which you should be doing all your code there for such a project). Don't code in the timeline. Your button input would run the code he provided with whatever listener or key code press you have for your button. Again it would go in your document class.

Response to: TicTacToe Game Posted May 3rd, 2014 in Game Development

There are a lot of ways you could go about fixing your problems with code that is way ahead of your skill level (just assuming given your current problems). Given you understand "if" statements you could solve all your problems with booleans.

Response to: Complex Button Animations? Posted April 28th, 2014 in Animation

Alright thanks for the info! I'll definitely look into that. I have no idea how to code in flash (though I've seen how to access the actionscript codes so I'm somewhat familiar), but I'll certainly learn it as best I can. I've got a few sources that might be able to help me at home too, but it's good to know where to start. Thanks again!

No problem. I advise learning to use AS3 (actionscript 3.0) rather than AS2 because that language is really old. You sound familiar with Flash so your knowledge of movieclips will helps. If you have any issues with your code post it in the Flash forum and people will be able to help you - just be sure to post all your relevant code in your post (and use the code tags on the left side of screen to make it easier for us to read). You could also PM directly if you need to but I'm still learning. I've only been at it for a few months now and finished my first game but I still have so much to learn.

Best of luck to you!

Response to: Complex Button Animations? Posted April 28th, 2014 in Animation

Any one know where I can learn how to pull this stuff off, or if it can be pulled off in flash at all?

This is totally possible with / in Flash. Just requires knowing how to code. With your example (although it was a bit confusing) it would require more code than you might think. You didn't state if you already know how to code so I can't just say start at the beginning with tutorials for Actionscript 3 (dozens of starter pages across the web). With the interactivity you mention in your example most of your buttons wouldn't be the "button" objects in Flash but rather Movieclips that you when then hard code any MouseOver, MouseDown, ect... as well as making it do things like shift objects on the stage.

Response to: Game Distribution possibilities.. Posted April 26th, 2014 in Game Development

Mochi gave us a total of 2k views while sites that copied the game from either ng or kong have given us 100k views. So honestly nothing. Upload it to the popular portals, and if it's decent, it'll spread. If your game isn't popular, any kind of distribution will only eek out so much.

I guess that proves something I read online recently about distributing your game - Make a great game and half of your work will be done for you already.