Recent posts by tomdeaap on Kongregate

Flag Post

Topic: Game Programming / Problem with bitmap 'camera'

Originally posted by JohnnyBohnny:

Math.ceil returns the ceiling of the specified number or expression. The ceiling of a number is the closest integer that is greater than or equal to the number.

Either you’ve understand me wrong or you’re a true captain obvious here.

Originally posted by JohnnyBohnny:

that’s probably because x and y in a bitmap are integers, so if you somehow don’t use integers, this will make them into that.

I guess what happened was the bitmapdata ‘rounding’ the values, which made it jumpy. Anyways thanks for this info.

 
Flag Post

Topic: Game Programming / Problem with bitmap 'camera'

On a side note, I’ve found a hacky solution. Calling Math.Ceil on the x and y variable of the copypixel rectangle fixes the stuttering. What this means, no clue.

 
Flag Post

Topic: Game Programming / Problem with bitmap 'camera'

Originally posted by vesperbot:

1. Why should Camera extend BitmapData, instead of say nothing? Do you use inherited functionality? I can’t see if yes.
2. Allocating a new BitmapData once per Render call is BAD. You have its dimensions pretty much set once, and that’s all. And, you don’t seem to use “target” in that code. Stuttering is probably caused by you rapidly eating up memory with “new BitmapData()” each render.

1. Check the Render function in the camera, 2a. same as 1.
I’ll have a look at the memory eating issue though, thanks for that tip!

 
Flag Post

Topic: Game Programming / Problem with bitmap 'camera'

Hello everyone.

I’ve ran into a problem while trying to write a camera which basically shows a bit of another bitmap using copypixels, and then scaling it up to the size of the entire screen.

Problem I ran into? It stutters.

See this swf: http://www.newgrounds.com/dump/item/2dc3ca8ce55c2e47f1137e8b83924ad9

And this zip:
http://www.newgrounds.com/dump/item/256c5f58d129285780c86984958fc589

Use the arrow keys to walk to the left, when you reach the left edge the camera starts scrolling. It works fine, except for the stuttering. I’ve checked and doublechecked to make sure the camera is updated after the ‘knight’ and also that the camera is rendered after the bitmap containing the knight (so the knight’s position is updated when the pixels are copied).

Does anyone have a clue as to where I should look? Because I’ve spent about 2 hours pondering about this problem. Thanks in advance.

 
Flag Post

Topic: Collaborations / Looking for Development Partner/Coder

Sup sir, I’m pretty much an oldtimer trying to get back in the game of programming. If you’ve got an idea for (or are willing to work on) a small game then be sure to drop me a PM.

Stuff I did can be found here:
http://tomdeaap.newgrounds.com/games/

Some of them are quite silly, but there’s some quality there as well.

 
Flag Post

Topic: Game Programming / Open Door (AS2)[Solved]

Erm well code seems fine. Are you sure you’re running this code in a loop?

 
Flag Post

