Recent posts by StapleGun on Kongregate

Flag Post

Topic: Game Programming / packages?

I sure hope FD comes out with a package refactoring tool someday. That’s about the only thing in FD that makes me angry.

 
Flag Post

Topic: Game Programming / You Are not a Software Engineer

They are Reddits.

 
Flag Post

Topic: Game Programming / [mxmlc] Odd Error.

I think I’ve been getting the same error the last few days. About 5 different times it wouldn’t compile, but retrying always seems to solve it.

 
Flag Post

Topic: Game Programming / You Are not a Software Engineer

Originally posted by UnknownGuardian:

Someone reads r/programming. (probably) Glad to know.

That makes 3 of us :) Ever go to r/gamedev?

 
Flag Post

Topic: Game Programming / Td like game issue

Ah, I was thinking removeMovieClip was the same in AS2 as AS3. I haven’t touched AS2 in four years so it slipped my mind. Thanks.

 
Flag Post

Topic: Game Design / Deeper topic: Level Selection

Perfect example UG, I didn’t know Gemcraft did something similar. I first saw the idea with Bubble Tanks Tower Defense , although I’m sure it’s been used since the early days of games.

 
Flag Post

Topic: Game Design / Deeper topic: Level Selection

One of the problems with the linear style is that if you get stuck on one level you’re done. This can drive a lot of people away from the game quickly if there is no other alternatives. It is especially prevalent in puzzle games where it’s usually a very harsh win/lose condition, as opposed to platformers where each individual obstacle can be overcome with repetition and practice.

To combat this, in the last game I released I had a “pyramid” style of level progression, which could more generally be referred to as a dependency style. Unlocking each level is dependent on one or more other levels being unlocked. Consider a game with 5 levels, where beating the first level unlocks levels 2 and 3. Beating level 3 unlocks level 4, and beating levels 2 and 4 unlocks level 5. To win the game you till have to beat all the levels, but you could do it in different orders (1-2-3-4-5, 1-3-4-2-5 or 1-3-2-4-5). With more levels you can offer more choices in the progression.

My pyramid style just arranged the dependencies in an comprehensible way. The bottom (largest) row of the pyramid begins unlocked. Every level not on the first row sits on top of 2 levels from the row below. In order to unlock a level you must first beat both levels below it. This offers beginners a wide selection of levels to chose from, but as they progress the paths begin to converge and eventually they are forced to beat certain levels before advancing.

 
Flag Post

Topic: Game Programming / Td like game issue

Originally posted by skyboy:

that’s not how you use removeMovieClip.

Adobe AS2 LiveDocs.

I’m a bit confused, what do you consider incorrect about the following line?

enemy._parent.removeMovieClip(enemy);
 
Flag Post

Topic: Game Programming / Working for a professional game firm?

Programming is one of the few subjects where there are often some students who are better than the teacher. There’s a lot of teachers who were never formally taught any sort of programming but are tech savvy and teach straight from a book. Additionally, the level that is taught in high school courses is easily surpassed when a student gets addicted to it (like so many of us) whereas subjects like Math and English have the same phenomenon much less often.

 
Flag Post

Topic: Game Programming / Working for a professional game firm?

Originally posted by CormacJolt:

As for 40+ weeks, a lot of that comes down just to bad project planning and unrealistic expectations. There have been a lot of studies into the detrimental effects long hours have on programmers, you might be working longer hours but the quality drops off significantly. I would be weary of any company where that is the norm, rather than rare occasions.

I know Europe has generally shorter work weeks but 40 hours is the norm in the US. Crunch weeks can easily go to 60+ hours but I’ve been lucky enough so far on my projects to avoid anything too crazy.

 
Flag Post

Topic: Game Programming / Working for a professional game firm?

I work at a mid-size (~30 employees) company that does games, animation, mobile apps and some other things. I love the job, I expected 40 hour work weeks to drain me but because it’s stuff I enjoy and the people are great the days go by fast. The experience so far has been great, the artists we have are incredibly talented and it motivates me to write better code to make sure it matches the quality of the art. I will admit the pay is considerably less than I could get from similar programming jobs in the area.

