Be a Supporter!
Overriding functions? Posted December 18th, 2012 in Game Development

Fate here once again, pals :D

Tonight's question: Is there a way for a function to "override" another function?

As always, allow me to explain:

I have one function that stops the scene at frame 1 in this way:

addEventListener(Event.ENTER_FRAME, habilitacionqf101);
function habilitacionqf101(event:Event)
{
if (OState01<=14){
stop();
}

else if (OState01>=15){
qf1.alpha = 1;
play();
this.removeEventListener(Event.ENTER_FRAME, habilitacionqf101);
}

else{
trace("review code")
}

}

Making long story short, this bit of code prevents the scene from playing until the variable "OState" (a numeric variable based on a second per second timer) reaches (or gets above) 15.

This is intended to prevent the player from being able to activate certain buttons until 15 seconds have passed.

However, I NEED to be able to use ANOTHER button at any time, even when the timer hasn't reached 15 seconds yet.

My newb skillz made me design that button like this:

chansetbutton.addEventListener(MouseEvent.CLICK, chanset01);

function chanset01 ( m:MouseEvent )
{
chanset1 = true;
play();
trace("Acknowledged")
}

This button has 3 objectives. The first one is to transform the "chanset1" variable value (a variable not needed to be explained here) from "false" to "true".

The third objective is to trace an "Acknowledged" message in order to check if it's working or not... and it is. It traces the message without problem... however, the "play();" command set to activate itself (which I intended for it to override the "habilitacionqf101" function previously explained) at the click of the mouse won't do squat. The game still forces me to wait until the 15 seconds passes before being able to use that button as it was intended.

Question is... is there any way to tell the "habilitacionqf101" function to be overriden if the "chansetbutton" is clicked? (aka: if I press that particular button, the game shouldn't force me to wait the stablished 15 seconds).

As you might be able to see, I'm no specialist over AS3 scripting... I'm an ilustrator, so this can get somewhat tricky for me... I deal with photoshop brushes, not functions, variables and such xD

Any ideas?

Fate out!

Response to: How to make a bar charge over time? Posted December 18th, 2012 in Game Development

Thanks for the help guys, I already worked my way through this problem ^^

However, I found a new problem xD So I'll post a new question in the forum. See ya there :P

Response to: How to make a bar charge over time? Posted December 18th, 2012 in Game Development

At 12/18/12 12:20 AM, MSGhero wrote: Republic of code is always very helpful for the basics, plus the docs.

Yeah, I check Republic of code everytime I'm messed up with something, but this one slipped my radar. I'll check it out and see if it can get the job done, thanks.

Response to: How to make a bar charge over time? Posted December 17th, 2012 in Game Development

At 12/17/12 11:46 PM, MintPaw wrote: I'd suggest you take a look at the scaleX property, Number variables, and the Timer class.

I know the first two are involved AND I "somewhat" know how to deal with them. It's the Timer class that's new to me and... well, the tutorials on how to use it often reffer to using it on a numeral clock, so it's full of scripting that transcribes the timer value to visible numbers and such (aka: additional baggage that's not needed for this) aaaaaaaaand I get a little lost trying to fish out what's useful and what's not. That's why I posted the question here, so maybe someone knows a more direct way to do what I intended and, therefore, saving me some precious ours of my mental stability xD

I'll have to go back to those tutorials if nothing works though, so thanks for the feedback anyway ^^


Hello guys, Fate here. As usual, ready to annoy you, oh wise ones, with questions regarding Flash CS6 and AS3 :D

Tonight, I have a simple (I hope) question:

How do I create a bar (energy bar, mana bar, power bar, whatever bar) that charges over time? Let me explain a little better what I need:

I need to create a bar that fills itself over time from 0% to, let's say, 25% in 10 seconds and, when it reaches that 25%, it stops filling any further.

The whole concept and application is way more complex than that, but I somewhat sorted out the other parts I need for the whole script to work, so I'm listening to your feedback, folks :D

Thanks in advance for your help. In case I end up trying your suggestions and finish getting into some kind of trouble, I'll reply and will go into further detail about the particular issue, but let's hope it's not necessary.

