Newgrounds.com — Everything, By Everyone.

Checking login status…

USERNAME:

PASSWORD:

Logging in…

Logged in as:
.
Logging out…
Inbox My Account Log Out


You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!

Author Search Results: 'Fickludd'

We found 181 matches.


<< < > >>

Viewing 1-30 of 181 matches. 1 | 2 | 3 | 4 | 5 | 6 | 7

1.

None

Topic: Are there structs in AS2?

Posted: 06/14/08 05:33 AM

Forum: Flash

nope, no structs - only classes


2.

Elated

Topic: Game DevBlog?

Posted: 06/09/08 06:32 AM

Forum: Flash

As said on my user pages:

Yey, I've decided to show of some mayor parts of our tank game in a sandbox playable demo.

Nothing more will be happening in a month or so, but this should keep everybody warm for the time being!


3.

None

Topic: Flash Forum Game Collab

Posted: 06/02/08 04:36 PM

Forum: Flash

At 5/31/08 09:30 PM, Luis wrote: i managed to do all the level 1 terrain art today. I'll upload it to jtmb's ftp and place a bug report on origo.

Sweet!
Lol @ space helipad :D.

...lego asteroids...

uhm wierd. But might be cool! There are many wierd things in space...


4.

None

Topic: Flash Forum Game Collab

Posted: 05/31/08 01:20 PM

Forum: Flash

At 5/30/08 12:44 PM, GustTheASGuy wrote: ... you're welcome to take it on.

Eh, thanks but no thanks =P. I've got plenty of stuff to code as it is... doing some sprites is suitably relaxing.

AS interpreter huh, funky!


5.

None

Topic: Flash Forum Game Collab

Posted: 05/30/08 12:41 PM

Forum: Flash

At 5/28/08 02:31 PM, Luis wrote: Switch up your color palette a bit. They are all starting to look a bit too monochrome, Maybe make the light green areas that yellow/orange from the terrain lighting?

Hmm, I see your point. I'll make em a little more colorful.

What's up with this thread being on 5th page anyway, are we getting somewhere? How many people are animating/spriting?


6.

None

Topic: Flash Forum Game Collab

Posted: 05/28/08 02:16 PM

Forum: Flash


7.

None

Topic: Grabage Collection Troubles

Posted: 05/27/08 05:53 PM

Forum: Flash

I don't know very much on AS garbage collection, but I think you have it right.

As a possible workaround this problem, you could try pooling the objects (if applicable). That would save you a lot of time consuming calls of "new" and also make the program much less dependent of garbage collection. Of course, pooling might impossible or very inpractical - I have no idea of what you're coding.


8.

None

Topic: Flash Forum Game Collab

Posted: 05/27/08 05:41 PM

Forum: Flash

At 5/27/08 05:35 PM, Luis wrote:
Nice work. I think I'll probably swap out your afterburners for one of the ones already in the library but other than that it looks good. Send to Luis(AT)newgrounds.com

Cool, you've got mail. I might crank out some more tomorrow - maybe it's time for a few ground enemies...


9.

Happy

Topic: Flash Forum Game Collab

Posted: 05/27/08 05:28 PM

Forum: Flash

Threw together two basic enemies, after finally getting hold of my wacom for an hour.

One simple "make acrobatic flight - shoot forward - bail" enemy

and

One "drive forward slowly while shooting at player with four turrets" enemy

swf

Where do I send the .fla?


10.

None

Topic: Game DevBlog?

Posted: 05/22/08 06:10 PM

Forum: Flash

At 5/22/08 05:44 PM, DougyTheFreshmaker wrote: Graphics look really nice!

As for the "mouse arm disease", you might look up RSI instead. I've had this sort of thing happen a few times on and off in my life, and every time it's been due to a poor positioning of the keyboard/mouse. Over the past week, for example, my wrists started killing me (after moving to a different room/desk). I raised my chair up as much as it could go (legs barely fit under KB tray), and now the pains has gone away completely--and I've actually been spending *more* time on the computer, recently.

