Recent posts by Senekis93 on Kongregate

Flag Post

Topic: Game Programming / LucasArts releases Jedi codes

Gotta love the 80-20% comments/code ratio.

 
Flag Post

Topic: Game Programming / gotoAndStop (AS3) [Solved]

What you did is better, as it just clears the array instead of making a new one.

 
Flag Post

Topic: Game Programming / Cursor follows mouse even though told not to [Solved]

It seems it just ignores it:

        private function init(e:Event):void{whatever:void;}

        private function init(event:Event):void{
            _as3_getlocal <0> 
            _as3_pushscope 
            _as3_returnvoid 
        }
 
Flag Post

Topic: Game Programming / Cursor follows mouse even though told not to [Solved]

Interesting.
All I’ve been able to find by testing is that the first part can be anything, even undefined stuff, but the second value (after the colon) must be a valid object.

 
Flag Post

Topic: Game Programming / Cursor on top

And that’s why I always tell people not to follow tutorials. You can’t place code “on” the objects, like in AS2.
Use classes, FD, etc.

 
Flag Post

Topic: Kongregate / Complaint: pseudo news ad-show

Firefox has a built in “inspect element” method. Firebug is just a way more powerful tool for developers, but that does’t mean you need it in order to inspect elements and their data.

 
Flag Post

Topic: Game Programming / Games for the people?

Originally posted by JensRasch:

“since in the end, they will be your market and your games have to meet their needs.” People being used to free games are quick to run over to pirate bay or similar. They will not buy your game, even if you put your whole life in it and sell it for 5$ each. They just won’t. Receiving something for free requires people to be grateful. If they are not, they are spoiled and not worth my time. This is where MY time comes in as currency.

Good luck having people to be grateful after you give them your rotten food (or games, in this case).
Your argument sums up to “If my games suck, it’s their fault for not liking them, not mine for sucking at this”.

Also, if they (we) aren’t worth your time, why do you even bother ranting about it? That’s inconsistent. All of your “arguments” in here are. Perhaps you should stop publishing games, that way your only player (yourself) will tell you exactly what you want to hear and you’d save us from this idiotic nonsense.

By the way, I’m one of those used to free stuff who use Pirate Bay for most things, yet I do pay for stuff when I like it. Stop making excuses; your games suck. You want people to praise your random apps, then bitch about anyone telling you how to improve them, and finally say they aren’t worth your time and that their opinions are worthless. And now you come here to spam and try to validate your flawed logic.

fail.png

E: Saybox: lol.

 
Flag Post

Topic: Game Programming / list problem

How does it fuck up? How and when does it stop working?
Post any other code that interacts with that, and a picture or SWF itself if you don’t mind.

 
Flag Post

Topic: Game Programming / Games for the people?

That depends entirely on what you make games for.
If you expect to become a famous dev, make a name for yourself and eventually start selling games, or if you expect to be praised, as it seems to be your case, then you have to listen to what they say, since in the end, they will be your market and your games have to meet their needs.

Giving something for free doesn’t mean people should like i or even be grateful about it. I can always go give some rotten food for free to the poor, you know.

What do you want from your players?

Nothing. I make games for myself, not for them. If they happen to like them, that’s just a bonus.

 
Flag Post

Topic: Kongregate / Request for a Feature. Online save.

It wouldn’t be an automatic process; it’d be up to the user to manually update his/her online backup.
Making it part of Kong+ and setting some limitations such as bandwidth/month usage would be a good way to implement it.

I requested this long time ago (when the K+ thing started):
That’s as official as it gets. Take it as you want. Given that it was requested over a year ago, I’m losing my hope on this.

 
Flag Post

Topic: Game Programming / [Q] Do I Need External Scripts?

Originally posted by Draco18s:
Originally posted by Elyzius:

I’m sure there is more than one valid answer to this question, but if I were you, I’d put the moveBall function in Game.as.

Consider this: The ball is not an intelligent object. It does not actively make decisions on where to go based on what its goals are and what paths are available to it.

