Recent posts by oscarwilld on Kongregate

Flag Post

Topic: Game Programming / Identical, but not equal

It’s just a stylistic choice, but personally I find this more readable than a backwards loop:

var length:int = array.length;
for (var i:int = 0; i < length; ++i)
{

}
 
Flag Post

Topic: Game Programming / Storing data in custom events

Originally posted by Arloistale:

Is this a common practice? I might not be looking in the right place, but I don’t see any examples of other events that use variables other than the type.

Just to note, most events use variables like this. See MouseEvent for example; it has properties for the mouse position, whether the button is clicked etc.

 
Flag Post

Topic: Game Programming / Identical, but not equal

Edit: And after a little moment of panic at the lack of a toString() function,

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Array.html#toString()

 
Flag Post

Topic: Game Programming / Storing data in custom events

Of course, you just need to include a variable to hold the unit. Something like:

public class UnitEvent extends Event
{
    // The unit responsible for this event
    public var unit:Unit;

    public function UnitEvent(type:String, unit:Unit)
    {
        super(type);
        this.unit = unit;
    }
}
 
Flag Post

Topic: Game Programming / performance (ByteArray rendering vs copyPixels)

I remember we had something like this before; when testing whether it was quicker to clear the screen with copyPixels or drawRect everyone seemed to get different results.

 
Flag Post

Topic: Game Design / Best place to upload test games

You can use Dropbox for this.

 
Flag Post

Topic: Game Design / Tribulation - 500k Play Stats Breakdown

I wonder why David got twice as many clicks out as anyone else?

 
Flag Post

Topic: Game Programming / Multiple Constructor Functions

You have to call super in your subclass. Something like this:

class MovingHazard extends Hazard {

    public function MovingHazard(initX:int, initY:int, initXVel:int, initYVel:int) {

        super(initX, initY);
    }
}

super calls the constructor of the class you are inheriting from.

 
Flag Post

Topic: Game Design / Need Feedback on Game Idea

Definitely post one of your level sketches so we can better see what you’re talking about.

Then there’s the mechanics of moving water around while keeping it behaving like water. In general, fluid dynamics make for sweet visuals and interesting behaviors, but it’s hard to code up a fluid that behaves properly.

That might not be necessary, depending on how complex the levels are. For example, to show water be transferred from one tank to another via a pipe, you can just play an animation of one tank draining and the other filling up.

 
Flag Post

Topic: Game Programming / A C++ game I made in 3.5 hours.

Originally posted by Mysterymason:
Originally posted by PleaseK:

Suggestion! I recommend not using goto for your current needs.

How else would I jump around my code?

Put the shop, menu etc sections in their own functions. Then you can just call the function instead of goto. Something like this:

int main()
{ 
    cout << "Welcome to Conquer the seas, a pirate themed game where";
    cout << " you have to use ships todefeat an enemy." << endl;
    cout << "Would you like to start? y/n ";
    cin >> decision1;
    if (decision1 == 'y')
    {
        cout << "OK, let's start." << endl << endl;
        menu();
    }
    else
    {
        cout << "Shame, be sure to come back later though!";
        return 1;
    }
}

void menu()
{
    cout << "Gold: " << gold << endl << endl;
    cout << "1. Fight!" << endl;
    cout << "2. Shop." << endl;
    cout << "3. View fleet." << endl;
    cin >> menuselect;

    switch (menuselect)
    {
        case 1:
            fight();
            break;
 
        case 2:
            shop();
            break;
 
        case 3:
            viewFleet();
            break;
    }
}

void fight()
{
    // fight code
    menu();
}

It makes your code a lot more organised and easier to read.

 
Flag Post

Topic: Collaborations / Need Programmer for Demo...

You don’t need to know how to code to use Construct 2. It says right on the homepage, “no programming required”.

 
Flag Post