When I applied I submitted a portfolio with some of the games I’ve released on here, two larger school projects I worked on, and projects from the 2 passed internships I had while in school. I have a BS in comp sci but the people interviewing me barely cared. Being able to show previous work was 10x better than any degree, GPA or certificate I could show.

 
Flag Post

Topic: Game Programming / So I want to learn C#

Anything you can find in a book you can find online for free. Unless you enjoy the nature of reading through a book I would recommend saving your money.

If you are fairly familiar with OOP in c++, then C# shouldn’t be too difficult to start out. After briefly studying the syntax and basic workflow, I think the best way to learn a new language is to start writing some projects for fun rather than trying to learn all the concepts of the language without applying them.

Lastly, StackOverflow is a great C# reference whenever you get stuck on something.

 
Flag Post

Topic: Game Programming / How do you handle multiple save files?

While storing a 2d array would work, the method wonsorang described would also work and its a lot more intuitive. Thinking of each save slot as an object lets you store an array of save slot objects. To me it makes a lot more sense than thinking of each stat as an object, and each stat has several different save slots that it saves itself to. Consider how much easier it is in the following example…

//Mathod 1 (recommended): Storing a collection of save slots
function DeleteSlot(oneSaveSlot:Object):void{
    var slotID:int = allSaveslots.indexOf(oneSaveSlot);
    allSaveSlots.splice(slotID, 1);  //Removes the save slot from collection of all save slots
}

//Method 2:  Arrays for each property.
function DeleteSlot(slotID:int):void{
    exp.splice(slotID, 1);
    stats.splice(slotID, 1);
    money.splice(slotID, 1);
    weapons.splice(slotID, 1);
    currentLevel.splice(slotID, 1);
    // Etc....  Whenever you want to store something new you need a new line of code here, as well as other places (LoadSlot, etc...)
}
 
Flag Post

