How to build a bones animation engine? I want to develop a flash game. It would draw a stick man, and edit his pose. I think what I need to learn are bones animation and physics engine. Can anyone introduce some good resources to learn both?


Best practices for UnitTesting heavy Flash game clients and libraries? We have several quite heavy game clients completely written in AS3 (some also use Flex for UI). Some clients are built with PureMVC, others are a pile of spaghetti code that's grown over the years. We also have several libraries used by our game clients that are written in AS3 Flex. I'm tasked to evaluate the benefits risk cost of applying unit testing to our clients and libraries and decided to give FlexUnit a closer look. I chose FlexUnit for a first attempt over fluint since FlexUnit is definitively able to test pure AS3 projects while I'm not sure about that for fluint. Now I'm wondering what some good starting points and best practices are to get unit testing into previously untested applications. So my questions for unit testing game clients and libraries are How to get started? What are "low hanging" ( easily testable) fruits to test with unit testing? What are commonly tested aspects of game clients? Can you apply unit testing to the BBOY design pattern or do you need to (extensively) refactor the game clients? Is it useful (and does it make sense) to test asset loading? If so, how to do it (comparing a binary diff, or comparing hash checksums, or ...)? How to test server communication and asynchronous commands? How to integrate the whole thing with Hudson Jenkins CI server and Maven? Are there any reporting tools that can generate overviews of the run tests and report which test failed on which function class? I'm thankful for all pointers about the issue (direct answers, blog posts, forum discussions, how tos, etc. etc. etc.) since I have little previous practical experience with unit testing.


How do I combine matrix transformation with non uniform screen scaling in Flash? I'm using a Flash transformation matrix for affine transformation. I have a rectangular image being rotated and scaled (in 2D). There are two sets of scaling variables, ScreenScaleX and ScreenScaleY, and ScaleX and ScaleY, as well as a counter clockwise rotation angle, theta. ScreenScaleX and ScreenScaleY are the scaling factors of the window they should be applied in directions of the original X and Y axes after rotating the image. ScaleX and ScaleY should be applied in the new X and Y directions after rotating the image. For example if theta is 90 degrees, ScreenScaleX and ScreenScaleY will still stretch in the direction of the original X Y axes, but now ScaleY will stretch in the screen's X direction, and ScaleX will stretch in the screen's Y direction. I think I can accomplish this with some combination of scaling, rotation, and skewing, but I'm struggling to figure out what the matrix would look like. How would I construct a matrix from these variables in order to perform this transformation?


Splitting game into multiple standalone parts I'm digging into Starling's CitrusEngine game engine. I try to understand the idea of structuring the game. If you take a look at chrome.angrybirds.com or puddingmonsters.com you see that games load states (StarlingState's assets) dynamically which is smart. When the game starts a splash screen displays, then you get a pre loader which loads the main state (home, settings and choose level view) and when you select a level a pre loader displays again which loads the level state. This looks like they've constructed multiple parts for the game and then connect them together where the pre loader is displayed when switching from one part to other. How should we do that in Starling CitrusEngine? What's the logic here? Flash games usually load all assets at the beginning which is not smart on mobile devices. Is it wise to have multiple StarlingCitrusEngine classes or you should handle the whole game in a single StarlingCitrusEngine class? Please explain in details. Many thanks for answers.


Flixel doesn't light tile up i'm creating a game with flixel, and I want to have a effect when you mouse over a tile, I tried implementing it, and this is what it gives public class GameState extends FlxState private var block EmptyBlock public function GameState() override public function create() void for (var i Number 0 i lt 30 i ) block new EmptyBlock(i, 20) block.create() override public function update() void block.update() super.update() GameState class and here is the EmptyBlock class public class EmptyBlock private var x int private var y int private var row FlxRect public function EmptyBlock(x int, y int ) this.x x this.y y public function create() void row new FlxRect(x, y, 32, 32) trace ("Created block at" x y) public function update() void if (FlxG.mouse.screenX row.x) if (FlxG.mouse.screenY row.y) var outline FlxSprite new FlxSprite(row.x, row.y).makeGraphic(row.width, row.height, 0x002525) UPDATE The problem is still not solved. I tried what you recommended, this is the new code public class EmptyBlock extends FlxSprite private var outline FlxSprite Embed(source 'freetile.png', mimeType "image png") private var freeTile Class public function EmptyBlock(x int, y int) this.x x 32 this.y y width 32 height 32 Note this is a block, rather than an outline. Create an outline image, then use loadGraphic() instead of makeGraphic() if you want an outline. outline new FlxSprite(this.x, this.y) outline.loadGraphic(freeTile, false, false, 32, 32, false) override public function draw() void super.draw() if (overlapsPoint(FlxG.mouse.getScreenPosition())) outline.draw() And I call it here public function createMap() void var block EmptyBlock new EmptyBlock(0, 0) block.draw() Do you see what i'm doing wrong? Thanks!


In Box2dFlash my b2body gets detached from my Sprite after I use setXForm() I have a scenario where I have red coin in a Carrom board game which should be moved outside of the visible window when it is pocketed, also if any coin either white or black is not pocketed in the next shot, the red coin should be replaced in the center of the board. Now my problem is WHEN I apply the setXForm() method to move the b2body of the red coin outside of the visible area of my flash window.It moves,there is no problem in moving the body,but WHEN i replace the b2body and sprite after the event of no coin falling , the b2body is detached and works as a separate entity having no connection with the sprite of the red coin. I'm not getting a clue as to what is happening, that is why I thought I'd try posting this here.


Are there any command line swf packing tools? I want to packing image files(png, jpg) into swf, then game can load files easily. But I want to do this by a Makefile, not FLASH CS. Do you know any command line swf tool set can do that? And can I packing XML files into it as well?


Pixel perfect collision against rotated sprite in Flixel I've got a roughly 500x50 graphic of a lockpick that I need to be able to rotate very finely while doing pixel perfect collision detection against the lock object. There's no way to do pixel perfect collision detection in Flixel, so I'm using the Power Tools' FlxCollision class to accomplish this. The problem is that this class only works with rotated sprites if they were loaded with loadRotatedGraphic. ...the problem with that is that it only allows you to rotate to discrete angles. You pass it how many angles you need to be able to rotate to and it, I think, pre prepares all the frames for you. And the reason that's a problem is because I need such fine rotation. I need at least 128 different angle values, but when I do that I get Error 2015 Invalid Bitmap, which I'm assuming is because the resulting 128 frames of a 500x50 lockpick results in a bitmap larger than AS3's limit. I can load the graphic using loadGraphic instead, which I think just calculates the rotated image real time, but then FlxCollision won't notice that it's been rotated. Another problem is that with the pre rotated graphics, you can't rotate about a specific point, and I need the lockpick to rotate around the tip of its handle. ...so how the heck do I do pixel perfect collision against a rotated sprite? I'm trying to mod FlxSprite so that FlxCollision will see the rotated sprites even when they're calculated in real time, and to do this I Ctrl F'd through the class looking for appearances of "angle", the variable that you set to rotate a sprite, but all I can find is some obscure calculation in it's used to compute a frame number, and I can't find a single call to any function that looks like it's doing real time bitmap rotating. So, I was able to solve this problem. All FlxSprites hold the bitmap for their currently visible frame in an internal variable called framePixels. If you load a graphic using loadGraphic, then you can do real time rotation in this case, the draw() function rotate s framePixels "at the last minute", right before rendering it. Meaning the rotated bitmap is not stored, and FlxCollision has no way of seeing it. FlxCollision runs its collision checks against the unrotated bitmap. So this is what need to be done Get the sprite to store its rotated graphic somewhere rather than just sending it to the renderer and then abandoning it. Get FlxCollision to use that stored rotated graphic rather than framePixels. This is summarized in the following diagram. Flixel's default logic is in black, my changes are in red. I applied all of this in a sub class of FlxSprite that I called PerfectCollisionSprite. Here's my code.


How can I improve the seemingly capped framerate of my flash game? I used to be sure that all Flash games are capped to 30fps as Edmund McMillen's The Binding of Isaac runs at that frame rate. N v2.0 (Flash Player 11) runs at 60fps. Why do games developed in Flash seem to have capped frame rate? What are the limits on the fps when developing in Flash?


Using external music mp3 in flash game sorry for my english. Im relative new to flash game development, Im creating a game and I need some big size mp3 files. If I add them into flash, .swf file will be too big. I guess I need to host mp3 files somewhere and use URL Request? Where can I upload mp3 files so they are always ready for use?


How to stretch Movie Clip according to user's touch coordinates? I have code like this touchX e.stageX touchY e.stageY I also have a player movieclip that I'm trying to make shoot lasers. So I got the MovieClip to appear and rotate according to the player's location and the user's touchX and touchY. How do I make the laser MovieClip stretch according to the distance between the player's coordinates and the touchX and touchY coordinates?


Make colour change depending on time I'm making a Flash game (ActionScript 3) and for dynamics I'd like to make the background change colour depending on the clients' time of day. I have a rough idea on how I want to do this, At sunrise, I want the background to be yellow orange In the middle of the day, I want the background to be cyan clear sky colour At sunset, a reddish orange During the night, a navy blue. I will be using this method to change the colour of the symbol, which is at default a dark grey colour. (unless someone points out a better way to do this). This means I have access to the red, blue and green components of the background. On implementing the system itself I suppose I could simply get the client time and do if (hour gt 9) and (hour lt 18) colour SKY BLUE and similar for the other times of day, but I'd like it to tween slowly between colours as time progresses. For example, if 6AM is yellow orange and 9AM is blue, 7 30AM would be yellow moving towards blue. I have a feeling I need to come up with an algorithm to link time to the RGB components of the colour, but I've always been terrible at maths and I can't think of how to do this, so that's why I'm asking. Please tell me how I would do this, both concept outlining and sample code, or even just tips are welcome. )


How do you create a single internal pre loader for a Flash game written using Flex? I've got a somewhat large SWF which I'd like to deliver through a pre loader so the user doesn't have to appear to wait as long. With Actionscript it's pretty easy to create an external pre loader but doing so makes it harder to distribute my game. What methods are available for including the pre loader in a single SWF?