Consider this: an object should control its own properties and behaviors, for example, a spring may not be intelligent, but it has behaviors that are not externally controlled.

There are no shoulds here. An object could

I’d go with Elyzius on this one.
First of all, the performance is way better: It saves you the overhead of calling ball[i].move() N times/loop and having each ball run a bunch of loops for pathfinding, collisions and other stuff.
Also, it would make your Ball class easier to reuse, since it will only know the mandatory information for it, such as position and radius. If you start adding game-specific logic to each object, they become useless for future projects.
ie;

     public function move():void{
           calculateVector(); /* Update the movement data (angle, velocity, etc)
           based on environment changes such as wind. */
           findPath(); 
           collisions();
           updatePosition();
    }

Then you make another game and you can’t reuse that class because your new game has no wind, or no gravity, or no path to find; you just want a ball updating its position based on an arbitrary value.

 
Flag Post

Topic: Game Programming / Motion Event Problem?

It means you’re making a reference to something called starAppear, which isn’t defined.

The issue is at var starAppear_animator:Animator = new Animator(starAppear_xml, starAppear);

 
Flag Post

Topic: Game Programming / What does this mean?

The parent property of an object is a reference to the instance of DisplayObjectContainer which added the DisplayObject in question to the display list.

ie;

 // instance of World
  ...
  addChild(mountain);

The parent of that instance of Mountain would be the instance of World.

removeChild tells it to remove it from the display list.

 
Flag Post

Topic: Game Programming / [Q] Do I Need External Scripts?

There’s no right and wrong here; it’s your code, structure it as it suits you the best.
You should ask yourself what’s the best for your application and yourself. Never do something in a particular way just because it fits some arbitrary paradigm. I’m not telling you to disregard programming paradigms, but rather to be eclectic. Coding involves two things; a human and a bunch of tools. Having that many tools available, it’s up to you to use the ones better suited for the task; combine and modify them when necessary. Never adjust yourself to the tool.

 
Flag Post

Topic: Game Programming / SWF ENCRYPTION

The only functional encryption trick I’ve seen was Skyboy’s method where he added some asm code that trapped decompilers in nonsense loops. Don’t have a link. Point is, all of the commercial/publicly available ones fail.

If you really need to somehow protect its code, I think the best would be to throw a simple sitelock and make your own obfuscator, making sure that whatever it changes doesn’t hit performance. That said, as long as one person bothers to spend a couple of hours, days or weeks (depending on how well you protected it) reading and figuring it out, it won’t be safe. All clientside protection can do is to delay the time it takes for people to do whatever they want to do with your code.

E: Found the link. Although in that one he seems to have user a different method involving a Loader.

 
Flag Post

Topic: Kongregate / How to post GIFs in chat?

Originally posted by Seizan_7:
Originally posted by IceWeaselX:

People are exploiting the parser. You aren’t supposed to do it.[Citation needed]


Originally posted by Kongregate:
Don’t spam.
 
Flag Post

Topic: Game Programming / Programming and working

I was alright with sleeping for as little as 6 hours per day for four nights straight

Ha. I’ve been alright with sleeping for as much as 6 hours per day for ten years straight.

 
Flag Post

Topic: Game Programming / Testing a Java application

When you upload a game, it isn’t published but rather displayed in “preview mode”. Until you make it public, noone but you will be able to see or load it (unless you share it with someone else).

 
Flag Post

Topic: Game Programming / How to make a click and drag formulary in Flash

fearthestickman: It’d be better to use a mouseMove listener instead of the boolean/frame thing.

 
Flag Post

Topic: Game Programming / Best way to learn flash?

As usual, that depends entirely on what’s the best learning method for you.
With that question, all we can do is to tell you what suits us the best.

I avoid tutorials like the plague, stick to the docs whenever I’m stuck with something and sometimes I read articles about performance or theory.