Topic: Game Programming / GiTD [#24] Voting (Finished!)

Organise a GiTD: Far too short, needs a lot more content.

Wizard’s Quest: I’m not sure what the objective was, my wizard seemed to be invincible and I just wandered around a never ending dungeon picking up the occasional chest. I think I must have been missing something because I’m not sure why so many people voted it first otherwise.

Looper: The best looking game, and a nice idea, but far far too hard. You need to tighten up the controls and tweak the hitboxes, don’t make it too easy but at least make it possible. I really wanted to like this game but ended up rage quitting pretty quickly.

Level Quest: Cleverest use of the “only one level” theme, but a bit repetitive. I got bored and quit before the end.

Pinky’s: I wasn’t able to play this because I accidental set all the controls to the left arrow key. Needs an “are you sure you want to make this changes?” prompt.

Just another shadow: Not actually an original idea, but this was still the only game I played for a decent amount of time. You definitely need to make it so it doesn’t pause whenever text appears, and you need to either add some more variety or remove a few levels because I started to get bored and quit before the end.

Invader Breaker: Good concept, but hard to tell what was going on sometimes. I kept dying without even realising I was being hurt.

Millennium Pork: Difficult to control, kept falling down the pits. Looked very nice though.

Clown Death: Same as Millennium Pork.

The Floor is Lava: I liked this, but needs more variety. It got a bit samey quite quickly.

Bob the Blob: Really nice concept, let down by the lack of polish. The controls aren’t great, the camera’s jerky, it really needed a bit more time.

- My votes -
1st Just Another Shadow
2nd The Floor is Lava

 
Flag Post

Topic: Game Programming / Write a game in flash[haxe] and compile that same code to windows, linux, mobile iOS, flash, and Android into native code

Did you get the other platforms working yet? I’m currently making games for both Flash and Android so this would but pretty handy, but I don’t want to waste time if it’s too difficult to use.

 
Flag Post

Topic: Game Programming / How can I call an array from an external file? (AS3)

You might be able to use an editor like Ogmo or DAME etc instead of making your own, should save you a lot of time.

 
Flag Post

Topic: Game Design / Can you get an update to an existing game sponsored?

I’ve never heard of an idle game getting sponsored at all. I think they’re really only popular on Kongregate and don’t do particularly well on the rest of the internet. There’s no harm in trying to find a sponsorship, but I really wouldn’t keep your hopes up.

 
Flag Post

Topic: Game Design / Deeper Topic: Restrictions (and those damn birds)

I’ve just finished making a shooter/platformer and I’ve made all the mistakes you’ve highlighted here. The player can aim a full 360 degrees with the mouse and there’s no reloading required, the result is that there’s no strategy needed and every level can be completed by holding down the shoot button and running towards the end. I’d to change it, but many of the levels would need to be redesigned.

 
Flag Post

Topic: Game Programming / Citrus Engine Now Free and Opensource

Using an engine does not leave you with only trivial programming to do. It handles a lot of the boiler plate code, but the majority of the game logic must still be done yourself. You’ll have plenty of opportunity to “get down and dirty” with things like AI, which will be largely specific to your project.

 
Flag Post

Topic: Game Programming / Citrus Engine Now Free and Opensource

Originally posted by Senekis93:

Fixed. I mean, why on earth would you want a premade coin, sound manager, particles system or any of their “juicy features”?
I bet all the regulars can code their own over night.

To save time? I’m sure most people here could code a particle system or a sound manager in one night, but then that’s one night gone that you could have spent on the actual gameplay. Have you never heard the old programmers saying “Don’t reinvent the wheel”? If someone’s already written all the relatively dull parts of my game, and they’re offering it to me for free, that’s the kind of opportunity I usually jump at. Seems like this is more of a “if you don’t write every single line yourself you’re not a real programmer” kind of crowd though.

 
Flag Post

Topic: Game Programming / Way to go CuriousGaming, you're gonna be famous!

Looks to me like he just rushed it. I’d bet he could do a lot better if he wanted, but instead he’s spent probably less than 30 minutes on it and then thrown it up on his website without much thought. This really isn’t acceptable when you’re marketing yourself as a learning resource for beginners. Looking at the front page he seems to be making a new post every 2-3 days, maybe he should slow down a bit and start focusing on quality instead of quantity.

 
Flag Post

Topic: Game Programming / Citrus Engine Now Free and Opensource

Bearing in mind I’ve not played around with it yet, just read the website:

  • You don’t have to use the pre-made objects, they’re just there to help you get started. You can modify them, ignore them, or delete them if they’re really bothering you.
  • Box2D comes ready integrated with Citrus, but like the pre-made objects I’m assuming you can just ignore it or swap it out for your preferred physics engine if you want. I don’t see how you’re forced to use it at all.
 
Flag Post

Topic: Game Programming / Citrus Engine Now Free and Opensource

Does anyone have any experience with this? I’ve just been looking through the website and it seems far more featured than flixel or FlashPunk, I’d say it’s a proper engine rather than just a framework. I’m thinking of trying it out for my next project, especially if it’s a sidescroller.

http://citrusengine.com/about/features

 
Flag Post

Topic: Game Programming / Does keypress limit include mouse?

so all affected users will be able to use the mouse just fine.

Shoot is the left mouse button, so I’m guessing it’s not ghosting then. I can tell this will be a long bug to track down.

 
Flag Post

Topic: Game Programming / Does keypress limit include mouse?

I have a shooter/platformer game I’m making, the player is controlled with the arrow keys and you use the mouse to aim and shoot. Some users are reporting that they can’t shoot and jump at the same time, a problem which I can’t recreate. All I can think of is that some keyboards have a limit on the number of keys you can hold down simultaneously, but would this stop the game receiving mouse clicks as well?

 
Flag Post

Topic: Game Design / Making Graphics!?

I was looking for some spritesheet editing software a couple of weeks ago and couldn’t find anything. This GraphicsGale looks like it could be just what I need, thanks.

 
Flag Post

Topic: Game Programming / Finding old project you gave up that could've turned out great

But seriously, I think starting from scratch would be better and maybe less time consuming than continuing this.

I didn’t play the game for very long, but it looks like all it needs is a bit of polish. I think you’d be better just powering through it rather than starting over.