Tile based maps in AS3 I want to make a tile based platformer in AS3. I want my game to read an external maps file (in xml or json or somethimg similar) to draw a tile based map. I've seen loads of tutorials for this in AS2 and other languages, and the few I've found in AS3 are either incomplete or filled with extra unnecessary features. I just want to be able to draw a basic map from sprites in Flash. Any links or information to point me in the right direction would be appreciated.


Does swf provide better compress rate than zlib for png image? Somebody told me that when a png image is stored in swf, it's separated to several layer, hence the alpha channel can be compressed better. Is it true? Or, once png image is imported into a swf, it's format is changed, e.g converted into bitmap data, and than compressed by swf's compress algorithm. That's, it is not in png format anymore. I don't know how swf packing its resource, please tell me if you know.


How to organize timeline in a Flash project? I am starting a new Flash game and I was wondering if there is a better way to organize the timeline of the project. In my previous games I define a keyframe for each possible status of the game (loading, sponsor, intro, menu, gameplay, etc...). This method works but has some problems... For instance, it is not easy to implement transitions between the different screens in the game. How do you do this? Do you know of some better way?


TileBased Game Blitting Hero or Sprite? So my environment is all set up and now I'm working on the movement physics of my character. I used blitting to copy over my tiles from a tilesheet. But since they are static, they are only copied over once. And with the Hero (main player character), I figured that I might blit him into his continuously changing position. But now, I'm not quite sure it's necessary? Is there a real big perfomance save to copy the Hero sprite into a new position constantly using Blitting, OR, is it fine to just copy it into the game once, and simply move the Hero sprite as a movieclip?


Need help implementing shadows on platform with limited feature set I am writing a game that very much relies on real time shadowing and would like to implement shadow volumes. I was thinking of doing shadow mapping, but the platform I am using is Molehill Stage3D and it's limited to 8 bits per channel, BGRA textures, and shaders can only read from textures, not depth buffers. I have never done stencil shadows before, but would it be possible to generate a shadow volume entirely on the GPU without the use of Geometry shaders, and only vertex shaders?


Fixed timestep with interpolation in AS3 I'm trying to implement Glenn Fiedler's popular fixed timestep system as documented here http gafferongames.com game physics fix your timestep In Flash. I'm fairly sure that I've got it set up correctly, along with state interpolation. The result is that if my character is supposed to move at 6 pixels per frame, 35 frames per second 210 pixels a second, it does exactly that, even if the framerate climbs or falls. The problem is it looks awful. The movement is very stuttery and just doesn't look good. I find that the amount of time in between ENTER FRAME events, which I'm adding on to my accumulator, averages out to 28.5ms (1000 35) just as it should, but individual frame times vary wildly, sometimes an ENTER FRAME event will come 16ms after the last, sometimes 42ms. This means that at each graphical redraw the character graphic moves by a different amount, because a different amount of time has passed since the last draw. In theory it should look smooth, but it doesn't at all. In contrast, if I just use the ultra simple system of moving the character 6px every frame, it looks completely smooth, even with these large variances in frame times. How can this be possible? I'm using getTimer() to measure these time differences, are they even reliable?


How do you make money from html5 games (i.e sponsorships)? I make games with flash and I am interested in making games in html but I haven't seen any companies or websites which are willing to buy these games (i.e game sponsorships). I was hoping somebody could tell me about a company who would do this or why people don't buy html games?


Flash Game not working on Android I am not sure if I will be able to provide enough information for someone to answer this question, but any ideas might help. I am creating a tower defense game in Flash and I eventually want to make it run on Android. Just for testing purposes, I have been running it on Android's browser and different Android .swf player apps. Recently, the game stopped working correctly. When it gets to the second wave of enemies, they get about four tiles in and stop moving. I can get them to start moving again by constantly clicking on parts of the screen. It's almost like the game loop has quit updating. Trying to solve the problem, I have updated the gameloop from Flash's standard events to a NativeSignal event (didn't solve the problem but the game runs much faster overall). The game works fine on my PC, I can't figure out the Android problem though. Any ideas or help would be appreciated. I didn't want to supply code since I wouldn't know where to start that would be helpful.


Should I create .fla files in Flash Professional and import them into Flash Builder? With Flash Builder and Flash Professional at my disposal for creating games, I'm having a hard time figuring out if I should be creating the .fla files in Flash Professional and then importing them into Flash Builder, or something else? Does it matter?