I started by following tutorials and trying to get a playable game as fast as possible. Then realized that was plain stupid because I was learning nothing but the bad practices of the author of the tutorial. Then I switched to AS3/FD and besides giving a quick read to a tutorial just to see the structure of AS3, I started using the docs and this forum/GDR for any doubt I may have. Currently, the theory/practice ratio for me must be around 90/10%. The key is to understand what you’re doing, once you have that, coding a fully functional and bug-free application is the only logical conclusion. I’m quite happy wih the results, but again, that’s what works for me. This isn’t something you should ask to others but rather something you should ask to yourself.

 
Flag Post

Topic: Game Programming / uint/int/number thingums

In that case, 2.4 was the odd one. And I say it’s magic because it only happened with that particular test and I can’t think of a valid reason for that. That’s why I suggest to stick with Number when dealing with any fraction; you never know when one (or many) of these nonsenses are going to happen and using a Number fixes it.

Made another test: http://www.fastswf.com/AMStcUI
The difference between using Int or Number is clearer here.

 
Flag Post

Topic: Game Programming / uint/int/number thingums

That’s because the Int*=Num involves an extra cast.
Numerical datatypes are a hell. A few rules I tend to apply:

Bitwise operations: int
iterators: int
Anything involving decimals or that may result in a decimal value: Number
uint: Only when totally necessary.

That said, when there are performance issues, it’s always better to check again and run some tests.

ie, if I run the loop with i*=N where i=2 and N=6.4, it takes it an average of 21 ms. If I change the value of N to 2.4, the i*=N loop jumps to 63 ms. Don’t ask me why. It’s magic. Also, it’s important to note that the rest of the multiplications will take the same time with N=6.4 or N=2.4

The good thing is that it takes it millions of iterations to be noticeable, but when you totally need to optimize every single line of your code, don’t forget to check the datatypes; in this case, that loop runs 6x faster just by using two Numbers instead of an int.

 
Flag Post

Topic: Game Programming / uint/int/number thingums

Yeah, that test is not necessary. Neither is the NumxInt one (it’s the same as NumxNum); I may as well have skipped that one.

 
Flag Post

Topic: Game Programming / Miner Wars 2081 - Full source code released for easy modding

I got three errors while trying to compile it (missing files), but yeah, looks legit.

 
Flag Post

Topic: Game Programming / uint/int/number thingums

http://www.fastswf.com/112oIVI
Click to copy to clipboard. (Formatting is messed up).

Int+Int:		11 ms.
Int+Num:		23 ms.
Num+Num:		8 ms.
Num+Int:		8 ms.
---
Int*Int:		8 ms.
Int*Num:		21 ms.
Num*Num:		10 ms.
Num*Int:		10 ms.
---
Int-Int:		6 ms.
Int-Num:		18 ms.
Num-Num:		8 ms.
Num-Int:		8 ms.
---
Int/Int:		25 ms.
Int/Num:		25 ms.
Num/Num:		15 ms.
Num/Int:		14 ms.
---
Int%Int:		95 ms.
Int%Num:		95 ms.
Num%Num:	        86 ms.
Num%Int:		85 ms.
---
Int|Int:		6 ms.
Int|Num:		10 ms.
Num|Num:		19 ms.
Num|Int:		19 ms.

Int&Int:		7 ms.
Int&Num:		24 ms.
Num&Num:	        19 ms.
Num&Int:		19 ms.
---
Int^Int:		6 ms.
Int^&Num:		12 ms.
Num^Num:		19 ms.
Num^Int:		19 ms.
---
Int<<Int:		6 ms.
Int<<Num:		9 ms.
Num<<Num:	        19 ms.
Num<<Int:		19 ms.
---
Int>>Int:		6 ms.
Int>>Num:		9 ms.
Num>>Num:	        19 ms.
Num>>Int:		20 ms.
---
Int>>>Int:		6 ms.
Int>>>Num:	        9 ms.
Num>>>Num:	        27 ms.
Num>>>Int:	        27 ms.
---


2500000 iterations.
WIN 11,6,602,180.
Windows 7.
PlugIn