Thanks again!

Fate out!

Response to: Volume Slider with Alzheimer´s Posted November 2nd, 2012 in Game Development

At 11/2/12 03:40 AM, 64base wrote: I'm going to guess you mean the Slider components bundled with Flash right? Do something like this whenever the frame is loaded:

musicSlider.value = backgroundMusicValue;

I think that could work. I'll try to implement it tomorrow (4:44 AM here -.-) and tell u how it went. Thx for the hint.


Stupid pun with no intention of poking fun of actual people with this disease.

Now that we got that out of the way...

Hi there pals! Fate here! This must be my third time requesting your almighty knowledge about a wall I've hit while programming my future game. I'll keep it short and simple so we can move to your answers ^^

Situation:

A project with many different scenes.

I've set a volume slider to control the ''BG music channel'' of my game, which loops constantly, as intended, through all of the scenes. The problem resides in the fact that, every time I change from one scene to the other, the slider goes back to it's default position (aka: the ''value'' goes back to 1, at least on appearances, because the actual soundtrack still plays at the same volume I left it before changing scenes).

Question:

Is there a way to tell the slider of scene "B", for example, to remember the "position" it was last set on at scene "A"? It's not a very BIG problem, but it's kinda annoying, because if I set the slider at scene "A" to play the volume at, let's say, 50%, and then change to scene "B", the music will still be playing at 50%, but the slider will be set into it's original position, so if I wanted to change the volume again, as soon as I touched the slider, the sound would abruptly rise to 100% once again.

I hope you guys understand what my problem is... I kinda suck at explaining specific situations xD

Thx for the help bros. If you need any aditional info, just ask ^^

Fate out!

Response to: Motion Tweens: Maths Vs Speed Posted October 24th, 2012 in Game Development

I think I found a pretty dumb but effective solution to my problem, at least on appearance...

Just change the framerate!

Yeah, hold on, I know it sounds stupid as hell, but think about it:

All this time, I've been working over the animations (set at 30fps) under the impression that the speed at which the animations worked at High Quality display were what I intended to get. However, I panicked when I found out about the ENORMOUS change of speed that other people could get if they had better performance PCs than mine, or if they decided to set it on low quality.

However, by limitting the framerate of the game from 30 to, lets say, the standard 24 fps, the high and medium quality animation display still plays the same as before, but the low quality animation wont accelerate that much, keeping almost the same pacing as the H or M quality.

Yeah, I know its kind of a ''false solution''... but it gets the effect I intend done pretty neatly, without recurring to lower image quality, extenuating animation processes nor, what I feared the most, redoing al the art...

I'll stick to this little, dumb trick for now.

Thanks for the help btw ^^

Response to: Motion Tweens: Maths Vs Speed Posted October 24th, 2012 in Game Development

Now that I ''tried'' doing an sprite sheet of the movieclip, just forget it xD The idea wasn't bad, but the ginormous resolution that I used for the base animation makes it impossible for Flash to create a full sprite sheet (Im not kidding... the sheet reached its 8192x8192 pixels and, Im not joking, the height of the sheet is 30.6 times shorter than what I would need (do the math, something rounding the mindblowing ammount of more than 250.000 pixels in height... jesus...)

I'll have to find another way around this...

See what I meant by ''Artist'' and not ''Animator'' not ''Programmer''...?

Christ...

The idea was good pal, it just won't apply to my situation... -.- Thanks for the help though.

Response to: Motion Tweens: Maths Vs Speed Posted October 24th, 2012 in Game Development

BTW, don´t you need Flash Builder for blitting?

Response to: Motion Tweens: Maths Vs Speed Posted October 24th, 2012 in Game Development

Vectorizing is the opposite of what you (say you) want :D Vector images require math to calculate positions. Rasterizing is the other way.

There's an option when you right click a tween to convert to fbf animation. In addition, there's a technique called blitting, where you basically paste images onto the scene (search copyPixels and blitting or ask me).

Yeah, I messed up on the vectorizing concept. Sry, my head is just spinning with this problem.

