Recent posts by FunkyPear on Kongregate

Subscribe to Recent posts by FunkyPear on Kongregate

Dec 3, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / Help sending another movieclip to another frame from another frame.

For an achievement system, you’d want a variable for each achievement (whether it has been achieved or not). When the user achieves it, set the variable to true. When you go to your achievements page, scan through all the variables and lthen light up the award for each achieved achievement.

 
Nov 30, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Kongregate Labs / Shooter with pretty colors

Basic logic for pause button:

pause = false

if(pause == false) {
  MAIN GAME CODE
}

on(buttonPress) {
  pause = true
}

The above is just logic, not AS!

 
Nov 28, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / using outside database

You can do that, yeah. Obviously make sure you validate any data sent.
However, you’ll need a log in to pair the data to a user, which means the user will have to create an account and then log in each time they want to reuse their save data. This is more effort for the user, and unless your game is amazing, this will probably only serve to annoy the user. Using standard flash shared objects (or whatever the correct term is) will mean the user doesn’t have to do anything extra, and will be transparent to the user, so I’d actually recommend you stick with that. But its your call of course :)

 
Nov 27, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / How can i find SWF.file?

Make a game in Flash (swf) or Director (dcr), and then publish it. The outputted file will be compiled to wherever your main save file is (the fla for example)

 
Nov 25, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / Lives

Think DTran probably has the answer. You are using alot of redundant code there, though. Most of the code after decrementing the lives var can be replaced with
_root.healthLives.gotoAndPlay(lives);
You tellTarget seems to be doing the same things are the gotoAndPlay above it, not to mention that tellTarget has been depreciated for forever :)

 
Nov 25, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / gotoAndPlay(22); ???

_root.gotoAndPlay(22)

or

_root.gotoAndPlay("frameLabel")

 
Nov 25, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / Lives

if (lives = 3)

^ This should be lives == 3

(== is used for comparing lives to 3. = is used to set lives to 3)

This problem occurs a few times in that block of code.

 
Nov 22, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / Multiplayer?

Nonoba have a Multiplayer API (AS3 only). Alteratively, look into SmartFoxServer.

 
Nov 7, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / Flash Game Design From a Player, not Developer:What Not To Do...

19 Keep up to date with the tools. I am amazed at the number of people still writing AS2 (let alone AS1) and posting tutorials about it. AS3 has been out for ages and Flash 10 is out now. Learn it… there is no excuses.

I don’t like XP or Vista and as such refuse to switch to either, so can’t get CS3 upwards installed. There’s one excuse. AS2 works fine for most stuff. Writing in a new language (pr new variant of the same language) really slows down development time (and of course, so does actually learning it). On top of that, [number of people with flash player 8 upwards] > [number of people with fp 9 upwards], although not by very much at all. Its a bad idea to immediately jump on top of a new technology before your userbase has had time to upgrade. This is more a general point about all technology, and less so for flash.

Edit: Oh yeah, plus the cost to upgrade! Plenty of excuses!

 
Oct 22, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Games / real-life-physics please?

2) Visuals should be split from physics. You can mantain correctly decimalised spacial positions which are scaled down after processing for the stage.

Real life physics is such a broad term. You can predict planetary and star positions in our galaxy with pure maths. Make a game out of that and you’ve got a game using real life physics.

 
Oct 22, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / origin of rotate function

Its the registration point of the symbol. If its a movie clip generated in the flash IDE, edit the symbol, select all, and move it so the registration point is in the correct place.

 
Oct 22, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / Ball vs Paddle Physics

Hey,

I'll help you understand the concept, but not really going to start writing the code for you :)

First off, you need to understand the how to work out the angle it will bounce off at.

To start you need to get a line that it will be rebounded off of. If its a flat paddle, the line will go along the length of the paddle. If it it a curved surface, like a ball or round corner, the line will be a tangent of the point of contact with the rounded surface.

Then you want to work out the normal for that line (the normal will be 90 degrees to the rebound line).

The angle the ball hits the line will be reflected (mirrored) through the normal. So the angle between the incoming trajectory and the normal will be the same as the angle between the normal and the outgoing trajectory (on the other side of the normal). Its a little confusing without illustrations. (On a side note, I actually cover alot of this concept in my game Gravitee, in the unlockables section, diagrams and all ;)).

