Recent posts by BobTheCoolGuy on Kongregate

Flag Post

Topic: Game Programming / Suggestion: Shootorials in HaXe

Originally posted by Draco18s:

Most of the hierarchy used by the original shootorials is not bad, just that a lot of the core flexibility that people want isn’t there.

The way I’d do it is to properly break the “level” into a functional object that is easily duplicated and modified and swappable, then turn the powerups and enemies into ECS. Enough that people recognize how to create new ones of “oh, all I need to do is write the functionality that is the powerup’s active ability and then do this that and this other thing.”

Also, if there’s a way to include unit testing, that would be good too. Although I don’t know how well HaXe supports that (I don’t know if Flash does either and have only poked at Unity enough to find that there ARE tools).

Well, basically any project/language/framework/etc. can support unit testing, right? So it definitely could be included in the tutorial. In my opinion though, I kind of agree with qwerber and player_03, it would be best to focus on what’s important in Flash/Haxe instead of architecture patterns, unit testing, etc. as important as those things are.

For reference, ASUnit is one testing framework for AS and FlashBuilder has something built in too, although I’ve never used it personally.


Curiously, what do people use Haxe for? Other than a slightly improved AS3?

 
Flag Post

Topic: Game Programming / Google Code Jam 2014

Originally posted by Dealmaster13:

It was easily doable in 2 hours; I should have noted this in the OP.

Yup, agreed, especially if you just did the 1, 2, and 4th in my opinion

 
Flag Post

Topic: Game Programming / Google Code Jam 2014

Whoops, just saw this now, will it be easily doable in 2 hours?

 
Flag Post

Topic: Kongregate / Greetings from San Francisco and a Call for Admin Questions!

Originally posted by Rolby:

i dont get what kong admins are busy at… they dont even do anything.

I think it’s a good question actually. Running a website doesn’t always look like a lot of work from the outside, so a ‘What we actually do from day to day’ response would probably be quite interesting.

 
Flag Post

Topic: Game Programming / FlashDevelop's flawed Features

Originally posted by cloa513:

Also ctrl+shift+1. What were they thinking? a triple combo (bad enough) with the keys all on side near each other but not close enough or nicely spread enough to do it easily with one hand- forcing you to reach across the keyboard with the other hand- might as well manually type the code.

I slide/rotate my left hand a little, so my thumb is on control, pointer on shift, and middle finger on 1. Still a little awkward, but quite doable with one hand. If you don’t like that method though, I’d just map it to a new key combo.

 
Flag Post

Topic: Game Programming / FlashDevelop's flawed Features

Originally posted by cloa513:

http://postimg.org/image/ijxg71tk3/

I know I made some mistakes with it as it is- still to working on it and would fix those.

Indenting is a constant struggle.

ctrl+shift+2 will auto-indent your code in FlashDevelop. It will fail if your code isn’t syntactically correct though

 
Flag Post

Topic: Game Programming / Graphic Filters/Shaders

Originally posted by vesperbot:
Originally posted by BobTheCoolGuy:

Don’t use Pixel Bender shaders anymore :^(

Don’t upgrade to FP11.8, that’s all. But, if they won’t fix or employ PB further, yep, screw PB and advance to AGAL. curses

PB was so easy too ha ha.

Originally posted by jasonjie88:

You think Adobe will try to correct the PB problem in FP 11.9?

Bug is labeled as ‘NeverFix’ so I don’t think so anyways

 
Flag Post

Topic: Game Programming / Graphic Filters/Shaders

Don’t use Pixel Bender shaders anymore :^(

 
Flag Post

Topic: Game Programming / Need easy object comparison?

Otherwise you’d need to override the toString() function for a lot of stuff and cannot for most. (like transform or graphics in a Sprite)

Says who? :^)

Transform.prototype.toString = function():String
{
	return "Hi Bob!";
}
 
Flag Post

Topic: Game Programming / FlashDevelop, how to properly embed sounds

You can embed it in the swf with the Embed metadata tag.

Something like this guy says

If you have the sound in the lib folder of your FD project, I think you can right-click it and choose ‘Generate Embed Code’

 
Flag Post

Topic: Game Programming / FlashDevelop Debug Suddenly Running Slow

Do you have tons of trace statements? They slow stuff down and get removed in release mode.

 
Flag Post

Topic: Game Programming / Flash AS3, bitmapdata.draw(textfield) anti-alias

Originally posted by NineFiveThree:

because vectors aren’t pixels

But vectors on screen are pixels :^)

 
Flag Post

Topic: Game Programming / The best way to stop Right-click -> Cheat

And because it’s kind of cool to be able to replace the reserved-string menu items with something that looks official.

Exactly!

Ha ha yeah, using it for easter eggs / messing with people is definitely a good use anyways

 
Flag Post

Topic: Game Programming / The best way to stop Right-click -> Cheat

Hmm, couldn’t you just listen for the MouseEvent::RIGHT_CLICK event?

See this too if you want

Edit: Oh wait, truefire said this already, oops.

 
Flag Post

Topic: Game Programming / Flash AS3, bitmapdata.draw(textfield) anti-alias

