Recent posts by Jiggibidy on Kongregate

Flag Post

Topic: Collaborations / New Flash TowerDefense Project

Hmm… Sadly, I’m busy working on my own projects right now, but I’m pretty sure I could find at least one coder who’d be willing to work with you.
~J.

 
Flag Post

Topic: Game Programming / Saving games on Kongregate

So, after inadvertently deleting my 7+ hour save of Epic Battle Fantasy 3 (for, I believe, the third time now), it occurred to me that at least one game has the option to save your progress to your account. That game being Enigmata 2: Genu’s Revenge.

I’m curious to know why so few games seem to adopt this approach, although maybe you’d need to create a different version of the game if you wanted other sites to host it as well. I imagine there might also be an issue with server space if every game had save data linked to an account.

What goes into linking a save file to an account?

 
Flag Post

Topic: Game Programming / Accessing methods of a base class

Ah, I gotcha.

I’ve always wondered what protected did…

Thanks. :D

 
Flag Post

Topic: Game Programming / Accessing methods of a base class

Hello,

Basically, I have a class with a couple of methods in it, and I have a second class which extends it.

I’m trying to access a method that’s in the base class within the second class file, and whenever I try to compile, it throws an error my way.

Call to a possibly undefined method stillOnPlatform.

As a last resort, I could override the functions I need into the file, but it might be nice to see where I’m going wrong nonetheless.

Thank in advance. :D

 
Flag Post

Topic: Game Programming / Multiple Constructor Functions

Right, I gotcha.

Thanks. :D

 
Flag Post

Topic: Game Programming / Multiple Constructor Functions

Hey,

I was just wondering, if I have a class with a constructor function with parameters, and a second class that inherits that class, and also has a constructor function with parameters, how would I go about instantiating the second class?

For example:

class hazard has a constructor to set its position (initX:int, initY:int)

class movingHazard has a constructor to set its horizontal and vertical velocity (initXVel:int, initYVel:int)

Would I have to list all the constructors within each class, like:

stage.addChild(new movingHazard(initX, initY, initXVel, initYVel));

Or do I have to use two sets of parentheses, like:

stage.addChild(new movingHazard(initXVel, initYVel)(initX, initY));

Or would it be something else entirely, and I’m just talking out of my backside? xD

Ps. I’m sorry if the code tags don’t work, I haven’t been here for a while…

 
Flag Post

Topic: Game Programming / Timers...

Ah, thanks, I think I gotcha.

You also helped answer a question I was meaning to ask at some point, which was about how framerate is calculated. Although I imagine a custom framerate counter may be preferred by some.

 
Flag Post

Topic: Game Programming / Timers...

Hello,

Despite working on games that require events to trigger at certain times, I’ve not actually used a timer function. Instead, I use a variable that counts the number of frames that has passed; so if I need an event to happen in two seconds time, I’d have a condition:

if (varTimer == 48){ // 24fps
    doStuff;
}

Is there any advantage over using a real timer, aside from it (I think, at least) uses real time over frame count? The reason I chose to do this is because of somebody mentioning that it’s fairer on people with slower computers.

So, if the game was meant to run at 30fps, and somebody’s computer could only run it at 15fps, and there was a medal that required the game be played for one hour, a timer would give them the achievement at the same time (Assuming they started at the same time), whereas a frame counter would give the achievement to the 30fps guy in half the time for the 15fps guy.

That aside, are there any performance benefits to using a timer to a counter?

 
Flag Post

Topic: Collaborations / Looking to get a team together

If my programming or art were up to a par where I think I would be a valuable contributor to this project, (Yeah, my faith in myself is sky-rocketing. xD) then I’d love to help out with this. It sounds exactly like something I would enjoy playing.

While some cynics wouldn’t call it a ‘game,’ so much as an ‘interactive story,’ I find that the line between the two is indistinct, if at all present.