Thats how you'd work out the angle the ball bounces off at. Its over complicated because it needs support for differing rebound line angles. If the rebound line was horizontal, ie top or bottom of the screen, flat paddle that doesn't rotate, etc, you could simply reverse the y speed (with some dampening, to simulate loss of energy during the collision).

In terms of working of how the paddle will work... On a paddle collision you have two possible scenarios:
i) The paddle is at rest, in which case you treat it as a standard bounce, as above.
ii) The paddle is moving, in which case you work out the angle at collision, and apply a velocity increase when you modify the ball's momentum for the collision. (as well as handling the rebound angle too).

We'll know the paddle's highest and lowest angles (when its up and when its down). When a collision is detected with a moving paddle and a ball, you'll need to work out at exactly what point (what paddle angle) the collision occured. This can be achieved by running your collision checking with smaller intervals of ball and paddle movement once collision is detected and then work out at which point they first make contact. A more elegant solution would be to define two lines for the ball's path and for the length of the rebound line with (y = mx + c), and work out at what value of x and y they meet at.

Right, thats the basic idea. I hope it'll help someone, since it was quite a job to type that lot out! Again, its a little tricky without having illustrations. Good luck coding something up and let us know when you've finished it :)
 
Oct 20, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / A decent flash mock?

Check the sticky!

http://www.kongregate.com/forums/4/topics/89

 
Oct 14, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / DriveWheel, Z-Axis Rotation

Edit: Nevermind

 
Oct 14, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / Individual images vs. sprite sheets

Well, you can create as many of the instances on screen as you need until it starts slowing down. Then try the other option with the same number of instances.

 
Oct 14, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / Individual images vs. sprite sheets

That being said, it wouldn’t take you too long to try both and see which one is quicker for you.

 
Oct 14, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / Individual images vs. sprite sheets

I’ve tried to masking option before. Masking slowed stuff down a fair bit, so I’d say having the images on seperate frames would be more efficent

 
Oct 7, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / Question about setInterval.

If you insist on keeping the looping frames, then I guess you could do something like… (pseudocode)

intset = 0

if(intset == 0) {
  // Do SetInterval Stuff
  intset = 1
}

Alternatively, switch over to one frame coding, and use setInterval to execute your main game loop.

 
Oct 7, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / BitmapData Question (as3)...

Flash, however, thinks otherwise and it’s being a damn woman and not telling me what to do to make it better.. Ha!

Haha… made me chuckle.

It is amazing how obvious a problem can be once you take a break from it and return. Still amazes me to this day.

 
Oct 6, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / Multiplayer games

Not trying to divert traffic from Kong, but Nonoba have a multiplayer API available which will work, provided you are using AS3.

 
Sep 29, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Games / The Visitor message?

Well, its already quite monsterous before taking the human! The human just gives it arms and legs (or some such… haven’t played it for a while).

 
Sep 29, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / Flash cs4!

Haha… Did you start with MX 2004, Cloud_9ine? I started with Flash 4, and remember hating (HATING!) it when the docked panels were added into it (Can’t remember when… MX?). I still don’t use them. I think its human nature to cling on to the familiar, especially when its something that plays a big role in your life (Flash takes up a good portion of my day!)

 
Sep 29, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / Should I learn Flash?

Actionscript is the language used in Flash. Its pretty easy. ‘Shockwave’ is basically what Director creates, and uses the Lingo language, which is a bit more complicated, but has a lot more functionality (compared to AS2 at least). Director has a 3d engine in it, although its not brilliant. Thats about it. There’s a much bigger community associated with Flash than Director.

 
Sep 28, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / Flash cs4!

Yeah, the IK stuff looks really interesting! Shame I refuse to upgrade from Win2K, so I’m stuck on Flash 8! Suppose I only have myself to blame! :D

 
Sep 21, 2008
avatar for FunkyPear FunkyPear 121 posts

Topic: Programming / Much-Needed Kong Feature?

the comments area is there for players to give comments to the developer, and the forums are places for community discussion.

Says who? Whispering is a better way of communicating with the developer. Comments are for everyone to read (why else are they public?)