Recent posts by Orangatang91 on Kongregate

Flag Post

Topic: Game Design / Requesting Feedback

My approach is to figure out a new idea for a game that I have not yet seen implemented. Today’s industry requires quality games which means top level graphics along with fun gameplay. I am not a top game developer but I have played too many games which makes me an pretty good judge of quality and originality. Just by playing two of your games I can see that the graphics are horrendous and the game play isn’t anything new. I can seriously find 50 games that have the same gameplay for each one of your games and they are just better quality. It is easy to make a game but if you want many people to play it, either make it original or make it better than all other similar games. By the way, production of good quality games usually can range from a few months to over a year for single developer games.

 
Flag Post

Topic: Game Programming / Need help with choppy Physics Platformer (QuickBox2d)

Yay, finally figured out what was going on. I ran quickbox2d in Debug mode and there I can see that the rightSide and leftSide were continuously colliding and touching the main player Body causing weird movement effects. To fix this I applied the same velocity on both the rightSide and leftSide as that of the main player, and put this all in an enterFrame function. Thanks guys I can finally continue with the game. :D

 
Flag Post

Topic: Game Programming / Need help with choppy Physics Platformer (QuickBox2d)

I see, the step function for quickbox2d seems to apply the same step function in box2d. Thank you all for the help :D, I will work on it and post results if I get them fixed.

 
Flag Post

Topic: Game Programming / Need help with choppy Physics Platformer (QuickBox2d)

Ok, I have tried forces and impulses they just don’t seem to give me smooth results (this one seems smoother than the others) maybe I did not apply them correctly, I will try them again. As for your second statement, it is being called in my step function!!! How else am I supposed to check for keyboard events?? Should I use an enterFrame function or keyboardEventListeners?

 
Flag Post

Topic: Game Programming / Need help with choppy Physics Platformer (QuickBox2d)

Hey guys,
Need help with my physics platformer game that I have been working on for quite some time now. Basically I have much of the engine for creating levels ready and all but I cannot continue to actually make the levels until I am satisfied with the smoothness of player controls and movement. I do not know what it is but sometimes the main character will jump less high then he normally does or he seems to just slow down randomly to the point where it is not playable. I do not think this is a performance issue as the FPS seems to stay normal when this happens. Been trying for quite some time to fix this but all attempts have failed. Instead of using box2d directly I am using the quickbox2d engine which sort of takes box2d and makes it easier to use. The game is linked here to show you what I am talking about (just keep moving around and you should see how the controls are not always smooth). Arrow keys move and jump the character, down can be pressed to kinda fly indefinitely. Also a couple enemies are on that level, I change their velocity to a certain speed every frame but somehow when they hit my character they seem to lose their normal speed. Below is some code showing the most likely places that need to be changed.

Complete character movement (this runs every frame):

levelVelocity = player.body.GetLinearVelocity();  //(levelVelocity is just the             //velocity of the player) this stores the current velocity of the player
			
			levelVelocity.x *= .999; //Simulates some friction
			
			if (levelVelocity.y >= 12)	{
				levelVelocity.y = 12;   //limits y velocity
			}
			
			if (levelVelocity.x >= 10)	{
				levelVelocity.x = 10;   //limits x velocity
			} else if (levelVelocity.x <= -10) {
				levelVelocity.x = -10;  //limits x velocity
			}
			
			
		               //CHARACTER CONTROLS
				if (Input.kd("A", "LEFT")) {
						levelVelocity.x = levelVelocity.x < -1 * _max ? _max * -1 : levelVelocity.x - 1;
					if (LevelLoader.canGoLeft) {
						player.body.SetLinearVelocity(levelVelocity);   
//Sets players velocity only if the left side is not currently in a collision with a wall or any object.
					}}
				
				if (Input.kd("D", "RIGHT")) {
						levelVelocity.x = levelVelocity.x > _max ? _max : levelVelocity.x + 1;
					if(LevelLoader.canGoRight) {
						player.body.SetLinearVelocity(levelVelocity);  
//Sets players velocity only if the left side is not currently in a collision with a wall or any object.
					}}
					
                                        if (Input.kd("W", "UP")) {
						player.body.SetLinearVelocity(new b2Vec2(player.body.GetLinearVelocity().x, -10) );
//Sets players y velocity to 10 units upward and x velocity to current player's x velocity.
						jumping = true;
					}
				
				if (Input.kd("S", "DOWN")) {
					LevelLoader.foot.body.SetLinearVelocity(new b2Vec2(player.body.GetLinearVelocity().x, -10) ); 
//Leaves x velocity alone and sets y velocity to 10 units upward to create flying effect.
				}