Splitting game into multiple standalone parts I'm digging into Starling's CitrusEngine game engine. I try to understand the idea of structuring the game. If you take a look at chrome.angrybirds.com or puddingmonsters.com you see that games load states (StarlingState's assets) dynamically which is smart. When the game starts a splash screen displays, then you get a pre loader which loads the main state (home, settings and choose level view) and when you select a level a pre loader displays again which loads the level state. This looks like they've constructed multiple parts for the game and then connect them together where the pre loader is displayed when switching from one part to other. How should we do that in Starling CitrusEngine? What's the logic here? Flash games usually load all assets at the beginning which is not smart on mobile devices. Is it wise to have multiple StarlingCitrusEngine classes or you should handle the whole game in a single StarlingCitrusEngine class? Please explain in details. Many thanks for answers.


Flash Origin Problem with Movie Clips I'm working on a game that uses Flash for the user interface. I'm running into an odd issue with the origin of a library movie clip. Here are the steps to reproduce Create a new MovieClip and construct a single rectangle with both a fill and a stroke. Set position of rectangle to (0,0) and notice that the origin is at the center of the border stroke surrounding the rectangle. Change position of rectangle accordingly so that the origin is truly the top left (so if the stroke surrounding the rectangle was set to 10, adjust the position of the rectangle to 5,5. Enable 9 slice for movie clip so that when you scale the rectangle it doesn't scale or distort the stroke surrounding the rectangle. Drag an instance of the movie clip to the stage and use the free transform tool to scale it to the width of the stage. It should visibly be as wide as the stage. Run the flash file and verify that the width during execution is not as wide as it was in design view. So in a nutshell it seems that when you use the free transform tool, it distorts the origin even though 9 slice is enabled and it shouldn't (I would think). I understand that Flash denotes the center of a stroke to be the starting point and not the edge, which is why I adjusted the origin accordingly while editing the movie clip. What I really need here is pixel perfect positioning for vector based components. I should be able to drag and drop a library movieclip that provides a window with a fancy border around it and scale it to whatever size I need, and place it where I need it to be without any odd positioning problems. Here are some screenshots of the problem ( i.imgur.com 8WU2F.png ) is a shot of my window with 9 slice enabled. You can see that the origin is correct being the top left of the window graphic. ( i.imgur.com ciK8l.png ) is a shot of my window after using free transform to scale it to the width of the stage. It's pretty much perfect in design view ( i.imgur.com QFUiJ.png ) is a shot of the flash application running. Notice that the window is no longer the width of the stage? I don't get it. It makes it very difficult to position because in order to get this to look right while executing, I have to make the window wider than the stage in design mode. Any help is greatly appreciated. I'm sure it's something silly. This is pretty much bread and butter stuff that's been around since the early days of flash.


Networking in Flash games. Socket or Stratus? Working on a prototype for a Flash game that will use networking communication. It would be better to use Peer 2 Peer connection, since it will be a multiplayer game. Has anyone used Stratus or tried to make a multiplayer game via the built in socket? The game will be a turn based game, similar speed to poker but if I could get faster turns that would be great.


Pixel perfect collision against rotated sprite in Flixel I've got a roughly 500x50 graphic of a lockpick that I need to be able to rotate very finely while doing pixel perfect collision detection against the lock object. There's no way to do pixel perfect collision detection in Flixel, so I'm using the Power Tools' FlxCollision class to accomplish this. The problem is that this class only works with rotated sprites if they were loaded with loadRotatedGraphic. ...the problem with that is that it only allows you to rotate to discrete angles. You pass it how many angles you need to be able to rotate to and it, I think, pre prepares all the frames for you. And the reason that's a problem is because I need such fine rotation. I need at least 128 different angle values, but when I do that I get Error 2015 Invalid Bitmap, which I'm assuming is because the resulting 128 frames of a 500x50 lockpick results in a bitmap larger than AS3's limit. I can load the graphic using loadGraphic instead, which I think just calculates the rotated image real time, but then FlxCollision won't notice that it's been rotated. Another problem is that with the pre rotated graphics, you can't rotate about a specific point, and I need the lockpick to rotate around the tip of its handle. ...so how the heck do I do pixel perfect collision against a rotated sprite? I'm trying to mod FlxSprite so that FlxCollision will see the rotated sprites even when they're calculated in real time, and to do this I Ctrl F'd through the class looking for appearances of "angle", the variable that you set to rotate a sprite, but all I can find is some obscure calculation in it's used to compute a frame number, and I can't find a single call to any function that looks like it's doing real time bitmap rotating. So, I was able to solve this problem. All FlxSprites hold the bitmap for their currently visible frame in an internal variable called framePixels. If you load a graphic using loadGraphic, then you can do real time rotation in this case, the draw() function rotate s framePixels "at the last minute", right before rendering it. Meaning the rotated bitmap is not stored, and FlxCollision has no way of seeing it. FlxCollision runs its collision checks against the unrotated bitmap. So this is what need to be done Get the sprite to store its rotated graphic somewhere rather than just sending it to the renderer and then abandoning it. Get FlxCollision to use that stored rotated graphic rather than framePixels. This is summarized in the following diagram. Flixel's default logic is in black, my changes are in red. I applied all of this in a sub class of FlxSprite that I called PerfectCollisionSprite. Here's my code.


Beginner flash game development Start with framework or from scratch? I want to write some simple flash games (as a hobby). I have a lot of programming experience, but no experience with Flash ActionScript. My question is As a beginner, is it a good idea to start with a framework like Flixel, FlashPunk or PushButton or would it be better to write my first games from scratch? Also, if you vote for using a framework, which one would you recommend? What are the differences? And another question What about Flex, would you recommend using it?


OnClick events using Scaleform UI with Cryengine 3.5.4 I've created a UI in Flash, set up an xml file for it and designed a flowgraph to ensure it displays when I launch. However, clicking on the buttons doesn't appear to do anything, despite me writing a click event in AS, linking to it in the xml, and connecting the function to a level change in the flowgraph. XML lt UIElements name "zlogicGUI2" gt lt UIElement name "GuiV2" render lockless "1" gt lt Gfx file "GuiV2.gfx" layer "0" gt lt Constraints gt lt Align mode "dynamic" valign "center" halign "center" scale "0" max "0" gt lt Constraints gt lt Gfx gt lt events gt lt event name "OnClick" ExternalInterface "ButtonClickPressed" desc "" gt lt events gt lt UIElement gt lt UIElements gt ActionScript 3 (created in Flash CC) button 1.addEventListener(MouseEvent.CLICK, fl MouseClickHandler) function fl MouseClickHandler(event MouseEvent) void ExternalInterface("ButtonClickPressed")


How much info can I store in a cookie? Im developing a flash game and I'd like to know how much info can I store in a browser cookie. The game is simple, but it needs to store several variables in order to save all the details of your current progress. The game is only one swf file, no server, no nothing. I need to know how should I use the cookies to achieve this, and if they have the posibility of doing it, of course. (several 200 variables i.e)


How to calculate vector that is perpendicular to the direction of moving in Flash? In flash i have a class that extends movieclip and i am moving it forward, up and down, and rotating it. How can i calculate the vector that is perpendicular to this movieclip?


Can a texture's UV coordinates be animated (scrolled) when part of a SpriteSheet? Alright so my question is about texture manipulation in Flash Stage3D Context3D using AGAL for the shader language. But I'm pretty sure this could be applicable in other situations involving GPU programming. So the goal is, if I wish to have a "scrolling" animation on a certain tile (like a tile of water), can I still have that texture packed along with all the rest of my sprite assets? Or does it have to be alone to avoid bleeding nearby assets? From what I can understand, when the FragmentShader samples the portion of the texture offsetted during a scroll animation, any coordinates outside the desired texture will reveal incorrect nearby textures. Some example to clarify Fluid motion (lava, water waves, acid bubbles) Background motion (cloud, trees, houses) Directional indicators (lines on a conveyor belt, race circuit dash regions) Do I need to use some extra operations to wrap the texture if it tries to sample beyond a certain point? How could those constraints be defined transferred to the FragmentShader? UPDATE To clarify, I would like to scroll only on 1 single tile that would be part of a SpriteSheet TextureAtlas (meaning, mixed with other existing sprites part of a game project). Imagine you had something like this (but better artwork, of course) So a 256 x 256 Texture with a "Wavy Water" tile in the top left corner (128 x 128 in dimensions). How would you write a shader that can scroll through ONLY the water portion to give a sense of motion without running over the adjacent textures (ex faces and cars). How would you handle situations where the Quad is much larger than the texture and could repeat many times as well in combination to being able to scroll it?


How to Export Flash Animation Data I'd love for my partner, the artist, to be able to animate using flash movieclips and timelines. Then I, the programmer, would like to read the raw Flash info and re program it into my engine of choice (which happens to be Torque2D). The data I'd want is the bitmap images that were used in Flash, like the head and body the links between the images, like where the head connects to the body the motion data from the flash animation, like move, rotate (at what speed), shear, etc. for the head or arms or whatever. Is there any way to get this data? Here's what I know so far. There are tools like SWFSheet and Spriteloq that convert the entire flash animation into a frame by frame sprite animation (in a sprite sheet). This would take too much space in my case, so I'd like to avoid that. Re animating on the fly would take much less texture memory. There is a PDF that describes the SWF file format but NOT the individual components like the movieclips. So anyone know of a library I can use, or how I can learn more about the movieclip components and whatnot? (more better tags transform, export, convert)


Changing colour while keeping gradient I'm making a Flash game with ActionScript 3 and I have a square with a gradient applied to it. I am trying to programmatically changing the colour of the square depending on time, for example, some times it is orange, some times it is red, but it must always fade to black at the bottom. The problem is, I'm using ColorTransform (as per here) but it seems to overwrite the gradient and simply fill the square with the solid colour. This isn't what I want. I want the colour that is chosen to fade to black at the bottom, like the original gradient. How can I do this? Is there a way to only change the "hue" of the symbol (IE not filling the entire thing with a solid colour), or will I have to reapply a gradient programmatically, with the desired colours?


Handle Multiple Scene For my game, now I adopt the strategy to create multiple scene. For this I have to ask two question please provide your view for my and other members for improvement. I have created single TextureManager class in which I load all the graphics of the game which is at least 50 MB. My first question is that this much loading of texture will create any problem in game performance,So all the scene in the game have reference to this TextureManager class and they access corresponding texture region using dot operator. if other better strategy for this texture loading then please suggest me. My second question is that my actual game scene uses bound camera and I perform scrolling on that camera but my other scene uses the normal camera. So in this situation what to do? how to use multiple camera for single engine? or how to reset available current camera? My current working platform is andengine. Thank for you support.


Is there a fundamental technical reason for Flash being a more popular game platform than JavaScript? Both Javascript and AS3 are implementations of ECMAScript. Is there a fundamental technical reason for Flash being so much more prevalent as a game publishing platform, when compared to Javascript?


Level Design Char Traveling to and from a Site I'm developing a 2d platformer game where your character can travel to and from sites as he pleases. To travel to and from these sites the character must travel along a path between his current location and his destination (see illustration below). And of course the idea is that you can travel through the level backwards if you wish to return to Site One. But as you probably realize, doing this may provoke some serious problems, and will put limitations on the level design (no cliffs or long drops because then your character wouldn't be able to overcome them on the way back). I've come up with multiple ways to overcome this (such as designing two levels for the same path etc), but I was wondering if anyone else has any creative work arounds for this problem. Any help and advice is appreciated.


Need help starting with a game in Flash AS3 I am kinda new to flash AS3. I have written some stuff and now I now the basics of AS. I want to develop a game in which my character moves. exactly like the way Super Mario moves(the background changes and new obstacles come in the way like and animation with which you can interact by climbing and shooting etc.) There is one big thing that I don't understand is that how to make my background moving and introduce new obstacles when my character moves forward. Currently my scene is static which means the background is the same and obstacles are also stationary. Can some point me to a tutorial or give me an answer that solves my confusion? thanks


Rotate spritesheet graphics in flixel I am using the flash flixel engine, and have a sprite sheet of a spaceship from top down view. The sprite sheet includes a bunch of different states and animation frames. Problem is that I have drawn them all facing upwards (north), and my maths is all done assuming the sprites face to the right (east). In flixel v2.5 is there a way to rotate the sprite graphics without affecting the "angle" property of the FlxSprite that is using the graphics? I was thinking along the lines of a pre process, as I initialise everything. I don't really want to fix all the graphics, or hack into my maths at this point. This also might come in handy later.


What is the standard way of delivering HTML5 games to portals and such? Let me explain what I mean by "standard way of delivering"... Think about Flash games sites. Flash games can be delivered as a single file, either hosted by the site, or, I guess, provided by someone else. HTML5 games, on the other hand, don't have something so standard. Usually, they have their own page, and portals just link to that page. I think that it greatly hinders the purpose of that portal, because, well, you want people to stay on your site and look for other games. Now, I think that a some kind of iframe way of delivering games would help solve this problem greatly. I saw some games doing that, and they were often included on tutorial sites to show a live example, which is obviously a great thing. So, is there a standard at all? Any suggestions? Can you create a game that just preloads itself in an iframe (I heard something about a "single document" or something)?


How can I develop Flash games without expensive software? I've been playing with writing flash games in my spare time, but up to this point, I've just been using a trial version of Adobe Flash Professional. I'm aware of FlashDevelop, but their documentation is basically non existent when it comes to the workflow of developing purely with FlashDevelop. Does anyone know of any good tutorials for developing Flash games purely with FlashDevelop? Alternatively, does anyone have any other free cheap software recommendations to use in place of Flash Professional?


What do I need to change in Box2D to work in pixels? Box2D seems to be set up in such a way that you cannot work in pixels (i.e. physics scale 1). It produces very strange results as it hits maximum speed limits at low speeds and looks very strange. It only seems to work well at a physics scale of around 15 or 30. For me, working in pixels is the logical way to handle physics and movement in a game, as you are already using that measurement for lots of other things. I don't want to have postionX 30 all over my code, so what variables do I need to hack in the box2d source in order to make physics scale 1 work as if it was physics scale 30? I'm using the latest version from box2dflash.org.


What type of dashboard should I create to understand how my game is performing? This is a two part question. Let's say I release a new Flash game to the web. Once players start playing I want to understand how it is performing What common performance criteria do people track? (e.g. viral coefficient, play length, returning players.) How should I go about measuring and monitoring these attributes? Are there any off the shelf tools?


Does swf provide better compress rate than zlib for png image? Somebody told me that when a png image is stored in swf, it's separated to several layer, hence the alpha channel can be compressed better. Is it true? Or, once png image is imported into a swf, it's format is changed, e.g converted into bitmap data, and than compressed by swf's compress algorithm. That's, it is not in png format anymore. I don't know how swf packing its resource, please tell me if you know.


How can I find out what URL my game is executing from in Flash? I want to upload my game to Kongregate and other sites, but on Kongregate I want to invoke one function and other sites I want run another function. How to check in AS3 where (I want to get host like www.kongregate.com or www.games.com etc) my game is? Or maybe you know other, better way to make this?


How to save the 3D surface to bitmap in Flash 11 Stage3D I have been using Stage3D to create some 3D app in Flash. One of the items on my list is the ability to take a screen shot. Flash makes it easy to grab the stage content, but I can't find a way to grab the stage3D content. In DX I just used D3DXSaveSurfaceToFile. Anyone know of a way to do it in as3 and flash 11?


In Box2dFlash my b2body gets detached from my Sprite after I use setXForm() I have a scenario where I have red coin in a Carrom board game which should be moved outside of the visible window when it is pocketed, also if any coin either white or black is not pocketed in the next shot, the red coin should be replaced in the center of the board. Now my problem is WHEN I apply the setXForm() method to move the b2body of the red coin outside of the visible area of my flash window.It moves,there is no problem in moving the body,but WHEN i replace the b2body and sprite after the event of no coin falling , the b2body is detached and works as a separate entity having no connection with the sprite of the red coin. I'm not getting a clue as to what is happening, that is why I thought I'd try posting this here.


Box2D Bicycle Wheels Motor Problem Flash 2.1a I have made a bicycle with Box2D using several polygons for the frame at different angles connected using weld joints, and I have revolute joints on the wheels with a motor. I have made some basic terrain (straight ground and a small ramp) and added keyboard input to control the bicycle with torque to balance it. All of this is done in with Box2D's Debug Draw. When the bicycle is on its back wheel but diagonally forward (kinda like this position ) the motors just cause it go spinning backwards over when in reality it should either stay on its back wheel or go down onto both wheels. Here's my code the revolute joints Front Wheel Joint var frontWheelJointDef b2RevoluteJointDef new b2RevoluteJointDef() frontWheelJointDef.Initialize(frontWheelBody, secondFrameBody, frontWheelBody.GetWorldCenter()) frontWheelJointDef.enableMotor true frontWheelJointDef.maxMotorTorque 10000 frontWheelJoint world.CreateJoint(frontWheelJointDef) as b2RevoluteJoint Rear Wheel Joint var rearWheelJointDef b2RevoluteJointDef new b2RevoluteJointDef() rearWheelJointDef.Initialize(rearWheelBody, firstFrameBody, rearWheelBody.GetWorldCenter()) rearWheelJointDef.enableMotor true rearWheelJointDef.maxMotorTorque 10000 rearWheelJoint world.CreateJoint(rearWheelJointDef) as b2RevoluteJoint And here's the relevant part of my update function up and down control wheels motor if (up) motorSpeed 0.5 if (down) motorSpeed 0.5 left and right control cart torque if (left) middleCentreFrameBody.ApplyTorque( 3) gearBody.ApplyTorque( 3) firstFrameBody.ApplyTorque( 3) secondFrameBody.ApplyTorque( 3) rearWheelToChainBody.ApplyTorque( 3) chainToFrontFrameBody.ApplyTorque( 3) topMiddleFrameBody.ApplyTorque( 3) if (right) middleCentreFrameBody.ApplyTorque( 3) gearBody.ApplyTorque( 3) firstFrameBody.ApplyTorque( 3) secondFrameBody.ApplyTorque( 3) rearWheelToChainBody.ApplyTorque( 3) chainToFrontFrameBody.ApplyTorque( 3) topMiddleFrameBody.ApplyTorque( 3) motor friction motorSpeed 0.99 motor max speed if (motorSpeed gt 100) motorSpeed 100 rearWheelJoint.SetMotorSpeed(motorSpeed) frontWheelJoint.SetMotorSpeed(motorSpeed) Any ideas what might be causing this? Thanks


Flash AS3 sidescrolling tiles optimization I'm trying to make a sidescrolling game in Flash that will run on a low performance laptop. While studying the subject from Tonypa I saw that he builds a Bitmap by making copys of the BitmapData of each tile from the Tile Sheet and placing it on the bigger Bitmat with the size of the screen. But when I came to think on how to scroll my map I ran into some optimization doubts. I came up with two choices Create a MovieClip, place a Bitmap instance for each tile that is shown on the screen 1 row in it, then move them all. Then when the tile ran off the screen I would move it to end of the MovieClip and replace their BitmapData for the next row in my map. Use a Bitmap with copys of each tile in it (as shown in Tonypa's tutorial) but 1 extra row, move the whole Bitmap, and when it comes the time to replace rows, redraw the whole Bitmap and move it back to the origin position. The first idea is how a co worker of mine suggested, the second one is my own, but none of us has enough technical knowledge to be sure on a technique that would be optimal in performance, can anyone help?