I tried to transform each of the tweens conforming each symbol (I put all the symbols (head, arm, eyes, etc.) inside a new symbol, which would be the ''whole animation'', to make it easier for organization) into FBF sequences, but the problem still remained as if nothing had changed.

And I've never heard of that blitting technique you say. I'm gonna try to search for it, but what would it make? I mean, what would be the process and effects about.

Sry for taking your time pal. I'm thankful.

Motion Tweens: Maths Vs Speed Posted October 24th, 2012 in Game Development

Alright! Fate here, once more :D

Since you guy were a big help at answering my ''easier questions'' (they're all equally difficult to me, since Im an artist, not an animator nor a programmer), I thought about throwing you guy what Id like to call a ''curve ball''. It's a more tricky question than before, and seriously, I've been searching the whole net upside down, but found nothing that could help me, so if anyone knows how to get me out of this predicament, I'd be forever indebted to your wisdom XD

Here we go:

I've been working on my next game project (which is just a little more than an interactive animation, to be honest) for a couple days now, and I started to notice something that's wearing on my patience as of now... Let me explain:

The game consists on a series of different animations, each one being accessible through some buttons I've added. Until this point, not a problem. Thing is as follows:

I use images with fairly high definition done in photoshop (under the PNG format to allow transparency). When I did, lets say, 4 or 5 animation, I started noticing that the scenes where there was more movement (both in distance and speed) played slower than what was intended. I obviously then changed the flash player settings from high to medium (which didnt do much), and then from medium to low (which did A GREAT WORK at playing things at the speed they were supposed to, but with the obvious downgrade on image quality).

Even when 80% of the ''weight'' of the resulting SWF corresponds to sound and music effects, nothing changed when I took down all the sounds and music for a new testing. The animations would still go slower than intended on High and Medium, and speeded up at Low.

Wondering WTF would the problem be, I started looking on the net for answers to this question, and found out that the issue is that ''motion tweening'' exerts a lot of effort from the PCs mathematic processing speed. If an animation has MORE THINGS MOVING FASTER AT THE SAME TIME, the PC has to deal with MORE MATH CALCULUS to ascertain where EACH PIXEL GOES, FRAME BY FRAME, resulting on the animation slowing down to allow the PC to do the math.

So, the problem wasn't the ''weight'' of my images, but the excesive amount of movement implied on the animations. Now here´s the problem:

1) I can't make it to move less or more slowly, because the animation then wouldn't be what I intend it to be.
2) I can´t REDO ALL THE ART I USED. IT TOOK ME AGES.
3) I can´t leave it like this, because then everyone would see a different speed on the animations depending on the power of their processors.

Guys... please tell me... Is there any way to easen the blow over the PC's math processes? For example, transforming my symbols (based on PNGs images) into another thing which doesn't requires that much math calculus for each pixel, like vectorizing? Or some other kind of trick? Like preloading the animation's movement paths so it doesn't has to do all those math predictions IN REAL TIME, but have them already calculated for when the game starts?

I hope you guys understand my predicament. I'm seriously screwed with this annoyance, and I've gone far too deep into this project as to scrap it and start from zero once again...

Fate out!

Response to: Smoother Movements Posted October 24th, 2012 in Game Development

At 10/24/12 02:28 AM, MintPaw wrote: I guess the next solution would be to fbf it rather than tween?

Frame by frame? xD I can't afford to do that, it'd take ages. Thx for the tip anyway :D

Response to: Smoother Movements Posted October 24th, 2012 in Game Development

Thx for the tips bros. I already thought about those two possibilites, but they both have their setbacks, so I was wondering if there were other methods, but thanks for your time anyway ^^

Smoother Movements Posted October 23rd, 2012 in Game Development

Hi guys! Fate here!

I'm developing my next game, trying to get a more polished outcome than my first one, and as I was taking care of my animations, I noticed a little something.

Thing is, when I make an object go from point A to point B on a timeline (basically by dragging the object and placing it somewhere else on the screen at a different frame), flash takes this pretty accurately... in fact... WAY too much.

What I mean whit this is: I'm trying to make the movements look natural, but it goes way too accurate when moving from point A to B. For example: If I want to make someone waving his hand, and put the hand at position A at the right and B at the left, it will look way too ''robotic''.

