Recent posts by a3lex33 on Kongregate

Flag Post

Topic: Game Programming / Quick question about time[as3]

Hello everyone. Lets imagine that i want some feature in my game, which will depend on real time. For example, making something happen in 1 hour of real time. To do this, i can use user system time. Now, the question: is it possible to somehow prevent user from ‘cheating’ – changing their system time in order to fool the system(in this example, adding 1 hour to system time)? Is it possible to do so without using date from a internet/server? If not, is it possible to do so without using my own server/host and get date from somewhere for free? Language used: as3.

 
Flag Post

Topic: WarLight: Multi-Player / Cheaters

Originally posted by raa275:

Creating multiple accounts to curry things in your own favor is not cheating because everyone does it. You are simply giving yourself an equal edge against other players. This is worst in Rise of Rome and Africa maps because the stakes are so huge.

Seriously? If everyone do it, everyone are cheating. And so do you, guessing by this post.

I am rather disappointed in some people on this thread. Instead of playing fairly and not using multiple accounts, they are behaving aggressively and protecting their holy right to cheat. GG.

 
Flag Post

Topic: Game Programming / This piece of code causes memory leak. Unsure, why.[as3]

Draco, thanks for answer, i was worried about using lot of dots too, will remove “Global.”. About memory leak. I have managed to trace down (new) source of memory leak. It happens after change of TLF textfield text. I have no idea, if how does that happen, but i saw some bug reports about this. It was also in the function above, i just thought that it was not important piece of code to post. Well, blitting made everything faster anyway, that helped too.

Anyone heard of same problem and solution, by any chance?

 
Flag Post

Topic: Game Programming / This piece of code causes memory leak. Unsure, why.[as3]

Originally posted by NineFiveThree:

I suggest you drop the bad habit of using a Global class.

A HUD is only a display. If the fuel gauge in your car fails and displays zero even though you still have fuel, can you still drive the car?
Why is your HUD involved in creating the bullets?

Is there a particular reason why you set your local variables to null?

Why is it a bad habit? It is rather useful to have Global and Data classes, defined like this, to keep most important/most used functions and data in special place.
HUD is not creating bullets. Its only creating images of bullets for users to see on user interface, instead of standard “ammo/clips”.
Yes, there is a reason – me going crazy because of memory leak and discarding all possible sources. I never set variables to null like this usually.

Quick question – is there a way to notice the FPS drop faster? By switching to bitmaps/blitting i lowered the FPS drop speed – FPS went from 30 to 15-17 in 5 minutes before, now its 15 minutes, so there is still something. Is there a way to somehow limit your RAM amount or something for flash player?

 
Flag Post

Topic: Game Programming / This piece of code causes memory leak. Unsure, why.[as3]

Ok, i will try that now. I thought that this could be avoided because there were not so much elements on display(10-20), and the condition to recreate those is rarely true.

 
Flag Post

Topic: Game Programming / This piece of code causes memory leak. Unsure, why.[as3]

The only as3 shootorial i found was the first one. Are you suggesting to do the same thing in document class? Well, i will try, but it would still be great to know if what went wrong on this one.

Edit: moving contents of function inside another function, this time in document class, private, and calling that function instead of old one did not help.

 
Flag Post

Topic: Game Programming / This piece of code causes memory leak. Unsure, why.[as3]

Hello everyone. Can anyone help me with a little problem? I have detected a memory leak, but i am not sure if why does it happen. Below is some code in as3.


//package, imports

public class Global extends EventDispatcher
{

public static function updateHud():void
{
	//some code, in which t is defined
	var curw = Global.curturner.curweapon; //An object
	if (Global.HUD.curam!=curw.ammoleft||Global.HUD.curamm!=curw.maxammo)
	{
		Global.HUD.curam = curw.ammoleft;
		Global.HUD.curamm = curw.maxammo;
		for (i = 0; i < Global.HUD.ammoh.length; ++i)
		{
			if (Global.HUD.ammoh[i].parent!=null)
				t.removeChild(Global.HUD.ammoh[i]);
			Global.HUD.ammoh[i] = null;
		}
		Global.HUD.ammoh = [];
		for (i = 0; i < Global.HUD.curamm; ++i)
		{
			var a;
			if (i < Global.HUD.curam)
			{
				a = new pbullet();
			}
			else
			{
				a = new pempty();
			}
			t.addChild(a);
			Global.HUD.ammoh.push(a);
			a = null;
		}
	}
	curw = null;
}

}