How to Export Flash Animation Data I'd love for my partner, the artist, to be able to animate using flash movieclips and timelines. Then I, the programmer, would like to read the raw Flash info and re program it into my engine of choice (which happens to be Torque2D). The data I'd want is the bitmap images that were used in Flash, like the head and body the links between the images, like where the head connects to the body the motion data from the flash animation, like move, rotate (at what speed), shear, etc. for the head or arms or whatever. Is there any way to get this data? Here's what I know so far. There are tools like SWFSheet and Spriteloq that convert the entire flash animation into a frame by frame sprite animation (in a sprite sheet). This would take too much space in my case, so I'd like to avoid that. Re animating on the fly would take much less texture memory. There is a PDF that describes the SWF file format but NOT the individual components like the movieclips. So anyone know of a library I can use, or how I can learn more about the movieclip components and whatnot? (more better tags transform, export, convert)


How can I manage an animated UI from ActionScript? I'm trying to code a game of Poker in AS3, using Flash Professional CS5 (although I try to keep as little code as possible in the .fla). When a player bets, for example, I need to be able to show an animation of some chips sliding into the center of the screen. After that happens, the AI decides what to do, and another animation of their chips occurs. Then a menu pops up so the player can choose their own next action. And so on. I started writing a UIBet interface with bet(amount) and raise(amount) methods and so on, that you would implement with a class extending MovieClip and fill in the methods with gotoAndPlays to various animations. But if I just have code that calls these graphics object like so playerUIBet.bet() aiUIBet.bet() menu.prompt() Then, if I understand Flash correctly, what'll happen is that the code will finish executing, and then all of those animations will happen simultaneously. How can I get these animations to happen sequentially? What if I want to insert pauses between them? Some kind of solution like this? What's the best way to do this in AS3?


Can I make a Flash version of an actual game? Possible Duplicate Legal issues for a ldquo fangame rdquo of a commercial franchise? For example, some of you may have seen Portal The Flash Version. I was wondering what the legal background on this kind of stuff is, for example what legal things I'm supposed to say, give credit to the original's creators and all. Obviously, I'm presuming that I'm not allowed to make money off of it, but I just want to know what restrictions there are of making a free Flash version. For example, would I be allowed to make a Yu Gi Oh! game based off the Power Of Chaos series? And if so, would I be allowed to use the Yu Gi Oh name or would I have to call it something else?


How does MMO flash games works? I want to know how does MMO flash games work, for example Dofus and Club Penguin. I want to know if by ony using Adobe Flash and ActionScript you can do MMO games, or if there is other way to work with ActionScript and Flash beyond Adobe Flash.


What implications does JIT (javascript canvas) vs. AOT (Flash) have in terms of browser based game performance? In my experience, even till this day, I still see more of a visual lag in entity movement animation in JavaScript (Canvas) based games than I do in Flash based games. Why is this what exactly is the descrepancy at the most basic level between an JIT vs AOT compiler in the specific scenario of JavaScript vs. Flash.


Change the tilemap shown on stage in Flixel I am building a simple platformer using Flixel, beginning with the source code from Flixel creator's EZPlatformer . I would like to adjust the level's tilemap when the player sprite enters overlaps with a sprite representing a door. I use Flixel's built in function to track if the player overlaps the door sprite. exits is a class level variable public var exits FlxGroup I call this function in the Update event to check for overlap FlxG.overlap(exits,player,UpdateScreen) I successfully catch when they overlap, however when I try and load the new tilemap, the old one continues to show. I use this function to attempt to update the tilemap on the screen public function ChangeScreen() void load the screen and locations of sprites(e.g. player, exits) based on current screen switch(currentScreen) case 1 load tilemap level new FlxTilemap() level.loadMap(FlxTilemap.arrayToCSV(data1,40),FlxTilemap.ImgAuto,0,0,FlxTilemap.AUTO) add(level) break case 2 load new tilemap level new FlxTilemap() level.loadMap(FlxTilemap.arrayToCSV(data2,40),FlxTilemap.ImgAuto,0,0,FlxTilemap.AUTO) add(level) break I thought that I would need to first call remove on level to take it off the stage, and then call add on it, however, when I do that, the tilemap does not show up at all. What is the correct way to do this?


Rotation of objects from different axes in Flash AS3 In my game, I have made 4 lines with different colors to form a square but the colored lines are different objects. I want to rotate the lines in a way that the lines will still form a square. Eg But I'm only able to rotate them on the central axis, so, it forms a cross The code for leftPressed is if(leftPressed) black.rotation 90 blue.rotation 90 yellow.rotation 90 red.rotation 90 So, I need to know how to rotate objects on different axes.


How to check the device type using Adobe AIR for iOS How do I check what kind of device the user is running my Adobe AIR app on? Example if(device ipad3) stagestuff.width 300


Can one develop an application with Bluetooth support on iOS using Flash Builder 4.5? I have heard about Flash Builder 4.5.1. As I have understood, one can make an application using Flex with Flash Builder 4.5.1 and also export the release build for iOS, Android and Blackberry. Is it possible to include Bluetooth functionality in an application this way?


Is there a tool to import a sprite sheet into Flash as a frame based animation? I'm looking for a tool that can help create a Flash based animation given a spritesheet basically the reverse of Spriteloq. I'd like to take a sheet like the one below, import it into Flash, and then use Spriteloq (or a similar tool) to re export as an optimized sheet that is compatible with the game engine I'd like to use instead of creating software that can read the specific sheet.


Create and use a Button class on AS3.0 I am currently working on a game and it is all going well. On the shop screen there are several buttons that affect the player's stats for when the player restarts the game. The button's names (with a text on the left), however, are rather cryptic and it's hard to figure out what they do unless you test or something. So the solution I came up with, is to create an InfoBox with an InfoText inside so that when the cursor is over the button it appears with the description, cost and etc. This I managed to do too however, the way I was about to do it would mean that I had to create 3 event listeners per button (CLICK, ROLL OVER, ROLL OUT) and, obviously, 3 functions connected to each event listener. Now, I don't mind much about having 1 event listener per button, for the click, but since the other events are just to make a box appear and disappear as well as display some text, I thought it was way too much of a mess of code. What I tried to do I created a new class called InfoBoxButton, and this is the class' code package import flash.display.SimpleButton import flash.display.MovieClip import flash.ui.Mouse import flash.events.MouseEvent public class InfoBoxButton extends SimpleButton public var description String public var infoBox InfoBox public function InfoBoxButton(description) this.addEventListener( MouseEvent.ROLL OVER, displayInfoText, false, 0, true) this.addEventListener( MouseEvent.ROLL OUT, hideInfoText, false, 0, true) private function displayInfoText() infoBox.infoText.text description infoBox.visible true private function hideInfoText() infoBox.infoText.text "" infoBox.visible false But now I don't have an idea how to associate it with the button, I have tried this public var SoonButton InfoBoxButton new InfoBoxButton("This is merely a test") The SoonButton is a button I made on the shopscreen, SoonButton is it's instance name, but I can't think of a way of associating one button to the other... I have been fiddling with the code for like 3 hours yesterday and no luck... can anyone give me some pointers on how I should go about doing it? EDIT I tried to trace the SoonButton after it is created like this public var SoonButton InfoBoxButton new InfoBoxButton("This is merely a test") trace(SoonButton, "whut?") and I got an error saying 1120 Access of undefined property SoonButton. if I separeted the first line a bit to public var SoonButton InfoBoxButton SoonButton new InfoBoxButton("This is merely a test") trace(SoonButton, "whut?") I would get the same error but two times, for each SoonButton... so clearly it must be the InfoBoxButton that isn't being created... what am I missing?


