Be a Supporter!
Response to: NG Save File Feature Posted 4 days ago in Game Development

At 12/26/14 08:59 AM, FiendMachine wrote: You aren't getting me. It will just add a new file to the API save data grid. I want to load data from it

Did you execute the query stuff again between saving and loading?
Dunno what the problem could be if you did.

Response to: NG Save File Feature Posted 5 days ago in Game Development

At 12/26/14 04:37 AM, FiendMachine wrote: The api does connects, and at least uploads the file to the save group with its icon. I am having problem with saving and loading the data

Did you try the query stuff from my example?
It checks if you already have a save file, and creates a new one if you don't.

Response to: NG Save File Feature Posted 5 days ago in Game Development

At 12/26/14 02:50 AM, FiendMachine wrote: I am having a bit problem with the save file code

You forgot to connect to the API (and some other stuff it), I don't want to fiddle with AS2 here, so I'll just link to an old post with AS3:
http://www.newgrounds.com/bbs/topic/1361664#bbspost24992832_post_text
(don't forget to replace the moep-moeps with your projects API ID and encryption key)

If you have problems figuring out the as2 counterpart, ask, I don't have much knowlege regarding the API though.

Response to: Api Save Data Posted 6 days ago in Game Development

At 12/25/14 05:11 AM, FiendMachine wrote: Is it possible to save a whole movie clip which has the level in it,created by the user?
Or do I have to save all the variables of the movieclip and then load the level using the variables?

You will have to save all variables.

Response to: AS2 Flicker effect? Posted 9 days ago in Game Development

At 12/21/14 07:14 PM, jaypeps wrote: Im trying to get my character to flicker when he gets hit by the enemy, im looking to have it on a timer so that he flickers for about 5 seconds(during which time he cannot be hit by the enemy) and then goes back to his original state. I know its a lot to ask but any ideas on how to do this?

Just invert the visible property of your character each frame as long as the effect is active. (or every x frames)
I don't know if as2 has timers, if it has them, just set the effect, start the timer, and remove the effect and make the character visible on timeout.

Response to: Favorite Game Launguage Posted 12 days ago in Game Development

At 12/18/14 12:51 PM, Diki wrote: I would never write a Java application to begin with (I don't like the language and I especially do not like the JVM)

I'm interested in why you dislike java/JVM, can you explain please?

Response to: Best way to save a game's progress? Posted 13 days ago in Game Development

At 12/18/14 03:16 AM, Hero101 wrote: Since I've never done this before is it something that I should code into my game early on or will it be relatively simple to implement when my game is nearly complete?

I usually split saving in two parts.
First is extracting your current gamestate, resulting in an object from which you can fully reconstruct said state.
The code needed for this grows with the complexity of your game, because you will need more variables to reconstruct it's state.
Next is saving given object using a save function, which should be trivial in most cases.

The only way I have heard about doing this is with NG's API. If I remember correctly this only works if the user plays the game on NG (not sure if they also have to be signed in)? Is using NG's API the best way to go about saving progress or is there another method? If there is another method how does it compare to NG's API save feature? Just how difficult is it to implement this feature (whether it be NG's method or another) into a game?

My platformer saves using the NG API, so I might be able to help you if you decide to use the API, never tried saving a different way in AS3 though. It only saves for logged in users in my case, but maybe I've just overlooked something.

Response to: Random Timer Posted 13 days ago in Game Development

At 12/18/14 12:15 AM, Hero101 wrote: With that example, as far as I could tell, are you suggesting that another way I could do it is to decide whether a new enemy gets spawned at each interval of the timer?

No, the onTick was more or less a bonus, but yes, you could do it this way if you want.

Response to: Random Timer Posted 13 days ago in Game Development

At 12/17/14 11:47 PM, Hero101 wrote: Is it possible to set a random time (within a certain range) for a timer?

It should work, you can find a similar example here:
http://help.adobe.com/de_DE/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f0f.html

Response to: Favorite Game Launguage Posted 13 days ago in Game Development

I mainly use C# to make games and it is my favorite (and first) language. It's relatively simple while still providing a lot of tools to make awesome stuff.
Java is also fine, and netbeans is much more user friendly than visual studio.
I'm not a fan of C++.
Maybe I'm just doing it wrong, but the errors are not helpful, and if I need pointers I just use unsafe in C#. No need to have to manage memory everywhere. I did not make much with C++ yet though, only a simple snake and some video trackingish stuff with cuda.
I only made 1 game with AS3, it's nice for small stuff, but I would not want to use it for big projects.
Have not much experience in other languages, so I think that's it.

Response to: AS2 Help with hittest Posted 2 weeks ago in Game Development

At 12/13/14 06:33 PM, jaypeps wrote: any ideas?

Calculating the collisions&response with AABB's (Axis-Aligned Bounding Box) would be a good way to do it.
The cheap way would just be to shorten the sides of the box. (eg. the left side has some distance to the bottom and top)

Response to: Pivot in flash? Posted 2 weeks ago in Game Development

At 12/12/14 11:25 AM, RangerInTheWoods wrote: I have looked online and found the bone tool, but it does not seem to be in my version, i'm using macromedia flash 8. Sorry, i forgot to state that. Would you mind telling me what flash program you are using?

I was using adobe flash pro cs6.

Response to: Pivot in flash? Posted 2 weeks ago in Game Development

At 12/11/14 05:53 PM, RangerInTheWoods wrote: Hi, i'm trying to create a flash animation series, and it would be so much easier if i could draw objects and link them together to be able to move them around differently later. A good example is pivot. Is there any way to do this at all in flash?

You might want to try the bone tool. I never really managed to make anything useful with it but maybe you'll have more luck.

Response to: Seeking advice; RPG engines. Posted 2 weeks ago in Programming

At 12/10/14 01:02 PM, Etherblood wrote:
At 12/9/14 02:59 AM, Sandbocks wrote:
Do you want to make something like Mimicry Man? (gamelink)
It's made with RPG Maker 2000, the gameplay looks like this.

I never made any rpg'ish games and only know this from the vid, so I can't really help you beyond that.

nvm, should have read all of your post, sry...

Response to: Seeking advice; RPG engines. Posted 2 weeks ago in Programming

At 12/9/14 02:59 AM, Sandbocks wrote:

Do you want to make something like Mimicry Man? (gamelink)
It's made with RPG Maker 2000, the gameplay looks like this.

I never made any rpg'ish games and only know this from the vid, so I can't really help you beyond that.

Response to: Need help with simply editing text. Posted 1 month ago in Programming

At 12/7/14 03:12 AM, Manaphy wrote: I want to fool my dad by just editing the text of the site and have it saved as it's own copied link.

It's actually pretty easy to do, but I don't want to support this kind of 'joke'.
Falsifying 'documents' is more a crime than funny in most cases.

Response to: Particles vs Display Objects Posted 1 month ago in Game Development

At 12/3/14 12:25 AM, Barzona wrote: I still don't know much about particle effects and how they are generated, but I do know they aren't the same thing as display objects.

What i want to know is, are particles cheaper from a performance point of view than display objects of the same size? I know that i could easily create a burst of small movieclips/sprites to tail some kind of visual object, but if particles are more reasonable than that, I'd like to know before I bother getting into them.

I'm pretty sure that you'll encounter performance problems if you put thousands of displayObjects onto the stage. (even if they are small)
Never tested it though, so I might be wrong.
The easiest way to find out for sure would be to test it.

Response to: Xml , Loops And Objects Posted November 4th, 2014 in Game Development

At 11/4/14 08:57 AM, Aprime wrote: It seems that the for loop only works once and doesn't allow the index to change or acknowledge it has changed.

Do you use the same 'obj'-instance in each iteration?
If yes the trace should print the value from the last iteration because each iteration will just overwrite the values from the previous iteration.
Otherwise I don't see what's wrong, is it possible to post the code in one piece?

Response to: Limit circle within circle AS3 Posted November 2nd, 2014 in Game Development

At 11/1/14 11:52 PM, Sam wrote: It seems fairly heavy, though. I'm sure someone has a much more efficient solution.

Yup, there is no need to use an iterative approx.
Keeping circle1 with center c1 and radius r1 inside circle2 isn't really complex.

For circle1 to be inside circle2 the distance between their centers must smaller or equal than (r2 - r1).
The vector stuff I mentioned above would look like this:
(pseudocode, I used a vector 'class', can be replaced with its x and y parts though)

delta:vector = c1 - c2;            //delta is the vector from c2 to c1
distance:number = delta.length;     //distance is the distance between c1 and c2
                                      //the length of a vector is sqrt(x * x + y * y)
limit:number = r2 - r1;
if(limit < distance)
{
                                    //circle1 is not contained in circle2
    delta *= limit / distance;     //reduces the length of the delta vector to limit
    c1 = c2 + delta;                //moves circle1 to it's new contained position
}

If there are questions just ask.

Response to: Limit circle within circle AS3 Posted November 1st, 2014 in Game Development

At 11/1/14 01:42 AM, jelly-bean-jade wrote: I have managed to get the distance between the two circles, but I am struggling with the "don't allow value" bit.

You can calculate the vector from one circleCenter to the other one.
If the length of this vector exceeds a given value, you set its length to the value.
You can set the length of a vector to newLength by multiplying its coordinates with newLength / oldLength

Response to: Serious help before Halloween pleas Posted October 29th, 2014 in Game Development

At 10/29/14 04:53 PM, Rovertarthead wrote: Yea i don't really understand what that is or where is it. Do you think you could screen shot me a picture of where on yours?

As I said a few times already, I don't have flash cs.
I can't send you screens of what 'mine' looks like, because I don't have it.
Gimmick already posted a screenshot of what the textfield properties look like, it shouldn't be hard to find (if it is there).
If you can't find it you can just delete the old one and make your own textfield.

Response to: Serious help before Halloween pleas Posted October 29th, 2014 in Game Development

At 10/29/14 04:46 AM, Rovertarthead wrote: Okay yeah I'll just delete and make my own numbers tomorrow. And I'll use the action Scripps you gave me.

If you're lucky one of the layers of your current countdown clip is a textfield which u can use.

Response to: Serious help before Halloween pleas Posted October 29th, 2014 in Game Development

At 10/29/14 04:28 AM, Rovertarthead wrote: Okay so I should delete these premade numbers that I got from someone else and just make my own numbers right?

Unless the person who you got it from tells you how you can use it as textfield, yes.

Response to: Serious help before Halloween pleas Posted October 29th, 2014 in Game Development

At 10/29/14 03:30 AM, Rovertarthead wrote: I don't know how do i know about if its a text field? And I'm not sure if its set to dynamic i don't know what that is. Heres what it looks like here:

As I said, I don't know how it should look.
Just download the .fla from the tutorial you copied your code from and compare:
http://flashspeaksactionscript.com/flash-countdown-timer/

Response to: Serious help before Halloween pleas Posted October 29th, 2014 in Game Development

At 10/29/14 02:54 AM, Rovertarthead wrote: Oooh you mean on the symbol like this!? Look I changed the numbers symbols name to time_txt.. Still didn't work.

Is this symbol a Textfield, is the text type set to dynamic? I don't have flash CS6 anymore, so I can't check what it's supposed to look like.
The script works.
(the last output you posted was exactly the countdown till halloween, in case you didn't notice)

Response to: Serious help before Halloween pleas Posted October 29th, 2014 in Game Development

At 10/29/14 02:43 AM, Rovertarthead wrote: I copied and pasted the script you gave me but still didn't work. Was I supposed to change something in my file to that Text time or was it all ready in the action script?

I'm pretty sure the problem is that "time_txt" is not the name of your countdown textfield...
Please rename it to time_txt or change all instances of time_txt in the script to your textfield's name.

Response to: Serious help before Halloween pleas Posted October 29th, 2014 in Game Development

At 10/29/14 01:26 AM, Etherblood wrote: And also, just to make sure, the name of your time textfield is "time_txt" ?

Okay, I'm pretty sure the problem is that "time_txt" is not the name of your countdown textfield...
Please rename it to time_txt or change all instances of time_txt in the script to your textfield's name.

The script was correct from the beginning, you may use this version if you don't want uneccessary traces:
(All other versions without compile errors should be fine too)

this.onEnterFrame = function()
{
var today:Date = new Date();
var currentTime:Number = today.getTime();
var targetDate:Date = new Date(2014,9,31);
var targetTime:Number = targetDate.getTime();
var timeLeft:Number = targetTime - currentTime;

if(timeLeft > 0 ){

var sec:Number = Math.floor(timeLeft/1000);
var min:Number = Math.floor(sec/60);
var hours:Number = Math.floor(min/60);
var days:Number = Math.floor(hours/24);

sec %= 60;
min %= 60;
hours %= 24;

var counter:String = days.toString() + ":";
if(hours < 10) counter += "0";
counter += hours.toString() + ":";
if(min < 10) counter += "0";
counter += min.toString() + ":";
if(sec < 10) counter += "0";
counter += sec.toString();

time_txt.text = counter;
}else{
var newTime:String = "00:00:00:00";
time_txt.text = newTime;
delete (this.onEnterFrame);
}
}
Response to: Serious help before Halloween pleas Posted October 29th, 2014 in Game Development

At 10/29/14 01:15 AM, Rovertarthead wrote: And this.

Ok, the calculations should be correct, this means the issue is either converting to string or setting the textfield text.
What is the output of this?

this.onEnterFrame = function()
{
var today:Date = new Date();
var currentTime:Number = today.getTime();
var targetDate:Date = new Date(2014,9,31);
var targetTime:Number = targetDate.getTime();
var timeLeft:Number = targetTime - currentTime;

if(timeLeft > 0 ){

var sec:Number = Math.floor(timeLeft/1000);
var min:Number = Math.floor(sec/60);
var hours:Number = Math.floor(min/60);
var days:Number = Math.floor(hours/24);

sec %= 60;
min %= 60;
hours %= 24;

var counter:String = days.toString() + ":";
if(hours < 10) counter += "0";
counter += hours.toString() + ":";
if(min < 10) counter += "0";
counter += min.toString() + ":";
if(sec < 10) counter += "0";
counter += sec.toString();

trace(counter);//<--trace for testing

time_txt.text = counter;
}else{
trace("TIME'S UP");
var newTime:String = "00:00:00:00";
time_txt.text = newTime;
delete (this.onEnterFrame);
}
}

And also, just to make sure, the name of your time textfield is "time_txt" ?

Response to: Serious help before Halloween pleas Posted October 29th, 2014 in Game Development

At 10/29/14 12:52 AM, Rovertarthead wrote: Nope none of them still worked. Is there anything I should change or delete? Like change anything here i should do or no?

I don't think you need to change any settings.

What was wrong with the last version? Another error?

Response to: Serious help before Halloween pleas Posted October 29th, 2014 in Game Development

Hmm, number.toString() instead of String(number) might be better, try this instead:

this.onEnterFrame = function()
{
var today:Date = new Date();
var currentTime:Number = today.getTime();
var targetDate:Date = new Date(2014,9,31);
var targetTime:Number = targetDate.getTime();
var timeLeft:Number = targetTime - currentTime;

if(timeLeft > 0 ){

var sec:Number = Math.floor(timeLeft/1000);
var min:Number = Math.floor(sec/60);
var hours:Number = Math.floor(min/60);
var days:Number = Math.floor(hours/24);

trace(sec);//<--trace for testing

sec %= 60;
min %= 60;
hours %= 24;

trace(sec);//<--trace for testing

var counter:String = days.toString() + ":";
if(hours < 10) counter += "0";
counter += hours.toString() + ":";
if(min < 10) counter += "0";
counter += min.toString() + ":";
if(sec < 10) counter += "0";
counter += sec.toString();

time_txt.text = counter;
}else{
trace("TIME'S UP");
var newTime:String = "00:00:00:00";
time_txt.text = newTime;
delete (this.onEnterFrame);
}
}