The function above is called on each frame. It have some more code, but this exact piece of code is causing memory leak(memory leak does not happen if that piece of code is commented out). If i understand it correctly, as3 garbage collector collect an object when there are no more active references to this object. This is why i am turning everything in null at end of block. But that does not help, game memory increases and FPS drop. Also, objects are getting removed from “t” correctly, tested with numChildren.

Is there a way to fix it? Is it somehow connected with function being static and vars inside function? If yes, what is the safe way to do the same thing?

 
Flag Post

Topic: Game Programming / Animating via code plus other issues

You will probably want to split character on multiple parts, at least hands and body. This way you can control both. It will look somehow like:


if (running)
{
 body.gotoAndPlay(runninganimationframe);
 if (attacking)
  hands.gotoAndPlay(handsattackingframe);
 else
  hands.gotoAndPlay(handsrunningframe);
}

Or you can do it the hard way and make animations for each kind of movement your character can do: standing-attacking, walking-attacking, standing-not attacking, walking-not attacking. But the amount of all possible combinations will greatly increase that way, you will have to draw each of them.

 
Flag Post

Topic: General Gaming / The "What was that game called?" Thread

Originally posted by gabenn12301:

I searching for a game it was a steampunk like game, it was a turn based game where u could make a 3 person party, the characters had many "role"s like berserker or archer and medic and these all was availeable for all character if u wanted u could easilly switch beetwen them, there was more roles but i cant remember exatly, in the main story u must explore a big tower. In the village was a lot of craftable armors and weapons, in the village u could build buildings like woodcutter store and etc, if anyone know this game name pls tell me. The first boss used flame tipe attack.

The Grinns Tale probably. Not alive anymore.

 
Flag Post

Topic: Game Programming / as3 what is the most efficient way to use enterframes

Did anyone create a game which uses frame enter events in the way Aesica do? I wonder if how big is the performance difference. Also, does switch from pseudo parallel(multiple enter frame events) to linear(loop) affect anything?

 
Flag Post

Topic: Game Programming / Feedback to my new game (critics are very welcome)

Few issues:

Programming:

Strange controls
Cursor only distracts you. Also, it should change position each frame and not only when you are moving the mouse.
The game is slow

Design:

It is unclear if what hurts you and what does not.
A lot of jumps require to be perfect, else you fall to your doom.
It is unclear if what is your goal and where shall you go.
Secrets require too much pixelperfect jumping and are not rewarding.

 
Flag Post

Topic: Game Programming / Convert Shape or Polygon Boundaries To X and Y Coordinates

I don’t know much about differences between quickbox2d and box2dflash, but latter allows you to add multiple fixtures to the body. Create a rectangle first, add it to the body, create circle and add it too. It shall solve your first problem which you have described.

 
Flag Post

Topic: Game of Thrones Ascent: Recruitment (Expand Your House) / Boss Quest Links

http://www.kongregate.com/games/DisruptorBeam/game-of-thrones-ascent?kv_origin=/play/join_quest/280409175

 
Flag Post

Topic: Game of Thrones Ascent: Recruitment (Expand Your House) / Boss Quest Links

http://www.kongregate.com/games/DisruptorBeam/game-of-thrones-ascent?kv_origin=/play/join_quest/280409175

 
Flag Post

Topic: Game Programming / Is our game too hard?

Took me a while to understand if how game works without reading your instructions on this forum. You don’t have enough time to read the instructions when you show them in game. It looks like you have to somehow jump for the gaps in the middle, while in reality you only have to find other way/break walls. It is really hard or impossible to do 3 small gaps ducking chain(red walls), since you can not see if where to move, the possible solution would be making walls transparent.

 
Flag Post