Mouse follow precision in flash I am trying to implement a simple movement for one of game objects in flash AS3. I am using mouseX, mouseY for my object to follow the mouse pointer. It works fine but the problem is the precision of the movement. If I move my mouse a little too fast then my game object stops following the mouse which means I have to re focus the mouse pointer back on the game object to make it move again. Here is the code that does this. private function FootyMouseMove(shortestFooty FootBall) void shortestFooty.x stage.mouseX shortestFooty.y stage.mouseY if (shortestFooty.x gt stage.stageWidth shortestFooty.width) shortestFooty.x stage.stageWidth shortestFooty.width if (shortestFooty.x lt shortestFooty.width) shortestFooty.x shortestFooty.width My question is, would it be possible to make the movement of my game object much more smoother and make sure that the game object is always following the mouse no matter how fast I move my mouse pointer?


Are there any sample projects for Flashpunk? Are there any open source games using Flashpunk? The other big flash game library Flixel has a number of example projects, are there any equivalents for Flashpunk?


As3 Character movement in diffrent directions with labels? I hope you can help me with the following problem I made a character in Illustrator. The player sees the character from above. When you press the left arrow key character.gotoAndStop('left') the character moves to the left. (Same goes for the right direction with label 'right' When you release the left or right arrow key (upKey) the character goes back to the label 'up'. I'm trying to accomplish the following When the character is facing down ('down'). the left key should go to the ("facingdownleft") label and on release back to the label ('down'). (Same for the right direction) stage.addEventListener(KeyboardEvent.KEY DOWN, downKey) function downKey(event KeyboardEvent) if(event.keyCode 39) isRight true character.gotoAndStop('right') if(event.keyCode 37) isLeft true character.gotoAndStop('left') if(event.keyCode 38) isUp true character.gotoAndStop('up') if(event.keyCode 40) isDown true facingdown true character.gotoAndPlay('down') if( facingdown true amp amp isLeft true) character.gotoAndPlay('downleft') stage.addEventListener(KeyboardEvent.KEY UP, upKey) function upKey(event KeyboardEvent) if(event.keyCode 39) isRight false character.gotoAndPlay('up') if(event.keyCode 37) isLeft false character.gotoAndPlay('up') if(event.keyCode 38) isUp false if(event.keyCode 40) isDown false I made a boolean for facingdown and an if statement for downleft if( facingdown true amp amp isLeft true) character.gotoAndPlay('downleft') But before I make numerous amounts of if statements again, I would like to know if I'm on the right track and if you can help me accomplish this? Thank you so much in advance and feel free to ask questions.


Should all stats only exist on MySQL database for my Flash browser RPG? I'm creating a browser RPG in Flash which will have some multiplayer elements and in app purchases so security is a high concern. Would it be better to have all game stats like health and such exist only in the MySQL database and retrieve them every time I need them? The game is turn based, but that would still require very frequent connections to the database. I could use local copies to cut down on the number of connections, but I imagine that would make it much easier for people to cheat.


Better way than url encoded query stings to pass data from PHP to Flash? For the turn based browser Flash RPG I'm working on, I'm using url encoded query stings to pass data from PHP to Flash. Basically, Flash posts a request to PHP, then PHP pulls some data from a MySQL database, does some calculations and echos something like "health 100 amp mana 50 amp strength 10" which Flash reads. It seems to work fairly well, but I'm wondering if there is a better way to do it? As I go along, the number of character stats is increasing, and after inventory slots, it will probably be around 100 variables. All that only needs to be pulled from the MySQL database through PHP once at the beginning though, with much smaller queries during gameplay.


Stencyl or flash limitation? I have found that Stencyl doesn't seem to be very good at handling very many actors in a game. I had been trying to implement some basic AI at the moment all the behaviours were wander (pick a random point and move directly to it) and wrap around screen (if it goes off the top of the screen it appears at the bottom). Even with these simple behaviours and calculations the frame rate dropped dramatically when there were more then 50 actors on screen 10 actors 60fps 50 actors 30 50fps 75 actors 30fps 100 actors 15 20fps 200 actors 8 10fps I had planned on having a maximum of around 200 actors but I see that's no longer an option and implementing a more complicated AI system with flocking behaviour, looking at creating a game in a similar vein to flOw. I understand that a game is perfectly playable at 30fps but this is a super simple test with ultra simple graphics, no animations and no sounds is child's play in terms of calculations to be made. Is this a limitation with Stencyl or is it flash? Should I simply scale the scope of the game down or is there a better game engine that exports to .swf that I should look into?


Use of FlxG.camera.follow to follow a character vertically I am developing a prototype for a game in Flixel in which a character floats upward continually to traverse the level. I would like to have a "tall" layout for levels and set the FlxG.camera to follow the character as he floats upward. My issue is in understanding the proper use of FlxG.camera. I have my game constructor coded as follows package import flash.display.Sprite import org.flixel. SWF(width "640",height "480",backgroundColor " 000000") public class MyGame extends FlxGame public function MyGame() super(320,240,PlayState,2) forceDebugger true In the override of create() in the PlayState.as file I attempt to set the camera to follow the player as follows public var TheClimber BalloonHero override public function create() void set background color FlxG.bgColor FlxG.BLUE Set data for player TheClimber new BalloonHero(FlxG.width 2 5,480) Add camera and set it to follow The Climber which will automatically set the boundaries of the world. FlxG.camera.setBounds(0,1280,640,1280,true) FlxG.camera.follow(TheClimber,FlxCamera.STYLE PLATFORMER) add player to the game add(TheClimber) I assumed this would set the camera bounds to twice the height of the SWF background(i.e. the FlxG height) and then scroll the background along with the specified FlxObject(TheClimber in this case) until it had reached the height of the game. However, I must be going about it incorrectly because when the zoom is 2 and the game height 720 the camera starts at the top of the screen with the player character not visible at the bottom of the game height. Is there a way to start with the camera game focused on the bottom of the game object(FlxG.height) ? Or am I going about this the wrong way and have other issues with the way I am using the camera? Thanks in advance.


How do I make a custom tileset for Flixel that supports autotiling? I've been Googling this problem for a while now. I'm currently porting one of my Java games to Flixel, and I want to use the original 16x16 tileset I made. In the original game I implemented my own autotiling system, but I would prefer to use Flixel's autotiling system. However, I cannot determine how to lay out my tileset, or how to tell Flixel to use it. I have two different types of tiles, and I want both types to autotile to connect with tiles of the same type but not tiles of the other type, if possible.


How to add a ramp in a flash game? I am a huge novice and this isn't really a programming question, but here I go, say I want to make a game that involves rolling up a ramp like this one to move upwards, similar to how it would work in an old Sonic the Hedgehog game or something, how would I go about doing that, where could I find a good recourse to learn this?


Making a game preloader (Flash) Possible Duplicate How do you create a single internal pre loader for a Flash game written using Flex? Hi guys, Im trying to make a preloader in a Flash game. Thing is, I need some advices on this since I never made one, I have the game almost complete, but when, i.e, I upload the game to a website I get a white screen for a few seconds, and then I see the game. Is there a simple way, maybe using an a API or something like that, to make a preloader screen? Im using Flash Builder fyi. Thx!


Camera and enemy behaviour in AS3 platformer beginner in AS3 here. I am working on a platformer game based on the code of a provided example exercise. I have the following problem I have an enemy who shoots bullets. The enemy is the parent, and the bullet are the child. When I move to the next scene (level), the bullets are still there, but invisible, even using the removeEventListener to shut down the bullet hit check. Here is the code of the child "disparoEnemigo mov" addEventListener(Event.ENTER FRAME, fl MoveEnemyShot) function fl MoveEnemyShot(event Event) try if (enemy shot.y lt 300) if (enemy shot.hitTestObject(Object(this.parent).mario)) variablesGlobales.variables().vidas 1 Object(root).texto.text variablesGlobales.variables().vidas.toString() trace("vidas " variablesGlobales.variables().vidas) if (variablesGlobales.variables().vidas lt 1) MovieClip(this.parent).gotoAndStop(2) this.parent.removeChild(this) removeEventListener(Event.ENTER FRAME, fl MoveEnemyShot) else enemy shot.y 3 else trace("LLEGADA") removeEventListener(Event.ENTER FRAME, fl MoveEnemyShot) this.parent.removeChild(this) catch (error Error) removeEventListener(Event.ENTER FRAME, fl MoveEnemyShot) import flash.events.Event import flash.media.SoundMixer addEventListener(Event.ENTER FRAME, fl EnterFrameHandler) function fl EnterFrameHandler(event Event) void try if (this.hitTestObject(Object(this.parent).mario)) SoundMixer.stopAll() var sound gameOver new gameOver() sound.play() Object(this.parent).mario.y 1000 Object(this.parent).mario.x 15 trace("Mario dies") var cartel StageLose new StageLose() stage.addChild(cartel) cartel.x 85 Object(this.parent).mario.y 1000 catch(error Error) removeEventListener (Event.ENTER FRAME, fl EnterFrameHandler) And this is the code of the parent, "enemigo mov" var leftPressed Boolean true var rightPressed Boolean false stage.addEventListener(Event.ENTER FRAME, fl MoveEnemy) function fl MoveEnemy(event Event) try if (leftPressed) enemy1.x 0 if (enemy1.x lt 120) leftPressed false rightPressed true else if (rightPressed) enemy1.x 1 if (enemy1.x gt 120) rightPressed false leftPressed true var number Number Math.random() if (number lt 0.05) amp amp variablesGlobales.variables().coleccionEnemigos.indexOf(this) ! 1) trace("creation") var disparo disparoEnemigo mov new disparoEnemigo mov() this.parent.addChild(disparo) disparo.x enemy1.x 115 disparo.y enemy1.y 115 disparo.z 50 trace(disparo.x " " disparo.y) catch(error Error) removeEventListener(Event.ENTER FRAME, fl MoveEnemy) In both codes, "mario" is the player character. What I need to do is to stop the bullet creation of ""disparoEnemigo mov" when we move to the next scene. Shouldn't the "removeEventListener(Event.ENTER FRAME, fl MoveEnemy)" line stop the bullets to check if there is any collision with the player? Any help or resource will be helpful. Thank you so much!