Originally posted by vesperbot:

Did I say something about zooming in? I wonder why it’s screwed if not zoomed or transformed at all.

I wonder this too. Obviously vector graphics are just displayed on screen in pixels, and so you’d think if you drew it directly to a bitmap it should look the exact same. I know sometimes when things are positioned at non-integer positions it can mess things up when drawing to a bitmap but I didn’t see any of that in this case.

Probably something special with how text is rendered and how draw works but no idea really

 
Flag Post

Topic: Game Programming / [AS3] What's the best way to introduce an "enable sound" button that mutes all sounds in a game?

For a quicker but less customizable solution, you can use SoundMixer#soundTransform

 
Flag Post

Topic: Game Programming / Flash AS3, bitmapdata.draw(textfield) anti-alias

Originally posted by siamon:

funny enough, drawWithQuality isnt recognized as a function??

@ninefivethree: Well i am not AS3 pro, and all the examples i saw were using bitmapdata. I am not forced to use it, but what is an alternative? (As said before, I need to have semi transparent black shape on which i wish to draw text – for tooltip purposes)

It was only added in FP 11.3 so you could be targeting too old of a version of FP. But regular old draw uses the current quality of the Stage which is probably already high enough, so I doubt it would help you anyway.


In regards to your second question something like this would work:

var container:Sprite = new Sprite();
container.graphics.beginFill(0, .3); // fill with black at .3 alpha
container.graphics.drawRect(100, 100);// draw a 100 x 100 square of transparent black
container.addChild(myTextfield);
 
Flag Post

Topic: Game Programming / Flash AS3, bitmapdata.draw(textfield) anti-alias

You could try using BitmapData#drawWithQuality to make sure it’s being drawn with the highest quality.

Probably won’t make a difference though

 
Flag Post

Topic: Game Programming / How to Write Unmaintainable Code

Originally posted by vesperbot:
Originally posted by BobTheCoolGuy:

Vesper, it’s supposed to be a parody :D It’s not supposed to be actual advice

I know, it just pains me to imagine it being implemented. Sorry, I can overreact sometimes.

truefire, well, obfuscation certainly exists in many places, be it just to lower the risk of code leakage with subsequential re-implementation of crucial algorithms, license key generation/checking for example. Occasionally a very hidden redefine can exist (for the same purpose) that will make stolen code produce different results, thus become unusable outside of developing company. Something else certainly can be implemented for other security reasons. But if these practices start being employed to undermine development, kill it with fire. :)

Ha ha fair enough, it pains me too to think about these actually happening

 
Flag Post

Topic: Game Programming / How to Write Unmaintainable Code

Vesper, it’s supposed to be a parody :D It’s not supposed to be actual advice

 
Flag Post

Topic: Game Programming / MMO hosting and services

Originally posted by Ace_Blue:

OK, so sorry about the double-post. It’s been about a week since I first posted this topic, and I’ve just about had it with playerIO.

In addition to the connect/quickconnect problem (which playerIO staff has known about and not solved since at least March of 2012!) its database is extremely poorly secured by default, and its room system is both idiotic and a hacker’s playground.

PlayerIO is dirt cheap, especially for someone like me who’s just trying to get a feel for multiplayer infrastructures and interfaces, but it’s a security nightmare.

So, anyone uses something else, something they’re happy with, and they would like to share? I’m on the market for a different experience. Let me know! I’ll be away for two weeks starting tomorrow and may not reply, but I’ll read all suggestions when I get back.

When I’ve used Player.IO in the past, I’ve pretty much felt this exact same way. To be honest, I haven’t looked deeply into all the security holes, but things always felt really shaky security-wise and I had found a few issues myself. Definitely keep us updated if you find something you like that is affordable, it’s valuable information for everyone.

In my opinion, the DB API/interface is quite horrible from a usability standpoint too.

 
Flag Post

Topic: Game Programming / Some help with C++

Originally posted by jonathanasdf:

My 2 cents:

You can’t blame the complexity of c++. All languages have scope and functions.

You’re completely correct. When I said C++ is super complex, I was in general referring to things he’ll come across in the future, crazy error messages he might get now, and a few other things. Variable scope and functions are pretty generic concepts that he should learn well and not be intimidated by! Something like varidaic templates though can probably be ignored for a good long while.

 
Flag Post

Topic: Game Programming / Is It Possible For A JavaScript Randomizer?

W3Schools is notoriously bad. Try using MDN instead, they have lots of good resources:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random

 
Flag Post

Topic: Game Programming / Some help with C++

Originally posted by GraphicDesignC:

I have a feeling this shouldn’t be so confusing to me it’s like I’m learning a foreign language. I think I understand but this all makes me feel so stupid it’s pretty overwhelming.

You haven’t gotten to all the complexity, but C++ is an extremely complex programming language. Don’t feel bad if it takes awhile to get a good grasp on it.

Here’s one guy trying to compare a few languages:

 
Flag Post

Topic: Game Programming / CSS Help?

#whatever selects elements with that id. As in <p id="whatever>Text here</p>
.whatever selects elements with that class. As in <p class="whatever">Text here</p>