Recent posts by d4m4s74 on Kongregate

Subscribe to Recent posts by d4m4s74 on Kongregate

avatar for d4m4s74 d4m4s74 8 posts
Flag Post

Topic: Game Programming / PNG Backgrounds

Paint doesn’t support usefull things like layers and transparency. try gimp or paint.net

 
avatar for d4m4s74 d4m4s74 8 posts
Flag Post

Topic: Game Programming / What drives you to make games?

the simple reason I program games is for the end product. Looking at something and knowing “I made this” if a great feeling. Most of my projects never appear online though, simply because it has been done before or because I don’t think other people will like them (example of the latter is my only game on kong)

for example right now I’m working on my own version of snake. Right now I would never upload it because so far it has been done before, but I keep adding stuff till it’s original.

 
avatar for d4m4s74 d4m4s74 8 posts
Flag Post

Topic: Game Programming / AS editor

flashdevelop works for me.

 
avatar for d4m4s74 d4m4s74 8 posts
Flag Post

Topic: Game Programming / Seriously WTF | Works in flashdevelop, doesn't in browser. FIXD

I solved it with some cheating.
I moved the stage.focus to onEnterFrame because what happened is that once someone clicks the game it loses focus, and this forces focus 30 times a second now.

 
avatar for d4m4s74 d4m4s74 8 posts
Flag Post

Topic: Game Programming / Seriously WTF | Works in flashdevelop, doesn't in browser. FIXD

I’ve tried it with and without stage.focus and it doesn’t work without either, it’s in the main class by By way
and it only doesn’t work in browsers, so I can’t see traces anyway

 
avatar for d4m4s74 d4m4s74 8 posts
Flag Post

Topic: Game Programming / Seriously WTF | Works in flashdevelop, doesn't in browser. FIXD

Originally posted by UnknownGuardian:

I prefer to not download/open the zip. Could you post the class that you used to get keyboard presses

sure.

All the way on top
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;

further down (in main)
stage.focus = this; //First some focus.
addEventListener(Event.ENTER_FRAME, onEnterFrame); //the standard event listeners
addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); //and the one giving me problems

and of course the onKeyDown function

private function onKeyDown(e:KeyboardEvent):void {
if (vertical){
if (e.keyCode == Keyboard.LEFT) { left = true; right = false; up = false; down = false; }
else if (e.keyCode == Keyboard.RIGHT) { right = true; left = false; up = false; down = false; }
} else if (horizontal){
if (e.keyCode == Keyboard.UP) { up = true; down = false; left = false; right = false; }
else if (e.keyCode == Keyboard.DOWN) { down = true; up = false; left = false; right = false; }
}
if (e.keyCode == Keyboard.ESCAPE && dead) { reset(); }
horizontal = false;
vertical = false;
}

 
avatar for d4m4s74 d4m4s74 8 posts
Flag Post

Topic: Game Programming / Seriously WTF | Works in flashdevelop, doesn't in browser. FIXD

in the zip

 
avatar for d4m4s74 d4m4s74 8 posts
Flag Post

Topic: Game Programming / Seriously WTF | Works in flashdevelop, doesn't in browser. FIXD

I was working on a two-hour project (about once a week I roughly remake a classic game with a time-limit of two hours) This time I remade snake to test following objects in an array (the tail).

I finished the game, and in the fleshdevelop test screen (simply flash player) it works perfectly, but when running it in the browser it doesn’t recognize my keyboard commands.

I worked on it way past my time limit and I can’t seem to solve the problem. Please help.

Check http://oege.ie.hva.nl/~zaling10/gamedesign to see what’s wrong and download the code
Thanks