Recent posts by RTL_Shadow on Kongregate

Flag Post

Topic: Game Programming / 2D in Unity

I’m trying to make Unity work on the windows phone- but I’m having an issue with the camera. When the projection mode is set to Orthographic and the viewport rect is 5:3 (aspect ratio of windows phone) my 800×480 image placed on the screen looks too fat and not tall enough. Is there a trick to getting the Unity 2D camera to work with pixel-perfect 2D?

 
Flag Post

Topic: Collaborations / Looking for Pixel Artist

I’m looking for an artist that is willing to work on a Bunny Invasion-esque mobile game built in Unity.

What I’m looking for:

- Pixel Art Experience

- Relatively fast work speed

- Ability to communicate effectively and be able to modify work to suit needs

Contact me at rtlshadow (at) gmail.com for more details.

 
Flag Post

Topic: Collaborations / 2D Game Artist & Animator looking for new clients

I really like your art, Sandra. Keep it up.

 
Flag Post

Topic: Game Programming / Random Name Generator!

The entirety of this forum has become a ego contest. Seriously it’s absolutely how pathetic some of you act.

 
Flag Post

Topic: Game Programming / Tilesheet w/ Blitting

Alright thanks! Makes much more sense now.

@qwerber The game isn’t slow now, I’m just planning ahead. I will definitely keep those in mind though. Thanks.

 
Flag Post

Topic: Game Programming / Tilesheet w/ Blitting

@Lucidius
Thanks! I’ll be sure to take all that into mind when finishing the engine. Although, I do have a question. Doesn’t flash render at the end of each frame loop (i.e. 60/30/24 times a second)? I’m not entirely sure if it renders it after each copyPixels call- that wouldn’t make sense.

@qwerber
Could you elaborate on the “rate determining step” portion? Thanks.

 
Flag Post

Topic: Game Programming / Tilesheet w/ Blitting

I’ve done tilesheets a ridiculous amount in AS3, but I’m going to attempt to make one with blitting. I’m wondering if anyone has experience with it and what the best way to take advantage of blitting grids might be.

To be clear when I say tilesheets I mean blitting tiles of a tile-based system to the screen. I could copyPixels each tile to the canvas individually, but is there a faster way to do it that involves less individual calls?

 
Flag Post

Topic: Game Programming / Detention Simulator - Feedback please

Hey Danny,

Might I suggest some more gameplay? I realize it’s a detention sim game but there could still be things to do, such as pass notes, throw airplanes, and get caught by the teacher. Your collision detection is also way off, you might want to look into checking the position more often, or ahead of time.

 
Flag Post

Topic: Game Programming / AS3 Tips and Tricks

@Lucidius
Iterating backwards through arrays is good practice even when not considering performance. If you remove an element while mid-loop it will not disrupt anything if you are iterating backwards.

 
Flag Post

Topic: Game Programming / Native mouse cursor replacement

// shitty pseudocode
if (nativeCursor.type == "HAND") { //AKA over a button
    customCursor.setAs("HAND");
}

alternatively:

customCusor.setAs(nativeCursor.type);

Keep in mind I just glanced over the article so I could just be rambling nonsense here.

 
Flag Post

Topic: Game Programming / Native mouse cursor replacement

Originally posted by Feffers:

Quickly did a google search and found this. You can even do animated cursors.

THIS CHANGES EVERYTHING

 
Flag Post

Topic: Game Programming / FlashDevelop's flawed Features

FD easily has one of the best autocompletion and function generation I’ve used. Only thing that would make it better is a native minimap.

 
Flag Post

Topic: Game Programming / How to Give Yourself a Heart Attack

Originally posted by ST3ALTH15:
Originally posted by UnknownGuardian:

Use GitHub for projects you want to be public. That helps with social rep in programmer community. Use Bitbucket for private repos.

There really is a reason why we keep pushing git. It is worth it.

This git thing sounds pretty neat… could you link me a nice starting the process guide?

Git is great. MJW just did a fantastic tutorial on it here.

 
Flag Post

Topic: Game Programming / Accurate Circle Collision

Originally posted by Dealmaster13:
Originally posted by RTL_Shadow:

Here’s what I’ve got now:

	private function calculateCollision(entity1:BallEntity, entity2:BallEntity):Point
		{
			var dir:Number = Math.atan2(entity1.y - entity2.y, entity1.x - entity2.x);
			var newVel:Point = new Point();
			newVel.x = (entity2.vel.x * (entity2.radius - entity1.radius) + (2 * entity1.radius * entity1.vel.x)) / (entity1.radius + entity2.radius);
			newVel.y = (entity2.vel.y * (entity2.radius - entity1.radius) + (2 * entity1.radius * entity1.vel.y)) / (entity1.radius + entity2.radius);
			return newVel;
		}

Now if either of the balls are at 0 vel it just sits there, is there a way to get around this?

That can be the case if the radii are equal and entity1 has 0 velocity

I’m not too sure what you’re doing since you only calculate one new velocity in this function