Isn't there a way to make it look more natural? Like accelerating halfway and deaccelerating when reaching one of the final positions? Knowing how to "arc" movements would be neat too (making the travel from A to B a parabole instead of a straight line).

I bet these are newb questions regarding flash animation, but hey, everyone needs to start somewhere :D

Anyway, any hint, tutorial, link to some site regarding this matter and such would be very much appreciated ^^

Thx for your time, pals!

Response to: Top entries from 07/14/2012! Posted July 19th, 2012 in P-bot's Postings

At 7/15/12 09:02 AM, Rummy0 wrote: Furry recolour bullshit and really shit hentai games brilliant.

The masses have spoken. Deal with it.

Response to: slave-for-a-day Posted July 14th, 2012 in General

At 11/19/10 11:42 PM, DP wrote: Any third world country.

Damn retard.

Response to: Help needed with Flash Transitions! Posted July 2nd, 2012 in Game Development

At 7/2/12 03:55 PM, MintPaw wrote: If you're trying to do this in animation then it should be pretty easy. Otherwise I'd use something like TweenLite.

Hmmm... Thing is that each scene is a full truckload of symbols in different movement patterns, all of them under a programmed, simple action script at the last frame that orders them to go back to the first one :s So I don't know if I can really call them just animations :s (when I think of animations, I think about a premade, unified secuence... IDK if I'm making myself understandable enough :s sry bout that).

I have the feeling that I'm doing something wrong since the very foundation of my methods (meaning that there should be a much easier way to do what I did until now) but... yeah, this is my fourth day testing Flash for the first time in my life so... xD I guess that's to be spected :P

Response to: Help needed with Flash Transitions! Posted July 2nd, 2012 in Game Development

At 7/2/12 09:06 AM, mark212 wrote: well my first thought would be a masking layer. but that is far too much effort for something this simple.
instead, what i would do is: when the button is clicked,
a movieclip with a black square the size of the stage is added and the alpha of this mc is 0.
this alpha is tweened to 1.
the "old scene" under the black square is swapped with the "new scene".
the alpha of the black square mc is tweened back to 0.
ithe black square mc is then removed from the stage.

Well, I actually expected to find some trouble understanding some Flash lingo xD (I mean, its been just 3 days since I started expermienting with it).

Lemme see... the only thing that I don't understand fully is what precisely is a movie clip (Im sure its a very basic flash notion, so deal with my ignorance for a sec if you could xD).

For what I gathered looking for tutorials, a movie clip is independant from the scenes timebars, so that could do the trick as the ''black screen'' that hides the change between the two scenes behind it (because, If I did understand well (I hope) the movieclip would be able to ''exist'' out of the limitations of the two scenes... or, techincally speaking, ''above'' them both).

Now, the problem that emerges is the following one:

Even if I did that, wouldn't the ''change between scenes'' happen at the same time I press the button? (meaning that the scene would change instantly, while the black screen would just start to appear... thus rendering the technique pointless :s)

I know that the reason for this problem is that I only managed to basically understand the ''gotoAndPlay'' function in AS3 :s (I always sucked at programing languages... sry xD), and I guess there should be a way to say (in AS3 language):

"When I press the friggin button, you keep looping the damn scene as you start to change the alpha channel of the black movie clip. When the faggoty MC's alpha gets to a hundred percent, jump to the first frame of SCENE 2, and then start lowering the alpha channel of the MC towards zero."

XD There are other lesser details that should be added to this ''command'', but basically... IDK how to put that in AS3 language xD

If someone could guide me to do so, It'd be much appreciated ^^

Fate out!

Response to: Help needed with Flash Transitions! Posted July 2nd, 2012 in Game Development

Hmmm... I cant even seem to find any tutorials on the matter... Is this really that complex for Flash...?


Sigh... jesus christ... I never thought that an apparently concept as simple as a ''fade to black'' transition from one scene of a flash game to another could be SO FRUSTRATINGLY COMPLEX!!!!