Oh, mouse arm disease is just the swedish word for RSI (eh, the english translation of the swedish word... you get it), I didn't know what it was called in english. But yeah, the problem is likely down to bad ergonomics. I'm looking into it.

You also might look at moving away from using the mouse when possible. In the vast majority of cases it hinders producivity substantially anyway. Programs, in particular ones geared towards programmers/nerds, will tend to offer many more shortcuts than you realize. Often times you can do *everything* without touching a mouse (or missing the use of it).

Ya, shortcuts ftw. Also wacom > mouse, from an ergonomic point of view too. The worst thing to use for long is the touch pad on my laptop. It was sitting with that for 8 hours that started this mess.

I can't remember if you use the Flash IDE or not, but FlashDevelop is good when it comes to that stuff. I'm sure Flex Builder is as well, and if I had to guess, the Flash IDE is probably the worst of the bunch. *shrug*

Problem being I'm usually programming on my mac... guess I'll have to throw in the towel and install eclipse again. I don't know, the Flash IDE is working fine so far. But then again, I've grown used to it =P.

Thanks for the advice anyway, appreciated!


11.

None

Topic: Game DevBlog?

Posted: 05/22/08 04:59 PM

Forum: Flash

Anybody ever had mouse arm disease? I'm feeling it now and it sucks bad!

Anyway, just wanted to say that I got hold on some of the graphics, and they're looking great!
Watch!


12.

None

Topic: AI trouble

Posted: 05/21/08 05:04 PM

Forum: Flash

dude... you really need to figure out what your code is doing. You've made a typo with the _y if's and it should be really obvious what is it, since the code works, but in the opposite way of what you want.

Talk about artificial intelligence =P

13.

None

Topic: Flash Forum Game Collab

Posted: 05/21/08 01:59 PM

Forum: Flash

At 5/21/08 01:05 PM, Luis wrote: well we're wrapping up the american idol actionscripter edition today... so any interested parties for that today was your last day to evaluate how you could help with that. we're moving on after today and you'll get locked out.

Cut me out of coding, I'll to some sprites / animation.


14.

Happy

Topic: Flash Forum Game Collab

Posted: 05/21/08 03:31 AM

Forum: Flash

I could help out with some small part of the programming. Although I think two or three programmers is really enough and gust and cojones should have no problems with this :P.

So actually I don't mind doing a few sprites instead for a change. Eh, I'm flexible.


15.

None

Topic: Best way to learn actionscript 3?

Posted: 05/17/08 07:56 AM

Forum: Flash

Read the help files and follow the examples. They are actually useful.


16.

None

Topic: Efficiency

Posted: 05/16/08 04:20 AM

Forum: Flash

At 5/15/08 11:28 PM, Matt-Porter wrote: I actually AM using AS2... I know I know, it's on the top of my things to do list, In fact I'll learn something new tonight just get that idea more into motion. as for bitmap caching, I know nothing about it, care to elaborate someone?

Read this on bitmap caching.


17.

None

Topic: Utilizing Flash Player 10 Beta?

Posted: 05/15/08 04:04 AM

Forum: Flash

Awesome!

I have no idea of how to use it though - wait for the next Flex or *shrug* Flash CS4


18.

Shouting

Topic: Efficiency

Posted: 05/15/08 03:58 AM

Forum: Flash

Ehm, those things are

1) not necessary to optimize since they are happening 1000x faster than anyone can notice, and your CPU definitly won't notice.

2) roughly equal in CPU-load. Although that load in neglectable anyway.

3) not doing the same thing, which you'll notice if you think through what's happening in some cases.


19.

None

Topic: AS3.0 array vs. list speed test.

Posted: 05/15/08 03:18 AM

Forum: Flash

At 5/14/08 07:57 PM, DougyTheFreshmaker wrote: I found a much less retarded answer on Adobe LiveDocs under serialization for communication between languages, here.

Thanks! I'm still not sure how they work, but diving deeper into this seems kinda pointless. When I wan't better control over my arrays I'll change to some other language (until AS comes with typed arrays).


20.

None

Topic: AS3.0 array vs. list speed test.

Posted: 05/14/08 09:07 AM

