imp2
57 posts
|
Topic: Game Programming /
One game a month
Only ten days left! Is anyone else freaking out?
|
|
|
imp2
57 posts
|
Topic: Game Programming /
[AS3] Getting function arguments from an array [Solved!]
what your looking for is the apply method;
pos.setup.apply(pos, [my arg array]);
Edit: my bad I got it in reverse
in as3 what you’re looking for is
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/statements.html#…(rest)parameter
function setup(…args):void{
for(var i:String in args){
trace(args[i]);
}
}
if you’re using as2 it’s called restParam
|
|
|
imp2
57 posts
|
Topic: Game Programming /
Using music in my game
try adding them as is first, and see what the filesize becomes. flash has comressed some huge files for me before. but if the filesize is too big, take Drakim’s advice and go with audacity, it’s super useful for a million things.
|
|
|
imp2
57 posts
|
Topic: Game Programming /
getters and setters in other languages
Originally posted by BobTheCoolGuy:
Java doesn’t – you just have to make regular functions typically prefixed with the word set and get.
My mistake, I figured AS3 and C# are based off Java, that must be from where it came.
The more you know…
|
|
|
imp2
57 posts
|
Topic: Game Programming /
latent controls issue
No lag here on chrome, on a decent PC.
|
|
|
imp2
57 posts
|
Topic: Game Programming /
One-way platforms
just use a velocity variable to move the player, if you’re making a platformer you should already have this and acceleration. You just check if the players velocity is going in the platform’s blocking direction.
sorta psuedo coding here…
public var velY:Number, gravity:Number;
public var onGround:Boolean
public init():void{
onGround = false;
gravity = 1;
velY = 0;
}
public function update():void{
y += velY;
if(onGround && upPressed){
velY = 15;
} else if(!onGround){
velY += gravity;
// -- ONLY HIT IF FALLING
if(hit(platform) && velY > 0){
onGround = true;
velY = 0;
}
}
}
Edit: no idea how to fix the strikethrough, velY = -15;
|
|
|
imp2
57 posts
|
|
|
|
imp2
57 posts
|
Topic: Game Programming /
Show us a screenshot of what you're working on!
I think it’s alright for games to be purposely abrasive. as long as you know your doing it and you’re fine with it. it’s the closest thing to “punk” a videogame can be. You don’t tell Slayer not to yell when they sing, do you?
|
|
|
imp2
57 posts
|
Topic: Game Programming /
GiTD [#32] Voting finished! [imp2]
Those who gave feedback or voted for me: Thanks!
Those who submitted games: Awesome job, this vote was a tough choice because of all the great games
Those turning their GiTD games into a 1GAM game: be sure to join me in The Game Development Room so we can help each other out.
Those competing in GiTD #33: Good luck, see you there.
Artwork on Theifer O’Greedy by: Ian Merch
Additional artwork/ethnic PR (Don’t ask) by SwishCheese
|
|
|
imp2
57 posts
|
Topic: Game Programming /
GiTD [#32] Voting finished! [imp2]
Originally posted by UnknownGuardian:
nutter666 – BodyBagger |xxxxxxxx
I counted 10 votes for nutter666, making it a three-way
http://www.youtube.com/watch?v=Pi7gwX7rjOw
|
|
|
imp2
57 posts
|
Topic: Game Programming /
GiTD [#32] Voting finished! [imp2]
Thank you: Solsund, Hok0003, VBCPP, Dragon_of_Celts, Elyzius, Ivach, Ace_Blue and anyone I might of missed for the constructive criticism on my game, I’m messing with the controls now, so stick around the forum see if you like the newer version.
|
|
|
imp2
57 posts
|
Topic: Game Programming /
Logical OR help
Originally posted by Ace_Blue:
As for XOR, A XOR B = (A || B) && !(A && B). Sure it’s long, but it’s there.
A XOR B is if(A != B)
|
|
|
imp2
57 posts
|
Topic: Game Programming /
How Do You Pronounce...
Originally posted by VBCPP:
and adding
regex
#
LaTeX
regg-X
lay-tex: it supposed to be luh tech or something but screw it
|
|
|
imp2
57 posts
|
Topic: Game Programming /
XNA Team Development
Originally posted by Valfrit:
In Australia everything is behind.
I remember hearing at a conference that Australia has some decent game universities, where are you at?
Originally posted by Valfrit:
But I’d rather use XNA over VB.
touche
|
|
|
imp2
57 posts
|
Topic: Game Programming /
XNA Team Development
First off, your school is behind, XNA is dead. But it’s still nice and I know people who still use it.
Second, screw the modules and projects, set up a git or some kind of svn. I’m assuming the modules are different states or games? you should all be changing the same library so your not recreating the same functionality.
Third, in windows Visual studio go to new project. in the pop up window find “online templates” on the bottom left, if you have XNA game Studio 4 on it you can see a bunch of small projects you can learn from
|
|
|
imp2
57 posts
|
Topic: Game Programming /
Collision detection fail
Floating point errors happen with adding or subtracting “close” values (.6+.3). I don’t think you’ll ever get a floating for subtracting a number from the same number, which is what your doing when the x position is on the left most tile, which is when the subtracting values are “closest”.
(x – x%w)/w should always give you an integer if both of those values are integers. I really just thought it looked bad
anyways I feel bad for hijacking the thread with such trivial matters. so I’ll post this again for OP. highly recommend this and the same authors vector tutorials.
http://tonypa.pri.ee/tbw/start.html
|
|
|
imp2
57 posts
|
Topic: Game Programming /
Collision detection fail
i mentioned running three tests, those are the results of the three tests
and floating point errors are in every language not just flash
trace(20.19 – 20);// - 0.19000000000000128
trace(.9 – .3);// - 0.6000000000000001
|
|
|
imp2
57 posts
|
Topic: Game Programming /
Collision detection fail
Originally posted by jerimo:
Because this way you get an integer value rather than a floating point and don’t have to deal with decimals; The modulo will give you the extra you need to shave off the original number to get a perfect division of the second argument, so when you do divide you get a simple answer, and need no more becasue you only want to know which tile you are on, not the exact section of the tile, as that would be pointless
I argue the opposite, RTLs way can cause floating point rounding errors giving you 2.000000001 in rare cases, mine returns an actual int. plus mine is more readable, and faster. I ran 3 tests, my output values are in the comments
var i:int, t:int, x:int;
t = getTimer();
for (i = 0; i < 100000; i++)
x = (200 – 200 % 32) / 32;
trace(“test 1:”, getTimer() – t);// - 28, 28, 25
t = getTimer();
for (i = 0; i < 100000; i++)
x = int(200 / 32);
trace(“test 2:”, getTimer() – t);// - 17, 10, 9
t = getTimer();
for (i = 0; i < 100000; i++)
x = Math.round(200 / 32);
trace(“test 3:”, getTimer() – t);// - 24, 16, 17
even Math round is faster
|
|
|
imp2
57 posts
|
Topic: Game Programming /
How Do You Pronounce...
Originally posted by GameBuilder15:
I know it’s weird, but I’ve always pronounced like “flat” without the t, haha.
My cousin’s an animator and he calls it an “F-L-A.” I’m guessing that’s the right way to say it.
There’s no right way, man. i used to say “flah” but people snickered so I stopped.
|
|
|
imp2
57 posts
|
Topic: Game Programming /
Collision detection fail
The point is Hittest is slow, basic rect collision is super simple.
http://tonypa.pri.ee/tbw/start.html
this is an old tutorial but the math is dead on
EDIT:
Originally posted by RTL_Shadow:
(200 – 200 % 32) / 32
why not int(x/tileWidth)
|
|
|
imp2
57 posts
|
Topic: Game Programming /
How Do You Pronounce...
char: charcoal
var: are
JSON: J-sahn(emph on SON, different than jason)
E-C-M-A-Script
Haxe: hacks
instantiate: instan-she-ate
uint: you-int
swf: swiff
swc: swick
fla: F-L-A
|
|
|
imp2
57 posts
|
Topic: Game Programming /
Game Demo, and a question.
Try to avoid raising difficulty by simply raising the values of enemies. try making different enemies, with different abilities. maybe certain enemies have soft spots you have to hit or they move in a pattern. games that just “generate” content are never as good as games with human designed waves and layouts.
|
|
|
imp2
57 posts
|
Topic: Game Programming /
Game Demo, and a question.
The game starts out too easy, and never gets harder. Can’t wait to see future development though.
P.S. you spelled “cost” wrong
|
|
|
imp2
57 posts
|
Topic: Game Programming /
GiTD [#32] Voting finished! [imp2]
So if everyone is criticizing I guess I’ll join in.
Note, I casted my vote above, already.
In no particular order:
Feeding Your Demons: You were my third place choice. Love the menu, love the concept, though you didn’t really hit the theme too well. It’s very hard to plan in these games, but maybe it’s because I’m bad at them. random moves would give me 12 combos that I never could have foreseen, and I never got any benefit from. overall, too luck based, and very easy to win.
Mr. Collector: I chose rock and nothing happened, which made me laugh. but still, the ability to customize the game didn’t over shadow the fact that there wasn’t much going on here.
Cat Burglar: Love the art, and the concept is entertainingly bizarre, but I could never manage to play games that made you wait, it seemed like the only way to win was to wait for the danger to go down so as not to wake her. the field of view system was nice, but there just wasn’t a lot of interesting gameplay.
Collectron: great style, you had a nice engine too, but far too little content, and almost no challenge. Just keep making levels and I’m sure I’ll love it. The in air controls were non-existent, which was frustrating.
The Collector: You almost seem to avoid the Jam’s theme in terms of gameplay, but I just plain like shooting people. Nice platformer physics. The game is too short, the shotgun is too weak, and there’s very little challenge, I’d like to stress the difference between challenge and difficulty. I felt that skill had little to do with my victories or my deaths.Edit: forget to mention the pain I get when I see pixel art rotated, please dont use pixel art if they are going to rotate.
Body Bagger: Love the art, I wish you could finish the comics. Your game revolved around the theme and had a unique take on it. the actuall gameplay got old pretty fast. It frustrated me that I would never collect them all, and that you basically lose if you fail to collect a certain one. It looks like you worked really hard on the game, but just failed to make the game play progress in any way.
Hunting Sim: Decent rpg with quite a bit to do, but generally not my cup of tea. As I said earlier, I’m not a fan of waiting.
Klecter: I really liked this, but it could have been a lot better. eventually the enemies form a singularity, so the game stops getting harder, the collectables are no where near frequent enough, half of the game I’m waiting for more to spawn, why not have 10 out at a time? I would also like to see a version where enemies can’t overlap.
Photo Collection: Nice simple game. but I don’t like waiting for things, it would be nice if there wee more things to photograph, and less time between appearances.
Forest of Death: tons of cool things with this game, great graphics, nice mechanics, really nailed the theme. but the weapons are totally pointless, its far simpler to run around and never shoot a skeleton. It takes way to many shot to kill them. The game was also too dark to see enemies right in front of me.
Surviving in the Wild: I love the concept of an edible island. and the game mechanics were nice, but the game was frustrating, you shouldn’t be able to eat your only means of progression. There’s no indication of what hurts you, and you die too quickly.
|
|
|
imp2
57 posts
|
Topic: Game Programming /
Tweening and adding child at same time
is the parent your adding it to rotating? you need to embed fonts for rotation, or something. does it show if you add it and then tween it?
|