Flash server, protocol protection I am making a flash game that will interact heavily with the server. For quite some time already I am using 'request hashing' technique to make sure that request data hasn't been tampered with. This works pretty well. However, in this game I'd like to go a little bit further and completely hide the protocol from the observer (right now it's plain JSON). I imagine that I could zip and encrypt data (using one of symmetric algorithms). That would make it pretty unreadable by human, right (also smaller)? And SWF encryption obfuscation should protect the encryption key (it is being done anyway). As a side benefit that will also protect dynamically loaded resources from directly saving them to disk (or copying from the cache). Questions are there tools that allow you to simply dump the SWF with all its content, received and decrypted? If yes, this will render 'the side benefit' invalid. do you think it's worth it to burn all that CPU power? To support my point, I will say that I like to inspect data being exchanged between client and server. And occasionally I find a bug or two which I can use to my benefit. But then there was a game that was sending and receiving some binary data. Being a lazy attacker, I decided not to analyze further. Otherwise, who knows what I could find ) Comments, ideas, criticism, suggestions? )


Make object follow mouse angle? what I'm trying to do is make the paddle follow the mouse position(red dot). I know how to rotate the paddle relatively to the center of the screen, but I'm not sure how to determinate the coordinates. thanks.


Rotation of objects from different axes in Flash AS3 In my game, I have made 4 lines with different colors to form a square but the colored lines are different objects. I want to rotate the lines in a way that the lines will still form a square. Eg But I'm only able to rotate them on the central axis, so, it forms a cross The code for leftPressed is if(leftPressed) black.rotation 90 blue.rotation 90 yellow.rotation 90 red.rotation 90 So, I need to know how to rotate objects on different axes.


Need help in determing what, if any, tools can be used to create a free Flash game Yes I proudly and sadly declare that I am a complete nincompoop when it comes to Flash, and I have been fishing around the big wide web for information. The reason for this is that I have been contracted to create a game(s) for a website the usual flash based games caveat. Please I do not mean things like by those gaming generator websites, I mean small yet professional games but the caveat, as always, is that impossible dream it needs to be done all for free. The budget...well imagine it as not there. Annoyingly is that I am a game designer yes, but with a ridiculously tight deadline I haven't got much time to re learn (ah the heady days of programming at uni) everything by the end of March, so I'd like to ask some people who know their stuff rather than keep looking at a gazillion different things. This is my understanding with the flash sdk you can create a game, albeit you need to be pretty programming savvy. FlashDevelop helps there yet I am not entirely sure how. Yet even FD says to use Flash for the animation graphics. Yes its undeniably powerful but as I said there is the unattainable demand of no money. The million dollar question what, if any, tools can I use to create a free flash game?


How does MMO flash games works? I want to know how does MMO flash games work, for example Dofus and Club Penguin. I want to know if by ony using Adobe Flash and ActionScript you can do MMO games, or if there is other way to work with ActionScript and Flash beyond Adobe Flash.


How to stretch Movie Clip according to user's touch coordinates? I have code like this touchX e.stageX touchY e.stageY I also have a player movieclip that I'm trying to make shoot lasers. So I got the MovieClip to appear and rotate according to the player's location and the user's touchX and touchY. How do I make the laser MovieClip stretch according to the distance between the player's coordinates and the touchX and touchY coordinates?


AS3 Increase tint as health decreases I'm working on a game where enemies continually spawn with more and more health based on how long you've been playing. As the enemies take damage, I'd like their sprite to get darker and darker, until they die. Here's what I've got so far enemy array i .health damage healthcolor.setTint(0x000000, enemy array i .health 0.1) enemy array i .transform.colorTransform healthcolor Predictably, this is making enemies get less black as they take damage. What I need is to convert the decreasing enemies' health into an increasing number between 0 and 1. I have absolutely no idea where to begin. It's entirely possible I have tunnel vision, but I'm hoping someone here might have an idea for how to accomplish this. Thanks for your time.


AS3 Starling in Fullscreen Mode cuts off most of the screen I have a mixed mode (classic Flash Renderer Starling) AIR AS3 project that I'm switching to fullscreen with stage.align StageAlign.TOP LEFT stage.scaleMode StageScaleMode.SHOW ALL Swtich to Fullscreen with stage.displayState StageDisplayState.FULL SCREEN INTERACTIVE When I do this, I have a callback on the Event.RESIZE event to resize my Starling instance to fullscreen private function resizeStarling(e Event) void var size Point new Point() if(this.stage.displayState StageDisplayState.FULL SCREEN INTERACTIVE) size.x Capabilities.screenResolutionX size.y Capabilities.screenResolutionY else size.x WIDTH size.y HEIGHT RectangleUtil.fit( new Rectangle(0, 0, stage.stageWidth, stage.stageHeight), new Rectangle(0, 0, size.x, size.y), ScaleMode.SHOW ALL, false, Starling.current.viewPort) The set to FULL SCREEN INTERACTIVE turns all my normal flash Stage object based UI and visuals to full screen mode. However, while the Starling graphics are correctly upscaled, they only occupy the upper left corner of the screen, and the remaining three quadrants are cut off. I haven't validated yet, but I suspect that the segment being displayed is the same dimensions as the original windowed stage size. Any ideas on what I'm forgetting to do to achieve fullscreen Starling displays that are actually fullscreen? This is on OSX.


Fixed timestep with interpolation in AS3 I'm trying to implement Glenn Fiedler's popular fixed timestep system as documented here http gafferongames.com game physics fix your timestep In Flash. I'm fairly sure that I've got it set up correctly, along with state interpolation. The result is that if my character is supposed to move at 6 pixels per frame, 35 frames per second 210 pixels a second, it does exactly that, even if the framerate climbs or falls. The problem is it looks awful. The movement is very stuttery and just doesn't look good. I find that the amount of time in between ENTER FRAME events, which I'm adding on to my accumulator, averages out to 28.5ms (1000 35) just as it should, but individual frame times vary wildly, sometimes an ENTER FRAME event will come 16ms after the last, sometimes 42ms. This means that at each graphical redraw the character graphic moves by a different amount, because a different amount of time has passed since the last draw. In theory it should look smooth, but it doesn't at all. In contrast, if I just use the ultra simple system of moving the character 6px every frame, it looks completely smooth, even with these large variances in frame times. How can this be possible? I'm using getTimer() to measure these time differences, are they even reliable?


How to achieve smooth sprite movement with a scaled up canvas? I'm developing a simple 2d platformer using haxe amp openfl (currently targeting flash). To achieve the old school pixelation effect I draw 16x16 sprites over a 4x scaled up canvas. With this approach character movement is very jerky since it seems to consist of a sequence of 4px jumps. So my question is how to be smooth amp old school at the same time? Thank you for your time.


Is Scaleform Flash used in console games for non UI, game elements? I work for Konami as a Flash developer, and got sent some code for a puzzle mini game from a new, yet to be released Silent Hill game for PS3 Xbox 360. It was a windows executable, but it was made in Flash, and I saw some GFX (Scaleform) libraries in the source. I was very surprised by this, as I thought the extent of Flash's reach into console games was simply for UI. Granted, this was an essentially 2d, UI centric puzzle minigame, but nonetheless, this was a gameplay useage of Flash Scaleform in a "next gen" console title. My question is, how prevalent is this? I really want to get into console programming, and if this is something that appears elsewhere, maybe I can apply my Flash Actionscript skills to getting a job working on console titles. Anyone have any thoughts or experiences with this? Thanks!


Building a Flash Platformer I am basically making a game where the whole game is run in the onEnterFrame method. This is causing a delay in my code that makes debugging and testing difficult. Should programming an entire platformer in this method be efficient enough for me to run hundreds of lines of code? Also, do variables in flash get updated immediately? Are there just lots of threads listening at the same time? Here is the code... stage.addEventListener(Event.ENTER FRAME, onEnter) function onEnter(e Event) void Jumping if (Yoshi.y gt groundBaseLevel) dy 0 canJump true onGround true This line is not updated in time if (Key.isDown(Key.UP) amp amp canJump) dy 10 canJump false onGround false This line is not updated in time if(!onGround) dy gravity Yoshi.y dy limit screen boundaries character movement if (! Yoshi.hitTestObject(Platform)) no collision detected if (Key.isDown(Key.RIGHT)) speed 4 speed friction Yoshi.x Yoshi.x movementIncrement speed Yoshi.scaleX 1 Yoshi.gotoAndStop('Walking') else if (Key.isDown(Key.LEFT)) speed 4 speed friction Yoshi.x Yoshi.x movementIncrement speed Yoshi.scaleX 1 Yoshi.gotoAndStop('Walking') else speed friction Yoshi.x Yoshi.x speed Yoshi.gotoAndStop('Still') else bounce back collision detected if(Yoshi.hitTestPoint(Platform.x Platform.width 2, Platform.y Platform.height 2, false)) trace('collision left') Yoshi.x 20 if(Yoshi.hitTestPoint(Platform.x, Platform.y Platform.height 2, false)) trace('collision top') onGround true This update is not happening in time speed 0


How to calculate vector that is perpendicular to the direction of moving in Flash? In flash i have a class that extends movieclip and i am moving it forward, up and down, and rotating it. How can i calculate the vector that is perpendicular to this movieclip?


How public should you make your betas? I am approaching the point where I can release a playable beta of a very complex game I am making in Flash AS3. It is fairly involved and the deepest game Ive made so far. I plan on hosting it on my personal site but I want to try and get good feedback on the game elements so far. Is it worth it to expose this beta to as many places as possible before the release? What are good communities to do this? Please note this will be freeware in its final release


