Recent posts by Drakim on Kongregate

Flag Post

Topic: Game Programming / how do you add two numbers in c++

We aren’t here to do your homework.

 
Flag Post

Topic: Game Programming / Webgl-Game Development

There are lots of great free resources on the web on how to do these things. I’ve personally learned to use WebGL with nothing but google searches. You don’t need to spend £14 to get it in book format.

(This is your first post, and you come here to advertise your book? That’s very spammy)

Learning WebGL
WebGL by Mozilla
WebGL Academy

 
Flag Post

Topic: Game Programming / Help Me Guys !

You’ll have more luck asking in the collaborations forum, but be aware that most people aren’t to hot on programming somebody elses game (especially AS2). You’ll have a better shot at making the game by learning how to program yourself.

 
Flag Post

Topic: Game Programming / Sprites stacking on top of each other

Amibtious is correct, blitting is the way to go. When you use Sprites and MovieClips you give up power and flexibility in favor of convenience, and you will eventually run into things you cannot fix because you don’t have control.

 
Flag Post

Topic: Game Programming / What's with all the hate on Unity?

Originally posted by player_03:
Originally posted by Drakim:

that’s the very last thing in the world the web needs right now.

The second-to-last thing being an end to net neutrality?

The internet and the web are two separate things. Net neutrality is also important, but it’s a different topic in a different area.

 
Flag Post

Topic: Game Programming / What's with all the hate on Unity?

Personally I dislike Unity because the whole idea is a move in the wrong direction.

While it’s true that you have to install Flash, this is fundamentally a bad thing and should be recognized as such. It is only “accepted” for legacy reasons (there is so much flash content online now, and it came about because other means like HTML where really lacking back in the ol’ days). The web should fundamentally be made up of HTML, CSS and JavaScript, and not binary blobs swf files that you need closed source binary blog players to view.

When Unity comes onto the stage and says “hey we wanna introduce another binary blob format with our own closed source binary blob player” they deserve all the flack they are getting, because that’s the very last thing in the world the web needs right now.

 
Flag Post

Topic: Game Programming / [C/C++] Optimizing a loop

Originally posted by qwerber:

+1 to Drakim and player_03.

Do you have any suggestions for avoid duplicate vertex stream? because it seems like to me that I have to upload x y velocity and time (5 * 4 bytes) every vertex (unless I’m drawing points) with increases the amount of data I need to push by quite a lot.

I’m entirely sure I understand what you mean by duplicate vertex stream.

I would really recommend points for a particle system rather than triangles, it’s just a much better fit. You can even use textures on points, so as long as your particles don’t need to do absolutely crazy stuff you shouldn’t need anything more than points.

Aside from that, how do other people write their applications so that it runs at speeds like 500 fps :/? Feels like on C++ the draw calls are not as much bottlenecks as on stage3d.

Just double checking, you are drawing all your particles with a singular drawing call right?

 
Flag Post

Topic: Game Programming / [C/C++] Optimizing a loop

(I’m assuming this is a particle system in OpenGL)

You should avoid updating the particle with the CPU in the first place.

Rather, give the particles x, y, velocity, and creationTime attributes, and then have a global currentTime value that the CPU sets every frame.

The GPU can then use (currentTime-creationTime)*velocity to recalculate each particle’s moved position from the original x, y. Note that the GPU doesn’t alter the x, y attributes of the particles each run, it simply uses the time difference to figure out how far the particle will have moved. The CPU only needs to work when you creating a new particle, not every single frame to modify the particle position.

Not only does this free the CPU from this cumbersome work (instead letting the awesome parallel might of the GPU do all the heavy lifting), it also helps you avoid bussing masses of data to the GPU every frame.

Sweet and short article talking about this

(the downside of this is that the GPU might not know of all the things you want to influence the particle’s movement with, such as collisions with your solid terrain)

 
Flag Post

Topic: Game Programming / Html5 sprite sheet problem.

Originally posted by NineFiveThree:

but with very little css (background-image, background-clip) it does.

Nah, those are useful tools for creating a spritesheet system in the DOM. We don’t even know if Decepatcharg is using the DOM, or if he has a spritesheet system in canvas, or even WebGL.

Edit: I am not a clever man, of course I could just have clicked Decepatcharg’s profile to find his game and see for myself.

 
Flag Post

Topic: Game Programming / Html5 sprite sheet problem.

Do you use some sort of framework or library? What exactly do you mean by “sprite sheets”? HTML5 doesn’t have spritesheets natively, so we can’t really help you unless you are describing what you are using and how it went wrong.

 
Flag Post

Topic: Game Programming / Question

Originally posted by xPwnage800:

Different groups as in Admin, Moderator, VIP, etc… and permissions/attributes as commands like ban, mute, etc.