Topic: Game Programming / GiTD [#14] Voting

  1. Kolor Bot: Somewhat innovative, and upgrades are always fun!
  2. Other unnamed Vertical Shooter: Fun but easy to just stay in one spot and hold down spacebar.

Oh, and like Luthimir I don’t know the goal of Life++, although it seams like it could be fun.

 
Flag Post

Topic: Game Programming / Has anyone had success with the Flash iPhone packager?

Thanks for the story, it was exactly what I was looking for! I’m an avid redditor myself btw.

Unfortunately I won’t be getting a Mac any time soon so it would seem objective-C development is out of my reach for now. Would you describing the workflow briefly of making a game in objective-C though? What role does Cocos2d play in it? is interface builder used at all? are libraries (tweening, 2d physics, etc…) readily available?

 
Flag Post

Topic: Game Programming / Skyboy's pixel perfect hittest

Thanks for clearing that up Wordblind! I can finally sleep knowing there’s a method to the madness.

 
Flag Post

Topic: Game Programming / Skyboy's pixel perfect hittest

From Adobe’s AS3 docs…

For a display object in a loaded SWF file, the root property is the top-most display object in the portion of the display list’s tree structure represented by that SWF file. For a Bitmap object representing a loaded image file, the root property is the Bitmap object itself. For the instance of the main class of the first SWF file loaded, the root property is the display object itself. The root property of the Stage object is the Stage object itself. The root property is set to null for any display object that has not been added to the display list, unless it has been added to a display object container that is off the display list but that is a child of the top-most display object in a loaded SWF file.

For example, if you create a new Sprite object by calling the Sprite() constructor method, its root property is null until you add it to the display list (or to a display object container that is off the display list but that is a child of the top-most display object in a SWF file).

For a loaded SWF file, even though the Loader object used to load the file may not be on the display list, the top-most display object in the SWF file has its root property set to itself. The Loader object does not have its root property set until it is added as a child of a display object for which the root property is set.

Well, that didn’t really clear anything up lol.

 
Flag Post

Topic: Game Programming / Skyboy's pixel perfect hittest

//Code inside constructor of Document class.

trace(this.root == stage);		//False
trace(this.parent == stage);		//True	
trace(this.root == this);		//True

var sprite:Sprite = new Sprite();
stage.addChild(sprite);
	
trace(sprite.root == stage);		//True
trace(sprite.parent == stage);		//True

I’m confused by this, why does the document class get set as it’s own root, but when I add a sprite directly to the stage, the stage becomes the root of that sprite.

 
Flag Post

Topic: Game Programming / Skyboy's pixel perfect hittest

Originally posted by truefire:

On another note, does anyone know why there is no static reference to stage? That would make things like registerRoot(stage); unnecessary.

I wish there was too, I usually make a Main.stage reference in my games anyways. I suspect it has something to do with loading SWF’s at runtime. I’ve never really wrapped my head around the differences between stage and root.

 
Flag Post

Topic: Game Programming / Has anyone had success with the Flash iPhone packager?

I wanted to try and build a game for the iPhone using the iPhone packager but I can hardly find any good resources for showing how to interface with the iPhone. I was wondering if anybody here has successfully ran an app or even got an app submitted to the app store which was created in Flash.

 
Flag Post

Topic: Game Programming / One API to rule them all

Drakim brings up a good point about the API’s being dissimilar. I wrote an API wrapper for a game I’m working on currently. I included 4 different high scores API’s, and all of them work a little differently. Even with the API wrapper I spent most of my time handling exceptions, some automatically submit scores, some require a popup box so the user should be able to choose if they want to submit, some display scores inside the SWF, some use categories, etc… I’m guessing payment API’s would be the same way. A bit of abstraction is nice to be able to swap them in and out, but you will still need to write a lot of code specific to each API.

 
Flag Post

Topic: Game Programming / Flash Player 11 "Molehill" preview release available for download

Originally posted by skyboy:

you could do that with FP7.
you’d need to make it so unity and flash can be layered 1:1 over each other, then have java script capture right-mouse clicks and send those directly to unity, then have flash get left mouse clicks, and send non-UI clicks from flash back to javascript to be sent to unity. then when a UI element is clicked on, act, and send data&stuff to javascript to unity.
the javascript bridge works both ways, as well, so unity can send data to flash.

but beyond that method. no you can not build a 3D game in unity then merge it with flash. it must be all flash or all unity or all javascript or all java.

Then people need to have Unity Web Player installed which is a big drawback. Also, I would rather have it natively supported in one of the two players, which it appears this will allow.

Originally posted by UnknownGuardian:

Unity is in the process of building a .swf (to actionscript basically) exporter. It might be worth learning now.

I know Unity, it’s my day job :) But the tedious interface building is a huge drawback for me, it makes personal projects much less fun so I’ve stuck with Flash until now.

 
Flag Post

Topic: Game Programming / Flash Player 11 "Molehill" preview release available for download

I wish I had time to play around with this right now. Can someone tell me if this finally means I can realize my dream of building a 3d game in Unity and making the UI in Flash? I really hope the 3d scene interacts well with 2d graphics.

 
Flag Post

Topic: Game Programming / Viral distribution, site-locking, and your rights as a developer

Originally posted by skyboy:

the solution is fairly simple. but it requires mochi to make a change to their code.

and you don’t need to hide mochi-ads on kong, mochi automatically detects whether or not it’s on kong, and prevents the ad from being displayed if it is; so you can push the same version with no mods to everywhere, including kong

Yea but you still get the blinking Mochi preloader for a second on here that’s why I check before ever making a Mochi Ad call.

 
Flag Post

Topic: Game Programming / Viral distribution, site-locking, and your rights as a developer

Originally posted by skyboy:
Originally posted by StapleGun:

No, I couldn’t get it to work with the Kong API so I figured I’d just toss the version up here with MochiAds hidden and post the LiveUpdates version elsewhere when I was ready.

mochi ads are disabled on kong anyway
if the game gets stolen from here now, there won’t be any ads on it

I only hid them if it was the Kong URL. It was scraped from here by several sites but that version still has the standard Mochi Ads on it. I wanted to use Live updates for all other sites so I could manage updates efficiently, so now there 2 versions (regular Ads and LiveUpdates) floating around in the tubes.