Shared Object Not saving the level Progress I am making a flash game in which i have a variable levelState that describes the current level in which user has entered I am using SharedObject to save the progress but it does not do so first i declred a clas level variable private var levelState Number 1 private var mySaveData SharedObject SharedObject.getLocal("levelSave") in the Main function i am checking if it is a first run of the game like below if (mySaveData.data.levelsComplete null) mySaveData.data.levelsComplete 1 and in a function where the winning condition is checked so that levelState could be increased i am usin this sharedobject to hold the value of levelState if ( winniing condition ) levelState mySaveData.data.levelsComplete levelState mySaveData.flush() setNewLevel(levelState) but when i play the game clear a level and again run the game it does not start from that level it starts from beginning.


Game Server Framework Engine that supports AMF? I am looking for a server technology that supports AMF (because I plan on using an as3 flash front end). I would like to develop game logic simulations that run on the server. Small number of users and logic at first, but that will grow. I might use this for some simple turn based simple tests, but I am hoping this will also support some tougher real time (RTS) or even MMO style games and simulations. So far I have been looking at (in order of what I think is most promising so far) WebORB Looks the most promising so far, appears to be well supported and developed, lots of features, yet sells itself as easy. Looks like they have a community open source free version Cubeia Firebase Looks really good, only thing that worries me is their statement that it does not work well for real time style games, but is ideal for turn based. It might be ok for now, but what if I need to scale the game up? Open Source Free BlazeDS Looks promising, supported by adobe, I should be able to develop game logic in the BlazeDS server and has amf support. Open Source Free Red5 No release since 2010, some activity though. (has amf) Open Source Free however have not been able to locate any good 'game' examples tutorials. FlashMOG looks interesting, but I am not sure if it is robust enough to act as an actual game server with continuously running logic. No release since 2010, Uses PHP as a socket server. Open Source Free RedDwarf (used to be SGS Project Darkstar) no release since 2010, is this active? Has AS3 library, but it is out of date too? Open Source Free Cirrus, Wowza, FMS these are more of a media server? SmartFox, Electroserver these are nice, but are not open source free. I believe they have limited connection versions available and while I am hoping to scale my project above those limitations I do not expect to be drawing an income to pay for the licenses at that point LCDS (live cycle data services) similar to blazeDS, not free Any other options or clarifications??


Zelda like multiplayer combat I have in mind coding a multiplayer game with a similar combat to zelda's. Since i will use flash, i'm limited to use TCP. My question is, is this goal possible? It's not as fast paced as some shooters, but i'm not sure if it's too much for tcp? tl dr TCP for zelda like multiplayer combat style?


How to create UI for 2D games? I'm working on a game using Haxe Flambe but I'm having a hard time making the UI part of it (main screen, level selection, etc). And I began to think... is there another way? I would love to have something like Flash, I mean, WYSIWYG like to make the UI. Just because I don't want to spend my time coding the screens until they look like what's on my mind. So the questions are How do people work? Is there something visual to make the UI for games that'll be programmed on Haxe (it doesn't matter if using OpenFL, Flambe or other)?


FlashPunk Flashdevelop How to use sponsor provided preloader I have developed a flash game using FlashPunk (on FlashDevelop). And now that I am trying to add a sponsor preloader and splashscreen to my game, I realize the flashpunk forums are down, and have been for over a week now ( Speak of bad timing. I imagine some of you here do use FlashPunk. How have you managed to add such sponsor stuff to your game? I haven't had to deal with swf and fla at all until now. The sponsor's preloader is an actual loading bar, at the end of which it also plays an animated splash screen. Any help would be much appreciated. Thanks!


How should I do my collision response? I'm making a small lockpicking simulator. Obviously I'll need the pick to not pass through the lock, and I'll need the pins to move when you tap or push them with the pick. Here's what I have so far, just to give you an idea. http megaswf.com serve 2433982 As you can see, the collision detection is pixel perfect. I've looked into a couple of different ways of doing collision response, but it seems like such a vast and complicated field. Any time I come up with a possible solution I start noticing flaws like what would happen if more than two objects collided and so on. I've looked into physics engines like Box2D, but it seems like such overkill considering the, I think, simple nature of the game I'm trying to make. I don't like the idea of using a huge library that I don't even begin to understand just because I can't figure out how to do collision response. But I just don't know where to begin. Maybe I will have to use a library. If anyone with experience could, based on that demo and what I'm trying to do, suggest a course of action, I'd really appreciate it.


How do I ensure an appropriate payout ratio for a slot machine? I have done a lot of research into random number generators for slot machines, reel stop calculations and how to physically give the user a good chance on winning. What I can't figure out is how to properly insure that the machine is going to have a payout rating of (lets say) 95 . So, I have a reel set up wit 22 spaces on it. Filled with 16 different symbols. When I get my random number, mod divide it by 64 and get the remainder, I hop over to a loop up table to see how the virtual stop relates to the reel position. Now that I have how the reels are going to stop, do I make sure the payout ratio is correct? For every dollar they put in, how to I make sure the machine will pay out .95 cents? Thanks for the ideas. I am working in actionscript, if that helps with the language issues, but in general I am just looking for theory. Edit There is real money involved only in the fact that they can buy more tokens to play more. There is not going to be real money paid out to the person, if they were to actually hit the any of the paylines.


Red5 or zendZMF or BlazeDS or Cirrus? I've been trying to develop a multiplayer turn based game which is mostly free to play I just want to see if the game idea is appreciated hence I want to do it with minimal cost and I'm confused which one of these to use red5, zendamf, BlazeDS or Cirrus. Red5 seemed the best option for me initially but getting a media server to host seems to be quite expensive. Same reason why I couldn't use Electroserver cost. Both are very attractive options though. ZendAMF then looked a feasible option since it supported remoting. But how do I let the other players get updates on actions of one player through zendAMF, which as far as I know does not do data push. I'll have to do it by polling asking server constantly for updates which wont look very real time. Then I heard about BlazeDS which does support data push. Now I have to learn java if I want to use that and get a new web host because my existing host does not have tomcat. Then I heard about cirrus which is still in 'codename cirrus' stage. It looks like a very feasible option since its peer to peer with miniamal server support needed. Is it good for a mutiplayer game? Well if anyone has experience developing multiplayer flash games I'd like to know if a turn based multiplayer game with more than two players participating can be implemented using zendamf. ZendAMF because I know PHP and AS3.


How does one disable the right click context menu in Flash? I happened to play around with habbo.com social game portal. It clearly uses Adobe Flash as platform (if you look into the source code of the HTML page). But when you do right mouse click you don't get the Flash right click menu popping up! Does anybody have an idea how this is done?


Splitting a large number of FLAs into multiple gifs I currently have a large number (300 or so) FLAs that I wish to convert to GIFs for a HTML5 game I'm creating. Each one of these FLAs contains multiple animations in the timeline, and they all have the same basic structure (Animation one in frames 1 25, animation 2 in frames 26 34, etc.) Is there a way I could automate splitting them up and converting them into the GIFs? I am on a Mac, but do have access to a Windows machine, so any solution will work, basically. I don't have the Windows version of Flash though, so that is annoying. Thanks in advance, and if this the wrong StackExchange to ask in, then I apologise in advance.


How to produce assets effectively on large Flash game projects? I have been working on Flash games professionally for two years now and somehow, having our artists producing assets the right way is one of our biggest challenge. More precisely, it is very hard to have them following any kind of structure and or standards, nor taking into consideration performance. I would say also the most of our issues concerns UI and related animations. Our current workflow is (on a Facebook hidden object game) Artists produce PSD and animate prototypes in Flash Artists re organize their FLA files to be a bit more "programmer friendly" Programmers retouches assets until they have the right structure and export classes inside a SWC, from Flash Programmers try to improve performances, sometimes degrading the quality of game graphics Our main idea is to hire somebody dedicated to prepare assets for programmers but I am really looking forward to improving the pipeline. I was wondering if you guys have tips of any kind to improve this workflow, whether it be team organization, training, tools or tips with Flash. Any explanation on your asset pipeline is well appreciated too. EDIT Thanks for your replies. I do agree with you that tools and processes will never replace collaborative people. However, I feel like we got stuck into this "I am doing my own thing" mentality as the integration process caused a lot of friction. As part of our Scrum process, the team clearly acknowledge its own quirks and was looking at immediate solutions for the next project better rules, better attitude, better understanding of each other. My team have specialized artists (UI, character drawing, character animation), but no leading art director (we use existing licenses brands), and programmers (both front and back end). That's why having a very versatile person in between (designer, integrator, technical artist or however you want to call it) is invaluable in my opinion so, I am looking for innovative solutions. Usually, the main specs requirements for assets are Naming (of classes, textfields or various visual objects that will be used by the code, taking in account that visual needs can cause deep nesting of objects) States (that we implemented with frame labels) Alignement (always build from 0,0 use round values) So, while adopting "good practices" can sure help, there always is this little part of feature specific requirements that has to be decided. Basically I was looking for a an efficient way to communicate these specs (even to non technical people) and avoid the back and forth to verify assets are as expected (this is where my idea of intermediate validation format comes from). I understand there is no clear answer and I created this post to get people feedback and good ideas (it's working so far )


Is frustum culling necessary in a Flash AS3 game? I'm making a 2D game where the map will be scrolled frequently, and only a small part of it will be visible at any time. Which implementation would run faster? The naive way Make the map a single huge MovieClip and move it around. The elegant way Split the map into multiple chunks and use a frustum culling algorithm to render only the ones that are visible. Now that I think of it, this question boils down to whether Flash does its own frustum culling on big MovieClips.


Rendering performance for Flash games I was reading on SO about native flash rendering vs building a custom BitmapData frame buffer and some of the answers were a bit conflicting, so I was wondering Is it generally best practice to go the custom Bitmap buffer route or is it best to leave rendering to the flash engine? If you're using vector animations (MovieClips) as opposed to sprites, does that change the answer to the above? If so is it best practice to use sprite based animations? (I'm targeting Flash 10 if that makes any difference)