Any constructive advice or hunches would be much appreciated. Thank you all in advance! :D

 
Flag Post

Topic: Game Programming / Engines like QuickBox2d?

Yes I think that would be too much. You can also create polygon shapes with box2d or group two or more shapes together into one. Instead of making the circles follow your enemies you are going to have to make your enemies follow the circles, check out the section in skinning. They shouldn’t overlap unless you change their default groupindex. You can easily make the circle (quickobject) invisible by using circle.userdata.visible = false; or circle.userdata.alpha = 0; but those do not need to be implemented if your are using the quickobject’s skinning property. Furthermore I am an idiot for believing that grouped objects do not automatically create a corresponding body as I have found out that they do! Mine was not working correctly because I set all the quickobjects to be static (density of zero) before grouping them. Ma baaad!

 
Flag Post

Topic: Game Programming / Engines like QuickBox2d?

If there aren’t that many enemies it shouldn’t take up too much processing power. I would just calculate the distance of each enemy from the others and if any of these distances is too close (which causes overlapping) then have them turn around, or stop, or whatever you think they should do… Alternatively quickbox2d should help you with enemy collisions such that if they do collide, most likely they still will not overlap (as long as these enemies are quickbox2d objects). Here’s a really good set of tutorials for people beginning to use quickbox2d.

 
Flag Post

Topic: Game Programming / Engines like QuickBox2d?

Hey guys was wondering if there are any other engines that make Box2d coding easier like QuickBox2d. Been having a lot of success with quickbox2d’s easy collision management and object creation. The only real problem I have with it is that grouped objects do not have any body properties, so it is not as easy to manipulate grouped objects. For example: My code groups many box objects which create one level, but to move this level I can only change it’s x and y values rather than giving it’s body the desired b2Vec2 (box2d velocity vector). This seems to cause easy collision bugs with other objects. If there is anyone who knows more about this engine please tell me if there are any other ways of updating a grouped object’s position (or change it’s velocity) without compromising it’s collisions with other objects. And if there are any alternative box2d utilizing engines I would be happy to look thoroughly into them.
[EDIT] PROBLEM SOLVED. GROUP OBJECTS DO HAVE A BODY PROPERTY. MINE JUST DIDN’T WORK BECAUSE I SET MY OBJECTS TO BE STATIC (DENSITY OF ZERO) BEFORE GROUPING THEM.

 
Flag Post

Topic: Collaborations / Need Tiles and Main Character for Upcoming Platformer

Of course I will message you if I do. Thank You :D

 
Flag Post

Topic: Game Programming / Best practices for level storing and loading

I’ve been thinking about this for a while. Unknown Guardian I would definitely like to copy your method as it seems like a very clean and compressed method but I do not know how. Can you lead me to the right direction to figure out how to convert lets say an array of integers from 1-20 each representing a specific tile into a byte array and use Base64 to compress it? I should be able to figure out the reverse process of decoding it from there.

[EDIT] Never mind this isn’t very hard at all. Found a good tutorial to teach it all to me: Here it is
Although converting my tile Array using this method did not seem very efficient due to the complex level problem.

 
Flag Post

Topic: Collaborations / Need Tiles and Main Character for Upcoming Platformer

I think I will be creating my own music but thanks for the offfer Di3oxide.

 
Flag Post

Topic: Collaborations / Need Tiles and Main Character for Upcoming Platformer

