Jump to content


OMGCarlos

Member Since 13 Jan 2011
Offline Last Active May 10 2013 12:15 AM

Posts I've Made

In Topic: Changing a specific number of instances

20 October 2012 - 05:01 PM

Yep. And to make Subjugater's code limit to only two, simply do:

global instanceCount; 
instanceCount = 0;

with(obj_name){
   instanceCount += 1;
   if(instanceCount < 2)   spriteName = 'name';
   else break;
}

In Topic: will this switch statement work?*ANSWERED*

20 October 2012 - 04:36 PM

^ this. If you use whitespace properly, you can read a piece of code like you read a book. Otherwise, it'll make anyone who looks at your code want to throw up...I edit other peoples code all the time :'(

Switch cases work well in situations where you can take advantage of the "leaking" property of switch statements, that is, when a "case" doesn't have a matching break. For example:
movie_rating = '';

switch(ageBracket){
	case 'senior':		
	case 'adult':  		movie_rating += 'R ';
	case 'young adult': 	movie_rating += 'PG-13 ';
	case 'preteen': 	movie_rating += 'PG ';
	case 'toddler': 	movie_rating += 'G '; break;

	case 'senior': movie_rating += 'And you get a discount :)'; break;
}

message_box('You can watch: ' + movie_rating);
If you're an adult, all ratings are used. If you are a preteen, then you can only watch PG and G. If you are a senior, you can watch all the movies PLUS you get a nice message saying you get a discount. That would be probably triple the amount of code if using straight-up if statements.

Also, notice the extra whitespace I used there to make it more readable too :) Making your code neat is ridiculously easy, just hit tab.

In Topic: How do I add a speed cap to an object?

20 October 2012 - 04:31 PM

speed = min( speed, X );   // minimum cap
speed = max( speed, X );  // maximum cap

In Topic: HTML5 - Browser Selection

20 October 2012 - 07:26 AM

Look into tools like "Live Reload" http://livereload.com/. It's for mac, but I'm sure something similar must exist for windows.

If you set Live Reload to scan your games directory, every time you compile your browser will automagically refresh itself with the new save. You can have every single browser open and they will all automagically update. I do this in web development where I have IE, Chrome, Safari, and FF open and everytime I hit save in my text editor all browsers update without me having to do anything.

With an extra monitor, I don't even have to switch windows to see the new update lol.

Unless I'm not understanding what setting the target browser does (I don't own studio). I'm assuming it just launches that browser for previewing...

In Topic: Computer Science Degress / options

20 October 2012 - 07:01 AM

I'm Project Director for a web development firm, and we had a few clients come visit us two weeks ago about a web app they wanted built. So we got to chatting and they asked us what our background was. My boss is hyper-social, so he cut in and wanted to talk in our behalf. He goes around: he has a masters in this, this one has a bachelors in that.

When he gets to me he goes: Carlos has a masters in CS. I swear I grinned so awkwardly I looked like the Joker...I don't have a degree. The thing is, they were so blown away by my portfolio during the interview they didn't even bother asking me what my education was. Among other things I showed them during the interview I actually googled "OITS GameMaker", went to my forum post here on the GMC, and downloaded my project to show him how I could build tools out of anything.

He said "well...****!"

At least in web development creativity goes a looooong way. I can't speak for game devs, but I'd imagine it's even more important for game development lol.

That being said, school is invaluable. While you're in school: soak up as much as you can, network with students/professors, and slowly build up a kickass portfolio of games.

Just figure out what you want to do...if you just want to develop games and thats it maybe Computer Science might be a good fit. If you want to eventually start your own game dev company or otherwise go beyond game development, business would probably be a better fit.

It's 2012, if you are really passionate about game development you'll eventually learn what you need from the internet anyways.

Since it's already your hobby, you might find yourself getting ridiculously ahead of your CS specific classes, simply because you apply everything you learn in class at home. If you DO do CS, just stick through it...I hear some of the more advanced classes are awesome!