You still aren’t making any sense to me. Are you making an MMO and you need to figure out how to have roles/groups? Or are you making a chat application?

 
Flag Post

Topic: Game Programming / Question

I’m twisting my brain to understand what you are talking about.

What do you mean with “different groups” here? Groups of what? Geese? Ducks?

And what sort of permissions or attributes are you talking about? File permissions? Is this game related at all, or are you dealing with some OS API for handling files?

 
Flag Post

Topic: Game Programming / GFX

That should be okay, you just drew a generic blond archer, you didn’t copypaste the earlier art.

 
Flag Post

Topic: Game Programming / Wheel of Time

Pro: Wheel of Time is awesome

Con: Wheel of Time is the intellectual property of somebody else who can and will sue you for using it without licensing.

 
Flag Post

Topic: Game Programming / Deeper Topic (part 2): Composition over inheritance

Yes but, the first lacks one kind of position, and the second lacks the other kind of position. So the neutral state needs to be position-less (as opposed to hard-coding the position component into the entity class itself).

Either way, I sometimes find myself using entities for non-game-object things, such as a sort of AI mind, with components being various goals, desires and modificatiors. Such an entity doesn’t need a position component.

 
Flag Post

Topic: Game Programming / Deeper Topic (part 2): Composition over inheritance

As for what entity doesn’t have a position, it depends. Say that your game has an overview chess board style view, but also an arena fight-to-the-death view. In such a game, the chess piece entities would want to have a grid based position, and would require a component to do this properly, while the arena entities would want a regular world coordinate postion, and would require a separate component to do that properly.

Of course, you could probably shoehorn both kinds of functionality into a single component with dual use, but other situations can arise (what if the area entities can jump, requiring a z-coordinate?) where you are better off separating the components.

 
Flag Post

Topic: Game Programming / Duck Chat

Depends on how much money you are offering.

 
Flag Post

Topic: Game Programming / HTML5 web storage - which domain will be used ?

The domain the game is uploaded to. Web storage isn’t allowed to access anything else.

 
Flag Post

Topic: Game Programming / [Rant] 10 Reasons Why I Dislike Unity (as a Developer)

This topic has been untouched for more than a year MilitaryG, last post was January 2013.

Furthermore, calling Draco a “programming idiot” is pretty hilarious. I’ll just leave it at that.

 
Flag Post

Topic: Game Programming / Is Kongai still being developed?

I enjoyed the game before I “figured it out” as Draco listed. Now it is essentially random luck (or easy wins against bad players) because the game devolves into a “knew you were thinking that, so I did the opposite” fest.

 
Flag Post

Topic: Game Programming / Confused about programming languages / graphic engines

jQuery is a popular JavaScript library. It’s basically a shortcut library, that a lot of people use to write less code.

If you want to make HTML5 games due to the ease of accessibility, just google “HTML5 canvas game tutorial” and you’ll find plenty of places to get you started.

Whatever you do, do not get Flash Professional. Your confusion over actionscript being a “game engine” stems from the terrible “timeline coding” newbie developers do in Flash Professional. Stay away, get Flash Develop if you want to try out Flash.

 
Flag Post

Topic: Game Programming / Limiting class instantiation and function calls

Make the Class3 constructor take a password parameter and have it throw an error if the password isn’t correct. Don’t tell the password to anybody.

 
Flag Post

Topic: Game Programming / HOT Topic!! Entity Component Systems Revisited.

In my games, I provide no priority value for 95% of all my events/signals (meaning a default priority value of 0).

Priority is mainly there for things that specifically needs to run before (or after) other things.

For instance, it’s pretty important that the armor reduction has a higher priority than the life subtraction, otherwise armor wouldn’t work.

 
Flag Post

Topic: Game Programming / Overriding the + Operator

You can do overloading with Haxe’s abstracts, but that means you won’t be using AS3 anymore.

 
Flag Post

Topic: Game Programming / HOT Topic!! Entity Component Systems Revisited.

I think it’s possible to do without events/signals, but I think it would be a lot more work for very little gain. If an external system is to loop over all the armor components and apply their effect, that system has to be “aware” of those armor components so that it knows how to apply them (for instance by forcing them all to implement an interface).

This, I feel, would be too restrictive. What if you want an armor that stops 50% of the damage from hurting the unit for a five second grace period, and then triggers a new damage event/signal? Or an armor that transfers 25% of the damage taken to the source of the damage? And what if it’s important that certain armor components are applied before some other armor components?

To account for all of these things in an damage component interface would be very hard and unelegant. I think as one attacks the problem and creates a new abstraction, one will end up with something very akin to events/signals anyways (but limited to the armor components).