Hey Guys I’m looking for someone who can create simple yet elegant tiles for my upcoming platform game. It will be unlike any other platformer I have experienced and I already have most of the game engine layed out. All I need are various types of tiles (25×25 pixels) probably 20 or so will do. To be more specific I may need some tiles which look like ice, sand, spikes, canons, grass, glass etc.. This platformer will be utilizing the Box2d Engine so it will look and feel more realistic. Also due to this fact my main character needs to be created out of only simple shapes such as circles, squares, rectangles, triangles, or simplistic polygons (this will make it easier to integrate into the box2d engine). A walking, running, and jumping animation would be necessary as well. I’m sure there are hundreds of more talented and creative artists than me so show me what you can do! Since I need quality graphics I am willing to offer around 5-10% total revenue share depending on the quality and quantity of the graphics/animation; as well as artist and animation credits with optional links to your website/blog/work/whatever you want. If you have any other general questions please do not hesitate to reply to this post. If you have any personal questions or interest in this offer please email me:
ariel_f21@yahoo.com (contains an underscore)
I must warn you however that I am a busy college student with a part-time job. I take my time to create the best possible games so it may take me a while to complete it. But with your ambition and dedication I am sure we can create a game to commemorate for years to come.

 
Flag Post

Topic: Collaborations / Good quality artist needed for a new flash game

Use As3 just in case u didn’t read all the other replies.

 
Flag Post

Topic: Game Programming / AS3-Manipulate Scene 1 inside a MC.

Try to be more specific so we know what your problem is. What do you want to change about Scene 1? Also I am assuming you are using AS2 since you wrote you are “inside a movieclip” is that correct?

 
Flag Post

Topic: Game Programming / Failed Attempt at SideScrolling Platformer Smart Camera