Using sprites in pygame without classes and objects Relevant information I'm in a grade 11 computer science class that uses Python amp Pygame. We're aloud to use sprites and images though we're never taught it, just drawing graphics like squares and circles. We were taught arrays, lists, functions but not classes and objects. We also relatively do things without using functions like the init main one I see a lot on line, we also don't use self or super. If it's anything relevant, I'm making a top down (bird's eye view) 2D shooter game similar to a 2D version of dead ops arcade in Call Of Duty Black Ops. What I'm trying to do I've been programming with Java amp LibGDX before hand. So I want to use sprites in images in Pygame the same way I've been using it in LibGDX. Getting images, obtaining image rectangles for collision, rotating transforming images, changing the images of the sprite. Though every tutorial I've seen for sprites and images in Pygame that I can search up uses objects, classes and function calls that I'm not familiar with. What I've done I've loaded a PNG into my program and drew it to the screen. Simple and straight forward. Though the Pygame documentation doesn't give me a lot of options in terms of manipulating these images other than moving their location. What I'm asking for A simple run down syntax of how I would use a sprite in Pygame, without objects classes or any weird function terminology. In terms of functions I can make a function, pass information through parameters and return values. I'm not aware of global variables, self or super. The simplest of simple where I can resize an image, change the image of a sprite, transform rotate it, and get a rectangle that I can use to overlap with another one.


Common practice when handling sprite animation Let's say I'm using the following sprite as a sample to try LibGDX Animation and TextureRegion. http www.smackjeeves.com images uploaded comics 7 8 78bc6b62fEySW.gif As you can see, the provided image above has different width amp height per image. The width when Zero performs a slash is different when Zero stands. Is it a good practice to create a padding margin for every image so they have similar width amp height. Or should I just have all the sprite cramped like that and try to handle it in the backend? Thanks


What approaches are there to re designing 8 16 bit sprites for HD? I'm new to game development, and my skills with Photoshop are not that great. I was planning to try to convert a old game to HD, but for this I need HD sprites. What is a good way to approach converting 8 16 bit sprites into something like HD? I mean something like this


Sprite cut in half after placed on Scene I have noticed a very odd behaviour in Unity 5.2.1. When I drag and drop a Sprite into the Scene, it's cut in half like this I tried with PNG and PSD formats but it didn't help. Although when I flipped an image horizontaly in PS and then imported it, it worked. Is this a Unity bug? Edit It happens only when I set Max Size to 512 or more, but still why?


How can I quickly check if my sprite tiles well? I am trying to create tilemap sprites that tile nicely, but checking how well they tile is really cumbersome. Ideally, I'd like to have an image editor that shows a layout like this, so I could see if it tiles well without a manual check img img img img img What programs can do this, or how can I otherwise make this easier?


Revolve FlxSprites Around a Central FlxSprite in Flash Game made with Flixel I have been working on a Flash game made in Flash Builder using the Flixel library. I have been trying to dynamically create a group of FlxSprites , and revolve them around a player controlled class that extends FlxSprite when the player uses a power up. My thought on how to approach this, was to create a circle, use points on that circle to instantiate the sprites, and then somehow update those sprites to points along that circle during the game's update step. But I am not sure what would be the best way to hold information about a circle, or circular path's in ActionScript 3. I assumed that As3Math provided some of the means to do this, and I tried to add one sprite to a circle like this package import As3Math. import As3Math.geo2d.amBoundCircle2d import org.flixel.FlxGroup import org.flixel.FlxState public class ButterflyRing extends FlxGroup Embed(source ".. Content Images spritesheet butterfly 32x8.png") var butterflySprite Class public function ButterflyRing(playState FlxState,X Number,Y Number) add to super class super() create a circle motion path at coordinates x 150, y 150 with a radius of 100 var butterflyCircle Math.amBoundCircle2d new Math.amBoundCircle2d(150,50) var circDiameter Number butterflyCircle.radius 2 var pX Number butterflyCircle.center.x circDiameter var pY Number butterflyCircle.center.y var butterfly SpriteButterfly new SpriteButterfly(pX,pY) add(butterfly) override public function update() void super.update() I realize now this is not the correct way to use As3Math, that it is accessible by default and you call it like Math.pi. My question is, Does ActionsScript 3 have the means to do this in its code base, or do you have to define your own classes to hold information for a circle, or do you use Math.pi to build circles from scratch? What is a good approach for this? Or does Flixel provide something good for this?


Why are 16 16 pixel tiles so common? Is there any good reason for tiles (e.g. Minecraft's) to be 16 16? I have a feeling it has something to do with binary because 16 is 10000 in binary, but that might be a coincidence. I want to know is because I want to make a game with terrain generation, and I want to know how big my tiles should be, or if it doesn't really matter.


Slicing irregular spritesheet (automatically?) If found a cool sprite sheet on the internet but its irregular. Is there any way besides manually cutting sprites to extract the separate pngs? I need to pack them then again into the Texture Atlas under proper names. Maybe theres some smart online tool that uses deep learning or something like that?


Gamemaker images appear blurred in application I'm making a practice game (generic space invaders clone) in Gamemaker Studio. However, there appears to be a problem with the images. While they look acceptable in Gamemaker Studio (not amazing, due to stretching effects, but acceptable for a practice project) However, once I compile the project down to an application I get this blurring effect Can anyone tell me what's causing this, and how to turn it off?


Problem with preloading plist file in Cocos2d x I am using Cocos2d x engine with 3.2 version. In my splash screen I am prefeching a plist by below line SpriteFrameCache getInstance() gt addSpriteFramesWithFile("ui.plist") Now inside game when I am creating a sprite I am getting an assert fail error Sprite ss Sprite createWithSpriteFrameName("pause.png") Assert failed Invalid spriteFrameName pause.png Also when the splash screen is removed, I am getting the below line in console cocos2d TextureCache removing unused texture D cocos2dx projects ABCD Resources mid ui.png Is there anything I need to add or something? I was doing the same thing for 2.x and was working but not in 3.2 EDIT In 3.x if you are calling this line Director getInstance() gt purgeCachedData() , remember that it will delete all textures from the cache memory. So handle all sprite sheets manually.


How do you move a sprite in sub pixel increments? Pixels are either on or off. The minimum amount you can move a sprite is a single pixel. So how you make the sprite move slower than 1 pixel per frame? The way I did it was to add the speed to a variable and test if it had reached 1 (or 1). If it did, then I would move the sprite and reset the variable to 0, like so update(dt) temp dx speed dt temp dy speed dt if (temp dx gt 1) move sprite reset temp dx to 0 if (tempy dy gt 1) move sprite reset temp dy to 0 I disliked this approach because it feels silly and the sprite's movement looks very jerky. So in what way would you implement sub pixel movement?


Rotate sprite direction Cocos2d I want that my sprite go always forward, and you can only control his direction moving right and left (on 360 degrees). I don't know why, but the movement it's senseless. The constants to move and rotate const int POD DEGRE MOVE 5 const int POD STEP MOVE 3 The sprite initalization dragonSprite gt setPosition(Point(visibleSize.width 2, dragonSprite gt getContentSize().height 0.75)) addChild( dragonSprite, 2) The event key listener void GameScene onKeyPressed(EventKeyboard KeyCode keyCode, Event event) pressedKey keyCode switch ( pressedKey) case EventKeyboard KeyCode KEY LEFT ARROW giro POD DEGRE MOVE isMoving true break case EventKeyboard KeyCode KEY RIGHT ARROW giro POD DEGRE MOVE isMoving true break void GameScene onKeyReleased(EventKeyboard KeyCode keyCode, Event event) if ( pressedKey keyCode) pressedKey EventKeyboard KeyCode KEY NONE isMoving false giro 0 And the calculations of the new direction void GameScene update(float dt) dragonSprite gt setRotation( dragonSprite gt getRotation() giro) podVector Vec2(cos( dragonSprite gt getRotation()) POD STEP MOVE, sin( dragonSprite gt getRotation()) POD STEP MOVE) Vec2 newPos Vec2( dragonSprite gt getPosition().x podVector.x, dragonSprite gt getPosition().y podVector.y) dragonSprite gt setPosition(newPos) Another problem is that the sprite at the start moves to the right (because Cos(0) 1), so I rotate the image of the sprite 90 degrees to the right, to then rotate it again at the initialization 90 to the left so the sprite is in the right position and his start angle is 90 (sin(90) 1), but the angle is not 90, and it moves as he wishes. The last problem I have with this is that when I press a key (right or left), the sprite stops, rotates, and starts again (a direction that is not the direction where the sprite is aiming, that's the main problem). The sprite shouldn't stop while you are moving it. Can anyone help me?


How to prevent images from being resized in game maker? This warning appeared in the compilation menu of my game. The images were rescaled in half. I understand that this happened because they had very large dimensions. It turns out that the images, although they have a large size (pixels), are very light, because they are composed for the most part by simple traces in addition to having the transparent background. Below, one of the images You see, it is very light. It turns out that in the game it stops being clear. How do I solve my problem? Using smaller images is out of the question.


Tiled map editor and objects Ive been searching for an easy way to group multiple sprites of a spritesheet into a single entity. Im using tiled editor as written at the title. Some objects might be larger than the tile size and i need a way to let my game know that in order to manipulate these objects. I dont want to create new tilesets with different sizes for all objects. Is this possible in this app and if not do you know another that can handle this?


Is there is a way to mask sprites in Spriter? I am very new to Spriter. I want a sprite to be only displayed when it is above particular sprite. How can achieve this?


How does the SNES' Mode 7 sprite perspective projection work? I've always wanted to know how to replicate the old Mode 7 graphics mode of the Super NES. It was frequently used for a pseudo 3D effect in racing games like Top Gear (gameplay video). Top Gear Gremlin Graphics. Image credit Phil at tasvideos.org. Every explanation I can find seems a little too complex for me. In simple terms, how does Mode 7 work?


How to avoid the cutoff of a Sprite when overlapping in a terrain? I have a scene where I have a terrain as a PlaneGeometry. And I'm trying to locate a building on it as Sprite. But I'm not able to put that building sprite centered on the terrain without getting a cutoff. Make sense because the terrain is cutting the half. But I'm just wondering if there is a technique to solve this problem. I tried to rotate the sprite as a 3D object. But does not have this property. Also tried using a PlaneGeometry with a MeshBasicMaterial, but the result of the Image looks blurry and without transparency.


What is the difference between sprites and tiles? I'm making a game, where it came to adding a tile class, but i already have a sprite one, which does the same at first glance. Can you explain the difference with a couple of examples?