Topic: Game Programming / Is self-promotion of games acceptable in this forum?

Do any of you have a problem with it? Is not it always fun to see if what did other create? I can rarely help with advice and try to solve my programming problems on my own, so i post here rarely. But i visit this forum daily – the community here is good and people always discuss something interesting. Self promoting posts only add to this, so why do you want to ban those kind of posts?

 
Flag Post

Topic: Game Programming / Isometric objects depth[as3]

Sorry, it is hard for me to describe the problem in English. Shake_N_Baker gave a link to the post which illustrates the problem, but i can provide my own pictures if it will help. I am not using any of isometric libraries(the best i found was as3isolib, but it was hard to understand and work with), so i am doing everything manually.

NineFiveThree, i meant that after trying to find solution in google, i found some pages which told that there is no algorithm to calculate object depth for object of any size. Tell me, if i am wrong and there is one.

Shake_N_Baker, can you give me some ideas on how to break objects on 1×1 sized ones? I am not sure if how to slice the texture of object for that.

 
Flag Post

Topic: Game Programming / Isometric objects depth[as3]

Hello. Can anyone help me with objects depth in isometric world? They are all placed on tiles and may have any size. If object position is (x, y), i calculate his depth with x+y and after sort and set objects childIndexes, based on their depth. However, this works well only for 1×1 tile sized objects and does not work well for bigger ones. More, google tells me that there is no way to calculate isometric depth for object of any size. So, is there any way to change childIndexes of objects of any size to prevent them overlaying each other in a wrong way? Do i have to somehow slice my object on multiple ones of 1×1 size?

 
Flag Post

Topic: Game Programming / Looking for people to rate my game

This game seems nice and neat. Took me a while to understand that colors mean nothing, its all about the lines. Would be much more interesting if there was some kind of level unlock path, not just square of all available levels.

 
Flag Post

Topic: General Gaming / What Should I Play?

You seem to like platformer games. First, there is a level pack for meatboy. You could also try spewer, time kufc and my first quantum translocator. And something metroid like, K.O.L.M for example.

 
Flag Post

Topic: Sandbox Hero / Feature Requests (not multiplayer)

Keys, doors and buttons. And also gravity direction changers. This set will allow developers to create extremely fun levels.

 
Flag Post

Topic: Game Programming / Viewing recorded statistics?

Since the thread is necroed… I saw some games using other site to keep track of statistics(some variables). You could see that site adress for a brief moment while game was loading. Do anyone know that site?

 
Flag Post

Topic: Game Design / What do you think about my game?

About the controls, it feels like you are trying to move a box around, not a human being. I believe that its stencyl flaw(since every single stencyl game i played had that problem/messy movement) anyway.

 
Flag Post

Topic: Game Design / A simple question

Hello everyone, i have a simple question for you. Do you enjoy animated(scrolls, fade e.t.c.) menus in game? I hate them because they are slow – you have to wait until the animation completes before i can do anything. And if game is resource taking, the process of waiting can turn into nightmare. But a lot of people use it, so, what is your opinion?

 
Flag Post

Topic: General Gaming / The "What was that game called?" Thread

Originally posted by NielsS1:
Originally posted by wecl0me12:
Originally posted by NielsS1:

Dear people.

A few years ago i played a point n click game.
It was about a guy in a blue shirt who had to escape some castle.
There was some sort of cult involved and with a grey old leader who the main person knew for some reason.
There was a sequel in which they traveld back to time for some reason.

I know it is not much but i hope someone recognizes anything and can help me.
I will update when i remember more details.

I remember something more.
The main character had the possibilty to collect something after which he would get a key that could open every door…
I believe this was a part in the sequel…

escape from really boring island series

No sadly not. It was cartoony instead of stick figures

Was it done in quest form(point and click, inventory, no rpg stuff) and with a little of humour/interesting solutions?