Ive tried still can’t seem to get it to work :(. Since my method is not working Ill try to copy Emanuele Feronato as3 smart camera
In the meantime does anyone else know a similar article about this topic? I would imagine it’s very common for platformer games although I can’t seem to find any other good articles explaining it.

 
Flag Post

Topic: Game Programming / Failed Attempt at SideScrolling Platformer Smart Camera

Hey Guys, title says it all although I am very very close to having it run how I want it to run. The basic concept behind my “smart camera” is that I move the level until it reaches it’s boundaries then I start to move the character. Problem is the way I coded it makes it so that when the level reaches it’s maximum boundary the character AND the level alternate in moving while the level keeps getting reset to keep it from going off-screen resulting in a very bumpy platformer camera. Here is the SWF (Arrow Keys or WASD to move sorry no collisions yet). As you can see if you reach a level boundary the character does in fact start to move but so does the level.
Here is the culprit of the problem:

//loop is an ENTERFRAME function
//_x2, _y2 are the velocities of the character
//_x1, _y1 are the velocities of the level
private function loop(e:Event):void {
		
			followRunner = true;
			
			if (entireLevel.x > 0) {
				followRunner = false;
				entireLevel.x = 0;
				_x2 = -_x1;
			} else if(entireLevel.x < stage.stageWidth-width1*25) {
				followRunner = false;
				entireLevel.x = stage.stageWidth - width1 * 25;
				_x2 = -_x1;
			}
			
			
			if (entireLevel.y > 0) {
				followRunner = false;
				entireLevel.y = 0;
				_y2 = -_y1;
			} else if (entireLevel.y < stage.stageHeight-height1*25) {
				followRunner = false;
				entireLevel.y = stage.stageHeight - height1 * 25;
				_y2 = -_y1;
			}

			
			if (followRunner) {
				moveLevel();
			}
			else {
				moveRunner();
			}

Tracing the followRunner variable I always get alternating true/false when the level has reached it’s boundary (else if statements above). If there is an easy way to fix this I will be angry (but thankful) because I’ve tried my best.
-Thanks Guys :D

 
Flag Post

Topic: Game Programming / Worried

Originally posted by ErlendHL:
Originally posted by Orangatang91:

I’ve heard the world is gonna end in 2012. So ya do it really fast.

Lol that’s bullshit there’s only gonna be a change.

Mmmm what change? And HTML5 taking over flash is also bullshit don’t worry about it.

 
Flag Post

Topic: Game Programming / Worried

I’ve heard the world is gonna end in 2012. So ya do it really fast.

 
Flag Post

Topic: Game Programming / Level Editor Using Tiles is Lagging [AS3]

Originally posted by NineFiveThree:
Originally posted by Orangatang91:

So I guess I just gotta make two or more maximized BitmapData objects and combine them onto one Bitmap.

no.
That’s not what blitting is all about.
You can’t display that huge bitmapData either.
How many 25×25 tiles fit on your screeen/the area you want to display your map?
Add 2 to that on each axis and you have the size of your bitmapData.

Now store your map data somewhere else, either use an (multidimensional) array, or alternatively: a bitmapData.
Use that as a data structure, with each pixel representing one tile.
(create an array of your tile textures, set the color of a pixel to the corresponding index of the array).

Now figure out what part of your map has to be rendered and get the pixel values from your “texture data bitmapData”, blit these tiles.
Done.

Ok so the area of tiles displaying the map is 20×13 tiles which is 260 tiles total, adding 2 tiles on each axis its 22×15 which translates to a bitmapData width of 550 and height of 375 pixels. Now I am not very familiar with data structures or blitting so I will look them up and try to understand the rest.
-Thank you everyone, your help is much appreciated. :D

 
Flag Post

Topic: Game Programming / Level Editor Using Tiles is Lagging [AS3]

Originally posted by Senekis93:

The one you’re copying pixels to. bitmap_Data in this case.

Throw some traces to your bd size. I remember getting that error once when a bitmapdata was getting 0 width and 0 height (my fault).

Well my bitmap_Data size never reaches 0 width or 0 height instead I believe it is surpassing the maximum value. I looked into the actual BitmapData Class and I found this relevent information:

In AIR 1.5 and Flash Player 10, the maximum size for a BitmapData object is 8,191 pixels in width or height, and the total number of pixels cannot exceed 16,777,215 pixels. (So, if a BitmapData object is 8,191 pixels wide, it can only be 2,048 pixels high.)

  • @throws ArgumentError width and/or height exceed the maximum dimensions.

[EDIT]
So I guess I just have to make around 38 maximized BitmapData objects and combine them onto one Bitmap?
-Total pixels needed for 1000×1000 tile map with each tile being 25×25 pixels should be around 625 million pixels?
-625,000,000 / 16,777,215 = 37.25 maximized BitmapData objects. :(

 
Flag Post

Topic: Game Programming / Level Editor Using Tiles is Lagging [AS3]

Originally posted by NineFiveThree:

lock your bitmapData before you copyPixels, unlock it again afterwards, this prevents any rerendering inbetween your modifications

Do not know which bitmapData you are talking about so I did all possible combinations which still results in the same error.

Here is the new code locking and unlocking both bitmapData variables

 
Flag Post

Topic: Game Programming / Level Editor Using Tiles is Lagging [AS3]

Thanks JWB the copy pixels method works up to about 150 × 150 with no lag whatsoever; however when I try something bigger like 250 × 250 I get this wierd error:

ArgumentError: Error #2015: Invalid BitmapData.
at flash.display::BitmapData/ctor()
at flash.display::BitmapData()
at LevelEditor/setSize()
at LevelEditor/dimChange()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at fl.controls::NumericStepper/setValue()
at fl.controls::NumericStepper/keyDownHandler()

Debug Mode cannot find the source code of the error as well.
Here is my code

 
Flag Post

Topic: Game Programming / Level Editor Using Tiles is Lagging [AS3]

My goal is to create a level editor that works swiftly with a map of about 1000 by 1000 tiles. Each tile is 25×25 pixels. My problem is that when I set the dimensions of my level using my setSize() function, if the dimensions are greater than 75×75 tiles I experience major lag issues and sometimes flash crashes on me. I read this recent post which explains how using movieclips is a “performance killer” for tile-based maps. And I have tried using one bitmap instead of many many movieclips but both seem to lag horribly over 75×75 tiles (the movieclip one seems to lag less). I still consider myself an AS3 novice so I am probably doing something inefficiently. Here are my AS3 setSize() functions (which is the source of lag) for these two cases:

MovieClip

Bitmap

Here are the two SWF’s where you can test it yourselves (change width and height settings at the top) but BEWARE setting the dimensions too high may cause your web browser to crash!:

MovieClip

Bitmap

 
Flag Post

Topic: Game Programming / How many lines of code do you use.

My game Particle Lab took about 5k lines of code (not including the FLiNT particle Engine) which probably could be reduced to 3.5k because I made it so that it would work, I didn’t have efficiency in mind.

 
Flag Post

Topic: General Gaming / What's the Best Game You've Ever Played And Why?

Starcraft2 because it is not just one type of game. The main game involves obtaining minerals and strategically building up forces to destroy your enemies. But the custom games are quite addicting as well. They are like multiplayer flash games except with the super good starcraft2 graphics. Custom games can be RTS, Shooter, Puzzle, Action, or pretty much anything that a map creator wants to make.