Recent posts by Moly on Kongregate

Flag Post

Topic: Game Programming / Alchemy/Pixel Bender and Blending

I’m working on something that uses blending quite heavily, currently drawing stuff like this:

canvas.draw(texture, matrix, null, BlendMode.MULTIPLY);

Unfortunately this can be quite slow, does anyone know if I could use something like either Alchemy or Pixel Bender to speed things up? I couldn’t find much information online.

My other thought was writing my own blending function in actionscript, something like

canvas.setPixel(x, y, texture.getPixel(x, y) * canvas.getPixel(x, y));

but I’m guessing that’d be nowhere near as fast as the inbuilt method.

 
Flag Post

Topic: Collaborations / Programmer needed. Art is done.

Oh right, that makes more sense. Like this then: http://www.swfcabin.com/open/1267298411 ?
I don’t have skype, but I think you gave me your msn address so I’ll try to go on that at some point.

 
Flag Post

Topic: Collaborations / Programmer needed. Art is done.

Just wanted to check some things that you weren’t very clear on. Is this sort of how you wanted the walls to move? http://www.swfcabin.com/open/1267265267

 
Flag Post

Topic: Collaborations / Programmer needed. Art is done.

You’ve certainly piqued my interest. Could you send enough assets to make one level (hero, any enemies, level background, brief description of how the level works) and I could get a quick prototype going?

 
Flag Post

Topic: Collaborations / Programmer needed. Art is done.

If I’m right, your game is basically lunar lander with a more puzzle orientated focus. The little thing with the legs and the three antenas in all of the pictures is the player rocket, and he has to collect the stars? It looks pretty interesting, could you either post here or send me a link of some of your final levels (the ones you’ve done smoothly)?

 
Flag Post

Topic: Game Programming / Anyone have experience with/thinking of changing to Silverlight?

I looked into Java web applets, wondering why there aren’t any big Java portals like there are for Flash. Some people mentioned that there are “annoyances” during development but didn’t go into specifics, and some said that it’s harder to get a consistent performance across different systems than Flash, but otherwise it looks worth considering.

Another plus to Java is that AS3 was made almost completely identical to Java, syntax-wise.

Not wanting to get off-topic, but AS3 is almost completely different to Java, syntax-wise. AS3 is based on javascript, whereas Java is more C based. They both have import statements and are laid out in a similar manner in source editors so at first glance they look pretty similar, but the actual syntax is very different.

 
Flag Post

Topic: Game Programming / Anyone have experience with/thinking of changing to Silverlight?

The problem is that, unless things have changed since new year, you will not get silverlight games approved on Kongregate.

Not right now, but I am under the impression that they intend to open submissions up eventually. I didn’t realise most people here have money as their highest priority. Personally, I’m willing to sacrifice some of the viewings/revenue for a better development experience. In a worst case scenario, if I make a game that shows potential but Silverlight hasn’t caught on as much as hoped I just have to spend a couple of days porting it Flash. That’s obviously a waste of time if you’re trying to make a living from webgames, but for those of us who just see it as pocket money I think it’s worth the experience.

 
Flag Post

Topic: Game Programming / Anyone have experience with/thinking of changing to Silverlight?

Unfortunately Silverlight is a non-starter if you want to make any money from your games.

From traditional sponsorships maybe, but there are other ways of monetising web games. You can still get the ad revenue share and contest money from Kongregate and the handful of other silverlight-supporting portals (a successful game can make several thousand just from this). If you’re willing to implement micro-transactions that can be quite lucrative, especially if distributed on Facebook and similar sites.

 
Flag Post

Topic: Game Programming / Anyone have experience with/thinking of changing to Silverlight?

There is actually an opensource implementation for Linux called Moonlight, although I understand it’s currently a little behind Silverlight at the moment. One of the problems I’m finding at the moment is that because it’s being developed so quickly (4 versions in about 3 years I think) it’s pretty hard to find resources that aren’t already outdated.

 
Flag Post

Topic: Game Programming / Make Your Own Coding Tutorials

 
Flag Post

Topic: Game Programming / Make Your Own Coding Tutorials

I believe this is caused because the line endings are getting messed up. If you’re writing the tutorial in Notepad, download something like Notepad++ and open tutorial.txt in it. Then go to Format → Convert to UNIX format which should set all the line endings right. Save tutorial.txt and see how it looks in the shell.

 
Flag Post

Topic: Game Programming / Make Your Own Coding Tutorials

Do you mean how it’s too spaced out?

 
Flag Post

Topic: Game Programming / Make Your Own Coding Tutorials

I’m going to guess that your code has a < in it, which the shell interprets as the start of a html tag. Change all your less than symbols to &lt; instead.

 
Flag Post

Topic: Game Programming / Anyone have experience with/thinking of changing to Silverlight?

Who wants to make a game for a plugin that seriously limits your audience?