Forum: Flash

I think we all agree that in the end the choise between a list and an array is not a speed issue, but a question of what you need to do with it. There are in almost every case other stuff that stands for 99% of the cycles.

Still I find it fashinating that the list with numbers (ie. the specialized list I used for testing) was faster to iterate than the array with only Numbers.

Does anyone by the way know how AS arrays are implemented? I couldn't find anything on the net explaning it... I mean since they're obviously not pure vectors, do they use some kind of combined list and indexing? Or are they vectors of 4 byte chunks containing pointers or some number implementation?

haven't got hAxe btw...


21.

None

Topic: AS3.0 array vs. list speed test.

Posted: 05/13/08 05:01 PM

Forum: Flash

At 5/13/08 04:36 PM, LCurtis wrote: Generally I dont access 1000000 objects at any given time (or anywhere close to that) but still something to keep in the back of my mind I guess.

Agreed. I tried to come up with something plausible, but couldn't... Still, 125 ms = 8 fps, which is without doing any real computing OR rendering. Also that's on a dual core 2 gHz machine and you probably want your games to run smooth on lesser comps. But no, it will probably never matter which way you do.

I was really hoping Adobe had someone figured out how to make arrays act faster than lists but oh well.

Ya, me to.

At 5/13/08 03:43 PM, Fickludd wrote: editing possibilities...
Copy my sig pic!

Just did!


22.

None

Topic: AS3.0 array vs. list speed test.

Posted: 05/13/08 03:43 PM

Forum: Flash

Oh, and sorry all for the crappy formating! There's no preview or editing possibilities...


23.

None

Topic: AS3.0 array vs. list speed test.

Posted: 05/13/08 03:41 PM

Forum: Flash

At 5/13/08 03:33 PM, mariomaster123 wrote: ZOMG
ALL THAT CODE=SCARYZ!!!!!!!!!!!!!!!!!

Lol, be afraid!