Topic: Game Programming / GiTD [#8] Entries and Discussion

Originally posted by DannyDaNinja:
Originally posted by skyboy:
Originally posted by davidlougheed:

I hope that you don’t suggest that being 13 is bad in any way.

D:

not at all, but being an irritating 13 year old child is bad.

And fail, I’m 14.

He wasn’t talking about your physical age.

Still I think he guessed a bit high.

 
Flag Post

Topic: Game Programming / How much do YOU earn from kongregate?

Originally posted by nukermage:

games submitted = 40
game plays = 60,171
money earned total = 161$
money earned in a year: 61$

40 games?? fo’ shizzle??

 
Flag Post

Topic: Game Programming / GiTD [#6] Entries and Discussion

I made this together with 2 artists in 48 hours for the newgrounds game jam. Inspiration maybe?

http://www.newgrounds.com/portal/view/541996

 
Flag Post

Topic: Game Programming / Physics engine

… calculate the y of the line like so:

(y2-y1)/(x2-x1) * x of the ball. ( so you know at which height the center of the ball would be if that followed the line ).

And now just add the radius of the ball to the y gotten from the above formula.

Hope that helps.

 
Flag Post

Topic: Game Programming / AS3: Accessing parent variable value from generic child

You could try passing the engine as a variable into every child it creates, and then do something like:


public var thisparent:Engine;

public function Child(thisparent:Engine)
{
this.thisparent = thisparent;
}

if (thisparent.mainMoving == "right blablabla.....
 
Flag Post

Topic: Game Programming / Looking for tutor(ial) on platformer games

Originally posted by UnknownGuardian:

Hmmm. If you were using AS3, I would have suggest the incredibly easy Flixel engine or Emanuele Feronato’s tutorials.

I hate flixel… It’s like cheating :P

 
Flag Post

Topic: Game Programming / AS3 Check if everything is removed

Can’t you use weak references, and then remove all the objects, and with that the eventlisteners?

 

Topic: Game Programming / hitTest Troubleshooting

This post has been removed by an administrator or moderator
 
Flag Post

Topic: Game Programming / Same variables in many for loops (quick question!)

euhm… use different vars? a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z they’re all there for you to use :P

 
Flag Post

Topic: Game Programming / AS2 collision help

Originally posted by UnknownGuardian:
Originally posted by codydj:

i got macromedia flash 8 pro and i learned how to make simple maze games. i want to bump it up to the next level by making a simple platformer. Do i need to make what i want to move a movie clip , button , or a graphic? And what code do i need to add. Heres a demo of my maze game i made too.http://www.swfcabin.com/open/1261679384

Did you get it legally? AKA, no one shared it with you. I seem to recall such an event.

Shouldn’t you be out making some open-source game :P

If you want a suggestion…. make a 3d engine?

 
Flag Post

Topic: Game Programming / LiEk HoW dO i MaKe SuM GaEmS??11!!

Hai Chef

 
Flag Post

Topic: Game Programming / GoTW? :(

Originally posted by UnknownGuardian:

Dynamic = Everything is created by code. (At runtime)

Hmm… do you mean like drawing the graphics with the drawing API?

If so .. is there something like a music API :P or can we just import sounds?

 
Flag Post

Topic: Game Programming / platformer games

Originally posted by Magical_Zorse:
Originally posted by tomdeaap:
Originally posted by Magical_Zorse:

you make a platformer, you write some code, and do some stuff. before you know it, you’ll have a multiplayer online game!

OMG, VINCE??

YOU CAME BACK!

I’VE NEVER BEEN GONE :3

 
Flag Post

Topic: Game Programming / platformer games

Originally posted by Magical_Zorse:

you make a platformer, you write some code, and do some stuff. before you know it, you’ll have a multiplayer online game!

OMG, VINCE??

 
Flag Post

Topic: Game Programming / [solved] AS3: How to catch some specific event?

private function enterFrameHandler(event : Event) : void {
	if(x == 12 && isSomethingTrue == true){
		doSomeFunction();
	}
}

this is the right code.

 
Flag Post

Topic: Game Programming / Optimizing this piece of code?

pixels = new Vector.<pixel>();

into:

pixels = new Vector.<pixel>(w * h)

Dunno… try it out…

Also I don’t know how often the math.sqrt is called, but you could precompute every value from 1- MOUSE_RADIUS_POW2 ( just the whole ones ) push them inside of an array ( or vector, if you like ), and just use:

dd = squarroots[dd];

EDIT:
Hmm.. just noticed your squareroots have to be kinda precise…

 
Flag Post

Topic: Game Programming / Flash, get your hands off my zero's....

Hmm.. thank you guys so far, any more?
like the awesome draco ??
+ fixed the first post … had to do with double enters? weird…
EDIT: Never mind, I fixed it :3… If anyone wants a timer class which counts down, just pm me or something..

 
Flag Post

Topic: Game Programming / Flash, get your hands off my zero's....

Wtf happened to my previous post? When I try to edit it it shows the message I posted, but on the site it shows it 4 times? Explain anyone?

 
Flag Post

Topic: Game Programming / Flash, get your hands off my zero's....

Well.. I’ve made a timer…
It counts down from whatever you like, but there’s a problem.
As soon as it hits below 10 minutes or seconds, the it changes from a double to a single digit number. I’d like to have it so you have 09 – 08 -07 etc.
Does anyone happens to know a solution for my horrific problem?
Thank you in advance,
Tom