If you’ve come up with this equation yourself, then definitely have a look online for other equations for ball collisions and pick out the differences

The new velocity is the one for the ball I want to move, the other one I would like not to have move from being hit.
 
Flag Post

Topic: Game Programming / Accurate Circle Collision

Originally posted by player_03:

So… you declare this “dir” variable and never use it?

Anyway, check out this explanation.

Sorry, leftover from previous code.

 
Flag Post

Topic: Game Programming / How to wrap a .swf as a standalone .exe for Steam?

Originally posted by GameBuilder15:

Cool. Does anyone know how easy it is for something to get Greenlit? Would something rated 3.5 on Kong be able to make the cut? I’m not active on Steam so I have no idea.

Absolutely not. It’s ridiculously hard for a multiple-person studio with a decent backing to even get on. You need a large fanbase (we’re talking hundreds of thousands of dedicated people.)

 
Flag Post

Topic: Game Programming / Accurate Circle Collision

Here’s what I’ve got now:

	private function calculateCollision(entity1:BallEntity, entity2:BallEntity):Point
		{
			var dir:Number = Math.atan2(entity1.y - entity2.y, entity1.x - entity2.x);
			var newVel:Point = new Point();
			newVel.x = (entity2.vel.x * (entity2.radius - entity1.radius) + (2 * entity1.radius * entity1.vel.x)) / (entity1.radius + entity2.radius);
			newVel.y = (entity2.vel.y * (entity2.radius - entity1.radius) + (2 * entity1.radius * entity1.vel.y)) / (entity1.radius + entity2.radius);
			return newVel;
		}

Now if either of the balls are at 0 vel it just sits there, is there a way to get around this?

 
Flag Post

Topic: Game Programming / Accurate Circle Collision

I’m using this formula to calculate the new velocity when two balls hit:

newVel.x = (entity1.vel.x * (entity1.radius - entity1.radius) + (2 * entity1.radius * entity1.vel.x)) / (entity1.radius + entity1.radius);
newVel.y = (entity1.vel.y * (entity1.radius - entity1.radius) + (2 * entity1.radius * entity1.vel.y)) / (entity1.radius + entity1.radius);
return newVel;

However the balls will sometimes keep going the same direction (but faster) or accelerate faster away when they hit (really fast). entity1’s velocity is 0, and both radii are 15. Is there a better way to go about this?

 
Flag Post

Topic: Game Programming / Platformers, x, y, and stuff like that

Originally posted by UnknownGuardian:

No offense, but what math are you talking about? I don’t do a whole ton of complex math in games at all. At most, a sin or cos for player/bullet movement.

Linear algebra is used a shit ton in games, especially 3D ones. Its always a good starting point.

 
Flag Post

Topic: Game Programming / Platformers, x, y, and stuff like that

Originally posted by GameBuilder15:
Originally posted by RTL_Shadow:

Khanacademy.com is awesome, start there and learn Linear Algebra.

Finally sat down and tried it. I’ve been at it an hour so far, and it is awesome. Thanks, RTL.

<3, Awesome resource. Great place to further knowledge on tons of subjects.

 
Flag Post

Topic: Game Programming / AS2 Score System Display Help

Hey kidongo,

Could you post your code for us? It will help us be able to understand what you are doing wrong.

 
Flag Post

Topic: Game Programming / Building a linked chain

Pull your elevator up, but mask it using the bounding box of your drill. When the drill passes that chain, set visible=false to stop it from rendering and if it updates at all (which should ideally be handled in the Drill class) stop it from updating.

 
Flag Post

Topic: Game Programming / Show us a screenshot of what you're working on!

Originally posted by DannyDaNinja:
Originally posted by feartehstickman:
Originally posted by GameBuilder15:

Looks good, Danny. By the way, if you haven’t already, make sure you do something about the game’s performance; the demo was super laggy.

If you haven’t already, turn the background into a Bitmap data. Because if you drew it in Flash, it’ll cause momumental lag.

Definitely will do!


Set the cacheAsBitmap property to true. If you’re not doing any scaling/rotation of it that will help lots.
 
Flag Post

Topic: Game Programming / Oh Flash (Nonsensical Error)

Originally posted by feartehstickman:

Timelining for animations is fine (if you’re not blitting).

Even in that case it’s “okay”. Lots of people will draw their sprites from the timeline dynamically to their bitmaps.

 
Flag Post

Topic: Game Programming / as2: map array

Originally posted by Draco18s:
Originally posted by RTL_Shadow:


x – x % Tile.Width where x is 200 and the width is 24 you get 196 which is the closest tile’s origin.

Actually its equivalent to Math.floor(x / Tile.Width). So it’s not technically the closest.

x = 23 won’t get you Tiles[1] it’ll get you Tiles[0] despite being closer to Tiles[1].

Closest is a relative term. If you mean by origin, yes. But in this case x = 23 getting Tiles0 would be correct because the point (23, 0) is inside Tile0. But you’re right, I should’ve used a different wording.