( I'm not sure what the problem is... I'll keep inversitgating though!

Uhm, it's not a problem but more of a test report... but do tell me when you find anything =P


24.

Angry

Topic: Impossibly fast particle system

Posted: 05/13/08 03:39 PM

Forum: Flash

At 5/13/08 07:27 AM, GustTheASGuy wrote: Arrays are all boxed in AS. No advantage. The only advantage of arrays is indexed access, otherwise lists are superior in every way in AS.

Crap! Made some test and you're right... for iteration in AS3 lists are faster. I actually made a very long post about it ^^.


25.

None

Topic: AS3.0 array vs. list speed test.

Posted: 05/13/08 03:31 PM

Forum: Flash

This is the result of this thread about particles.

So the question was which data structure is faster in AS3 when iterating through the entire set, the array or the list. Many, including me, where of the opinion that an array should be faster on account of the horrible system cache behaviour of lists, even though information theoretically they both have linear iteration time. The other opinion was that the ability to type values in lists would make them faster.

The test:
I started with two setups, timing first the precaching of the sets, and then iterating through them and getting the one number stored.

Those two sets where:
<ul>
<li>An array with objects
I chose to have an array with objects since that seems like the most useful and usual way to have things if I want to store more than a single value in each object.
The objects:

package {
    public class SpeedTestObj {
        public var nbr:Number;
    }
}

</li> <li>A list with objects

package {
	public class SpeedTestObjList {
		public var nbr:Number;
		public var next:SpeedTestObjList = null;
	}
}

</li>
</ul>

With these I set up the follow testing code:

import flash.utils.getTimer;
var timer:uint;
var nbrOfObjects:uint = 1000000;
var i:int;
var s:Number;

timer = getTimer();
var objArr:Array = new Array(nbrOfObjects);
var obj:SpeedTestObj;
for (i=0; i<nbrOfObjects; i++) {
	obj = new SpeedTestObj();
	obj.nbr = i;
	objArr[i] = obj;
}
trace("creating "+i+" object array: "+(getTimer()-timer));

timer = getTimer();
var objList:SpeedTestObjList = new SpeedTestObjList();
var first:SpeedTestObjList = objList;
first.nbr = 0;
for (i=1; i<nbrOfObjects; i++, objList = objList.next) {
	objList.next = new SpeedTestObjList();
	objList.next.nbr = i;
}
trace("creating "+i+" object list: "+(getTimer()-timer));

timer = getTimer();
for (i=0; i<nbrOfObjects; i++) {
	s = objArr[i].nbr;
}
trace("getting Number from "+i+" objects in array: "+(getTimer()-timer));

timer = getTimer();
objList = first;
while (objList != null) {
	s = objList.nbr;
	objList = objList.next;
}
trace("getting Number from "+i+" objects in list: "+(getTimer()-timer));

The result? (times in ms)

creating 1000000 object array: 520
creating 1000000 object list: 472
getting Number from 1000000 objects in array: 129
getting Number from 1000000 objects in list: 16

Earth shattering victory for the list! There's no arguing against those numbers.

But wait a moment, the list is coded for this exact application while the array is übergeneric?
New hypothesis: The adding of objects to a list is actually the adding of pointers to other places in memory where the objects are, which then gives as bad space locality to the array as to the list, but with the overhead of the extra array look up this goes slower.
But what if but the numbers directly into the array? Numbers aren't pointers and should therefore allow better cache performance through space locality.

Testing:

timer = getTimer();
var nbrArr:Array = new Array(nbrOfObjects);
for (i=0; i<nbrOfObjects; i++) {
	nbrArr[i] = i;
}
trace("creating "+i+" Numbers in array: "+(getTimer()-timer));

timer = getTimer();
for (i=0; i<nbrOfObjects; i++) {
	s = nbrArr[i];
}
trace("getting Number from "+i+" Numbers in array: "+(getTimer()-timer));

Result: (in ms)

creating 1000000 Numbers in array: 67
getting Number from 1000000 Numbers in array: 36

The creation time is no suprise much lower since there is no need to find new memory space for a million objects.
But the getting time is still double the time of the list! Either the type checking cause by the array being generic is really heavy (on a relative scale of course), or the array implementation in the AVM2 is *strange*, maybe using some kind of number hashing?

Anyway, the list seems to walk victorious through my best tries of arrayiness, which is definitly something to remember when writing the next heavy AS3 application.

"But I want spacial locality!", you scream!

I actually came up with a way of further improving my test example:

// in separate file
package {
	public class DualSpeedTestObjList {
		public var nbr:Number;
		public var nbr2:Number;
		public var next:DualSpeedTestObjList = null;
	}
}

// in .fla 
timer = getTimer();
var objList2:DualSpeedTestObjList = new DualSpeedTestObjList();
var first2:DualSpeedTestObjList = objList2;
first2.nbr = 0;
first2.nbr2 = 1;
for (i=2; i<nbrOfObjects; i++, objList2 = objList2.next) {
	objList2.next = new DualSpeedTestObjList();
	objList2.next.nbr = i;
	objList2.next.nbr2 = ++i;
}
trace("creating "+i+" dualobject list: "+(getTimer()-timer));

timer = getTimer();
objList2 = first2;
while (objList2 != null) {
	s = objList2.nbr;
	s = objList2.nbr2;
	objList2 = objList2.next;
}
trace("getting Number from "+i+" dualobjects in list: "+(getTimer()-timer));

Results: (ms of course)

creating 1000000 dualobject list: 234
getting Number from 1000000 dualobjects in list: 10

Nuff ranting. Optimization is fun. There's always something more :D.


26.

None

Topic: How does this look so far?

Posted: 05/13/08 11:41 AM

Forum: Flash

Graphics and animation are really good! The hit detection seemed, I don't know, a little wide maybe. But it's hard to tell from a vid.

And yeah, what did happen to the wolf game?


27.

Thinking

Topic: Impossibly fast particle system

Posted: 05/12/08 04:58 PM

Forum: Flash

At 5/12/08 05:13 AM, Kajenx wrote: I got the linked list going (it's relly simple, but it works) and its about 4 times faster! I'm not sure it's completely optimized, though. It's still laggy at 80,000 particles. It does 20,000 flawlessly, though, which is amazing!

I'm onto the same track as luca and dougy in thinking that even though AS3 Arrays are generic the superior system cache behaviour should make them faster than lists. Although I suppose when pre-generating all the nodes at the same time they might get pretty good space locality anyway, and the tests seem to show them as equal.

Here's the code, is there anything more I can do to optimize it?

Yes, there's always improvement!

Particle generation:

 if (AddPTC > 0) {
 				var TempAng:int = Math.round(Math.random()*359);
 				TempPart.XPos = root.mouseX;
 				TempPart.YPos = root.mouseY;
 				TempPart.XThrust = Math.cos(TempAng * root.Radians);
 				TempPart.YThrust = Math.sin(TempAng * root.Radians);
 				TempPart.Thrust = 1 + Math.random()*10;
 				TempPart.Active = true;
 				AddPTC--;
 				PTCCount += 1;
 			} 

alt 1:
Drop the Math.round() and the unecesary conversions between angles and radians. Add a class attribute var pi:Number = 2*Math.PI, and rewrite like:

if (AddPTC > 0) {
 				var TempAng:Number = Math.random()*root.pi;
 				TempPart.XThrust = Math.cos(TempAng);
 				TempPart.YThrust = Math.sin(TempAng);
 			} 

which gains you 2 mults and one Math.round().

Alt 2:
Cos and sin are "expensive" functions, So you could gain some speed by pre-calculating the 720 values you are using and put in two arrays. Rewrite like:

if (AddPTC > 0) {
 				var TempAng:int = int(Math.random()*360);
 				TempPart.XThrust = cosArr[TempAng];
 				TempPart.YThrust = sinArr[TempAng];
		} 

Updating
This code runs extremely often, therefore even very small improvements may result in noticably better performance.

TempPart.Main();
 		BMD.setPixel32(TempPart.XPos, TempPart.YPos, 0xFF0088FF);
 		if (TempPart.Thrust <= 0.2) {
 			TempPart.Active = false;
 			PTCCount -= 1;
		}

1: Calling functions is expensive, if done often enough. Since you don't use the Main() method anywhere else in your program except here, you should really put the contents of Main() directly into the code.

 		public function Main():void {
 			XPos +=  XThrust *  Thrust;
 			YPos +=  YThrust *  Thrust;
 			Thrust /= 1.01;
 		}

2: Division is expensive. Are you sure you can't accept constant acceleration?

 Thrust -= 0.1;

3: And while you're at it, remove the two * Thrust multiplications by setting XThrust = cos*Thrust and YThrust = sin*Thrust at creation time, and defining a Xacc = XThrust * 0.01 and same for Yacc.

When you update make it

 		public function Main():void {
 			XPos +=  XThrust;
 			YPos +=  YThrust;
 			XThrust -= Xacc;
                        YThrust -= Yacc;
 		}

You would of course have to redefine your inactivation condition too.

And that's all I could come up with. I must way you have all of the important structural performance choises done, so generally I think it's very good code, and really refreshing to see this kind of topic on the forums :D.

Fickludd out.


28.

None

Topic: Programmer Wanted for Hack n' Slash

Posted: 05/11/08 12:14 PM

Forum: Flash

I'm actually busy at the moment, but I though the animation was pretty cool. This definitly doesn't deserve to go unoticed. :D


29.

None

Topic: Impossibly fast particle system

Posted: 05/11/08 12:10 PM

Forum: Flash

At 5/11/08 09:26 AM, GustTheASGuy wrote: I and Luca made a test to compare data structures. Does any one run faster than the other?

Seems pretty equal, although since both seemed to run smoth at 250k, wouldn't go any higher, and there wasn't any fps, it's not easy to tell.


30.

None

Topic: Game DevBlog?

Posted: 05/10/08 01:00 PM

Forum: Flash

Added a post to my blog explaining the points of having a mapeditor for your game.


All times are Eastern Daylight Time (GMT -4) | Current Time: 11:02 PM

<< < > >>

Viewing 1-30 of 181 matches. 1 | 2 | 3 | 4 | 5 | 6 | 7