I’m not suggesting that those who make a living from webgames should switch right now, the down time for re-adjustment and the risk of the plugin not catching on as much as expected is too great. However, as a hobbyist I have other things to consider than revenue and distribution. Primarily, (I feel) C# and Visual Studio experience is going to look a lot better/more relevant on my CV and portfolio than ActionScript and Flash when I’m looking for computing jobs in a years time.

 
Flag Post

Topic: Game Programming / Make Your Own Coding Tutorials

The text does look a little different, especially in the caption box on the splash page. I tried getting it to look right, and as far as I can tell I’m using exactly the same formatting, but that’s as close as I could get it. I’m assuming that the AS2 and AS3 text renderers are different. It’s still perfectly readable on my screen though, does it look completely unusable on yours?

 
Flag Post

Topic: Game Programming / Anyone have experience with/thinking of changing to Silverlight?

The hope is that if successful here, other portals will follow suit and start to allow non-flash content. With Microsoft pumping money into Silverlight the penetration rate and number of developers using it is only going to go up, so they’ll start to miss out on more and more content (which Kongregate will be getting) if they don’t. There’s allways ad-revenue/micro-transactions to keep you going in the meantime.

 
Flag Post

Topic: Game Programming / Anyone have experience with/thinking of changing to Silverlight?

I’m seriously considering changing to using Silverlight for my webgames when Kongregate starts to openly allow them. Personally, the benefits of having a much more widely used language like C# outweighs the obvious initial problems of some users not having the right plugin and few other portals supporting it (issues which should hopefully resolve themselves in the not too distant future). Has anyone played around with Silverlight and could comment on what the development tools are like, how it’s performance compares to Flash etc?

 
Flag Post

Topic: Game Programming / Make Your Own Coding Tutorials

The quality of the shell or the quality of the swf that you’re embedding?

 
Flag Post

Topic: Game Programming / Make Your Own Coding Tutorials

Tweener is included in the lib folder, it might be that your compiler can’t find it (I use Flash builder). Try adding it to your class path or moving it to the swc folder. As for the shell, I think the problem might be AS3’s increased security for local files. Try going here: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html and adding the folder that the shell is in to the trusted locations. It should work fine when uploaded.

 
Flag Post

Topic: Kongregate / BTD4 Review/Analysis/QQ Thread

Crypto, you really need to get out more.

 
Flag Post

Topic: Game Programming / Developer Feature Request Thread

Maybe an option that lets friends see an unpublished game?

You can sort of do that already. There’s guest link you can find by putting /api at the end of the your unpublished game’s url eg. http://www.kongregate.com/games/Moly/shootorial-0-actionscript-3_preview/api
It lets guests (non signed in users) see your game.

 
Flag Post

Topic: Game Programming / Make Your Own Coding Tutorials

Originally posted by Feltope:

If it indeed only does AS2 SWF’s then that is the problem.

Not sure if you’ll check back here but I ran into the same problem with not being able to use AS3 swfs. I decompiled the shell and converted it to AS3 and it seems to work fine now, although I haven’t really used it much yet so there could be some bugs I have found.

shell source

 
Flag Post

Topic: Game Programming / AS3 Question

Handling input in AS3 is best done by storing all the currently pressed keys in an array:

package
{
     import flash.display.*
     import flash.events.*
     import flash.ui.*
     import flash.utils.*
	
     public class Character extends MovieClip
     {
          private var xspeed:Number = 20;
          private var yspeed:Number = 20;

          private var keys:Array = new Array();
		
          public function Character()
          {
               addEventListener(Event.ENTER_FRAME, enterFrame);
               stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
               stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp);
          }

          private function enterFrame(e:Event):void
          {
               if(keyIsDown(Keyboard.LEFT))
               {
                   x -= xspeed;
               }
               if(keyIsDown(Keyboard.RIGHT))
               {
                   x += xspeed;
               }
               if(keyIsDown(Keyboard.UP))
               {
                   y -= yspeed;
               }
               if(keyIsDown(Keyboard.DOWN))
               {
                   y += yspeed;
               }
          }

          private function keyIsDown(keyCode:uint):Boolean
          {
               return keys[keyCode];
          }

          private function onKeyDown(e:KeyboardEvent):void
          {
               keys[e.keyCode] = true;
          }

          private function onKeyUp(e:KeyboardEvent):void
          {
               keys[e.keyCode] = false;
          }
     }
}

This means you can work out movement in your game loop rather than in an event handler. Ideally you’d put the key stuff in its own class.

 
Flag Post

Topic: Kongregate / We really need a comments page.

This would be really useful, along with a page that shows the pageviews/ratings of all your games. Once you get over 5 on your profile it becomes a real hassle to load up and check them all individually.

 
Flag Post

Topic: Game Programming / Developer Introductory Experiences

Went to Uni, wanted to make a web game, made one.