Ehem... sorry, I had a little outburst of sheer annoyance... lemme explain my situation in detail, so maybe someone out there may be able to tell me the secret to this riddle... -.-

Thing is as follows:

Im doing my first game in Adobe Flash CS6. I never even touched flash, so my knowledge about it was almost nonexistent. Fortunatelly, I managed to get most things right through trial and error, and after three full days of nonstop work and testing, the game itself started to take a somewhat decent shape. Overjoyed due to what seemed to be a nice success, I decided to smoothen out things by trying to add ''fade to black'' transitions between my scenes (something incredibly simple in every other kind of edition software I ever layed my hands on)... and yeah, as you can guess, THATS WHEN MY NIGHTMARES STARTED!!!

I'll explain in detail the effect I'm looking for:

The game starts with a looping scene (lets call it SCENE 1). Unles the player touches one of the six buttons in the upper part of the screen, the animation will just keep looping and looping (thats fine, thats my intention).

Right now, when the player touches one of the buttons, the scene changes INSTANTANLY to the one indicated by the button selected, now showing, let's say, SCENE 2, which is another looping scene (different from the first one, of course).

WHAT I NEED TO DO:

I want to ''smoothen'' the jump from SCENE 1 to SCENE 2 with a screen that fades to black, and then fades out to show SCENE 2. With this I obviously intend to let SCENE 1 keep looping while it dissapears in the black screen and, when the black screen is at its full oppacity, jump to SCENE 2, which will start playing and looping while the black screen receedes until its invisible once again.

Anyone, Oh Thy Lord Almighty, would be able to enlighten me as to how to acchieve this? I would gladly donate one of my kidneys for the answer, if it werent for the issue that their actual poor state would be detrimental for the health of the reciever :D

Thanks in advance!

Fate out!

P.S.: Putting a ''black box'' over all the other layers and tweening its alpha channel from 0 to 100 wouldnt help, because I want the fading to be activated only when a button is pressed, and the ''change moment'' from SCENE 1 to SCENE 2 would have to be hidden behind the black screen at it's full oppacity :s

Response to: Color Blind artists Posted June 1st, 2012 in Art

Lol. Strained my eyes like hell, but got a 10 at the test. Pretty near perfect colour vision xD

Response to: An example of my art Posted May 9th, 2012 in Art

Well thanks for the heads up ^^ Yeah, as I said, the new envoirnment makes things a little confussing at first, but Ill get teh hang of it sooner or later xD

And my real name is Andres xD Thing is that since it´s a Latin based name, it has an apostrophe on the "e"... which seems to screw things up here xD So just call me Fate and we are all fine and dandy with it xD

Thanks for the helping hand!

An example of my art Posted May 9th, 2012 in Art

Howdy, Newgrounds people out there! Allow me to present myself. My name is Andrés Real, more known like "Fatelogic" round the web (DA mostly), and since I´ve spent days and days enjoying the ample offers of games and animations here, I said "Hell, why don´t I give it a shot here too?". So that´s why I´m here today :D

First of all, I must clarify that I´m, mainly, a hentai/ecchi artist, so the piece I decided to show you today here is quite old actually (It´s been a long time since I did non-h material, sry bout that xD). It´s strange how many tiny flawed details can I see on it today, with a little more experience, but I thought that even if it´s a little old, it still keeps some of the "spirit" of my style (some bases never change).

Without further ado, here I present to you my oldie "Kaleidoscopic Drift" piece, featuring two of my many OCs: Zaisha (at the back) and June (front).

  • Kaleidoscopic Drift
    Kaleidoscopic Drift by Fatelogic

    A pretty old piece that I did, featuring two of my OCs, Zaisha (back) and June (front). Every now and then, I do some non-h p...

    Score
    0.000000000 / 5.00
    Type
    Illustration
    Popularity
    15 Views
    Rated
    Everyone

IDK if I´m posting this the right way, so I expect u to have some patience with me... I´m too used to DA´s posting style, so trying to adapt to a new environment might get tricky at first for me xD

Anyway, hope you like it (remember, hentai/ecchi is my main trade, so I´m sorry bout being unnable to show another piece on this thread.)

Good luck to ya all!

Fate out!