Also, Ramos, you could perhaps do with realising that your opinion may not necessarily match that of everybody else. I, for one, love story-driven games, especially if the gameplay is well implemented, and not just gimmicks like quick-time events, which admittedly, can work well if implemented properly, leading back to my original point.

Edit: My apologies for the inadvertent necro-post, if two days is a fitting time period for such an act. D:

 
Flag Post

Topic: Game Programming / GiTD [#22] Entries and Discussion (Also 72 hours!)

I’d love to take part in this, but sadly it’s most inopportune, since I’m currently preparing to go to university. D:

 
Flag Post

Topic: Game Programming / GiTD [#22] Looking for interest

Assuming I can get all my uni things sorted out for this Friday, I’d love to take part in a Game in Three Days; it’ll give me good practice for when I start my degree. :D

 
Flag Post

Topic: Game Programming / Referencing a multi-dimensional array.

Ah, I gotcha now. :D

I treat Array and Vector as synonyms because in one of my books that taught me what little AS3 I know, it refers to Vectors as ‘Typed Arrays,’ which is true, if I’m not mistaken.

 
Flag Post

Topic: Game Programming / Referencing a multi-dimensional array.

Thanks guys/gals. :D

So, if I were to use a 3-dimensional array, I’d declare it as:

var example:Vector.<Vector.<Vector.<Sprite>>> = new Vector.<Vector.<Vector.<Sprite>>>;

And, I’d amend it by using:

example[0][0].push(someSprite); // Logically, this makes sense to me, but I'm not loving it. D:

And I’d reference it using:

example[index1][index2].stuff = someStuff; // Say, if I were accessing some property of whatever was being stored

I’m not loving the brackets, which makes me think that I’ve gone wrong here. D:

 
Flag Post

Topic: Game Programming / Referencing a multi-dimensional array.

Hey, say if I were to declare the following:

var example:Vector.<Vector.<Sprite>> = new Vector.<Vector.<Sprite>>;

How would I go about referencing, or even amending it?

Say I wanted to push a new Sprite (or other value; I’m just getting a feel for multi-dimensional arrays before I try and use them in anything) into this Vector, would I do something like this?:

example.push.push(someSpriteOrOther);

Or am I completely off the rails?

The same question goes for referencing, I have no idea how I’d go about it, and I’d rather not hazard a guess. D:

Many thanks in advance; if I can crack this, then it’ll do me a world of good. :D

-John.

 
Flag Post

Topic: Game Programming / Does the depth property only affect objects of the same z value?

I was actually referring to AS3; I was unaware there was no depth property in AS3.

Thanks for clearing that up for me. :D

 
Flag Post

Topic: Game Programming / Does the depth property only affect objects of the same z value?

I imagine it wouldn’t, but I figured I’d ask anyway.

Say, I created 2 squares, set one so that it is further back than the second, and set the depth property of the first so that it it lower than the second, would it appear to be in front of the second movieclip, or would the greater z value supersede that?

 
Flag Post

Topic: Game Programming / Simplest(fastest) Pseudo random method?

http://www.random.org/

Assuming you’ll be connected to the Internet, this’ll probably be the best you’ll get for random numbers.

Although, as you said simple, I’m not sure it’ll be so great. D:

Might be worth looking into though.

 
Flag Post

Topic: Game Programming / First game in a while

I think it might be to see if there’s some programming error a programmer might notice, as plausible as that may be.

 
Flag Post

Topic: Game Programming / Blitting.

While I don’t mean to sound as if I’m unaware of the existence of Adobe’s help files, I was wondering if it would be possible to explain either method, as I sometimes find that the help files are either poorly written, or I just have no idea what they’re trying to say.

Edit: So, I see how I can use the getVector function for my frames that show the ‘trails’ of the fireworks, and how I can use the setVector function to replace the BMD with the slightly faded frame, but I’m unsure as to how I’d go about actually editing the ByteArray. Rather than making the frames more translucent, I was thinking of adding more ‘black’ to them, probably by adding, say 0xff111111 to them, or some other grey, that may be more appropriate to the number of ‘frames’ that are being used.

 
Flag Post

Topic: Game Programming / [AS3] [SOLVED] KEY_DOWN & MOUSE_DOWN

If you could explain what the bug is, then perhaps it’d be easier to help you with it.

 
Flag Post

Topic: Game Programming / Blitting.

Okay, so I’ve gone done and cracked this blitting lark(which has improved my firework’s efficiency an enormous amount), but there are a couple more things preventing me from returning my fireworks program to its former, albeit more efficient, glory.

In my original program, the leftover ‘sparks’ faded out by means of shrinking; as much as I’d love to go about that again, I imagine it would involve more redrawing than is necessary, and would kill the efficiency of the program. As a result, I was wondering if there was a way of fading a bitmapData, since my attempts at accessing an alpha property came to no fruition.

If it’s not possible for me to feasibly fade the trail of sparks, I could just as easily do without it, and then get on to turning this simulation into a full-fledged game.

One other thing I noticed was that my sparks overlapped one another, since the sparks are circular, and the bitmaps are square, there tends to be some gaps that can be noticed where the transparent corners are being redrawn over a spark that’s already present.

 
Flag Post

Topic: Game Programming / [FIXED ♥] Weird connection issue.

Contact your ISP; it may be a problem on their part.

Also, consider running a scan with you anti-virus, to see if a nasty of some kind is causing the problem.

Edit: You’re right, Bing does suck. xD

 
Flag Post

Topic: Game Programming / Inventory Help

You’ll often find that something is harder than you anticipated when you dive right into it; you’d be better off learning AS3 from the ground up using the appropriate resources, so that you know all about data types, data structures, etc. before you go about learning to program games specifically.

 
Flag Post

Topic: Game Programming / Blitting.

Okay, so I’ve managed to produce a ‘spark’ on the screen through blitting, but now I’m wondering how I’d go about moving it.

At a guess, I would say that I would have to clear the bitmap of all of the copied pixels, perhaps by using the fillRect function, and then redraw all of the sparks, after having altered their position.

I’m pretty much spitting in the wind here, so please let me know if I’m going about this the wrong way; I’d much rather avoid getting spat on the face, be it figurative or otherwise.

Edit:

I’ve gotten this method to work so far, but I’m curious to see how I’ll be able to replicate the trail I left behind in the previous fireworks program I made using movieclips. I imagine I’ll just have to use Pythag. to check the distance between the ‘rocket’ position, and the target position which is set when the cursor is clicked.

I’m thinking of implementing some kind of ‘layer’ functionality, in which I’ll have, say, 20 or so bitmaps onto which data can be copied, and instead of clearing the stage, I’ll instead ‘roll back’ the data from each bitmap onto the previous one.

While I think this method could work, I’m not sure if it’ll be great for efficiency, since there’ll be 20 bitmaps being updated each frame.

 
Flag Post

Topic: Game Programming / Blitting.

Ah, I think I gotcha.

So, to recreate my fireworks program using blitting, rather than addChild(), I’d still need a Vector(My preference so far, although I’ll be looking into Linked Lists) for the ‘sparks’ of the fireworks, but rather than pushing a new MC into the Vector, then setting its position, then adding it to the stage, I instead create a BitmapData in the ‘loading’ function, which I add to the stage, then perhaps create a Vector for each blitted ‘spark,’ so that I can move each of them on each enter frame.

Then, each time I need to add a new spark to the stage, I simply copyPixels(bitmapData I created in ‘loading’, shape to copy into the bitmapData(the spark), the position of the spark), although I should also push the new spark into the Vector, so I can move it.

The hour is late for me, so I imagine this is at least partially erroneous; I shall work on trying to implement blitting into my fireworks program tomorrow. :D

Thanks for explaining it to me. :D