12

Find an engine that runs on all three platforms (i.e., is cross-/multi-platform) and meets your requirements. The latter will vary with time and only you know all the requirements you need, so finding the correct engine is left up to you.


11

At our studio we are working with Haxe and NME, and the advantages are great. Performance and cross-platform are the more important points (at least for us). Pros Even with only a few people in the forums, you can receive a lot of help. It's a very active community. Check at haxenme.org, haxe.org, and haxe group in Google groups. Numerous people ...


9

As I said in the comments, a 2D array would probably help you out. Lets say this is our 5 by 5 grid and we have a match So we know 3 tiles will be removed, therefore we need to randomize 3 new values for 3 spots. The catch is however we first need to move the tiles in the same column that were above( blue ) the tiles that were removed (red). It would be ...


9

There are 360 degrees (2π radians) in a circle. Divide that by the number of objects, and that tells you the correct angle between the objects, for even spacing. If you want to keep the objects the same distance apart no matter how many objects are in the circle, we need to calculate the distance out from the center at which points are that distance apart. ...


9

Here is my complete learning experience, resulting in a pretty much functional version of the movement I wanted, all using Nape's internal methods. All of this code is within my Spider class, pulling some properties from its parent, a Level class. Most of the other classes and methods are part of the Nape package. Here's the pertinent part of my import list:...


8

Flash is dying. Whatever some Flashers may tell you, HTML5 is slowly taking its place. Slowly, because HTML5 still isn't really production ready in many senses, for full-fledged and straightforward game dev. You can see solid stats for the shift over the last year if you look (for example) at those jobseeking sites that record these things, Flash demand is ...


8

How about making any "stick" surface a character touches apply a force along the inverse normal of the surface? The force remains as long as they're in contact with the surface and overrides gravity as long as it's active. So jumping off the ceiling will have the expected effect of dropping down to the floor. You would probably want to implement some ...


6

Gals Panic, is a Qix type game. You may search for Qix to get more information on how things work. The general concept here is, having two images. One is the picture that you want to be revealed. The 2nd one is the actual gamefield where the game is checked against. These two are combined to produce the end result. So suppose the filled game area is white ...


5

While Flash is still a thriving and vibrant platform to develop on, I would ditch it in favour of Unity, simply considering the unavailability of Flash on some mobile platforms that you may want to port to later. There is a free package available in the Unity marketplace called Orthello, which greatly simplifies the process of making 2d games with Unity. ...


5

If you implement the rules from Tic-tac-toe Wiki you can create the perfect AI that always wins, then you can decrease the difficulty by making the AI do random moves, and the frequency of random moves is the difficulty level. Here are the rules: Win: If the player has two in a row, play the third to get three in a row. Block: If the [opponent] has two in a ...


5

Z-sorting or depth-sorting in as3isolib is calculated (by default) in the following class: public class DefaultSceneLayoutRenderer implements ISceneLayoutRenderer that can be found in: package as3isolib.display.renderers The code inside DefaultSceneLayoutRenderer itself is actually not too long (only 200 hundred lines of code w/comments and all) but ...


5

As a subquestion, I'm also assuming here that the best way to store data that will be bundled with the final game and not read externally is simply to declare everything in AS3. Seems to me that if I used, say, XML or JSON I'd have to use the associated AS3 classes and methods to pull in the data, parse it, and convert it to AS3 object(s) anyway, so it would ...


5

I guess you're referring to the default entries in the Flash-Player menu: The entries there can be customize (to a certain degree) by using the ContextMenu class. Here's an example. In a frame of your timeline (preferrably at the beginning), place the following code: var menu:ContextMenu = new ContextMenu(); var items:ContextMenuBuiltInItems = new ...


5

(1) You may be able to adapt an algorithm used for creating word clouds. Here's one example algorithm, based on Wordle's strategy. This works by choosing a start position/size/orientation for each object (generally starting with the biggest/most important ones), and trying to place it there. If it collides with an already-placed object, move it ...


5

Here's what I normally do with my states. It might not be the best way, or even the second best (but remember, the thing that matters is not the architecture of your game code, but the actual end result.). I start with a basic State-class (all code in Pseudo-C++): class State { virtual void Event(Event e); virtual void Update(float deltaTime); ...


4

Either 2 of these it think: - It would very well be that you are deleting stuff from the display-list but still have references in other places( like arrays ) that are still being processed. This keeps building up and completely hogs your game. ( but Flash can easily handle tons of objects ) or -Your algorithm, even though simplistic, is flawed and is ...


4

In case of the zeroes and ones, you have to split with "", but in case of the tile-numbers this doesn't work as it would create an array entry for - and 1 when the value should be -1. But luckily you have a delimiter , which you can use. So instead of levelTiles = levelTiles.split("\n").join(""); levelTiles = levelTiles.split(",").join(""); tileArray = ...


4

"I want to see where my movieclip colliedes with another another movieclip." Actionscript offers pixel perfect collision detection between bitmapData objects. It does not offer straight out of the box a tool to detect the exact points where the two objects overlap. How to detect where two objects are 'touching' on another? Create two bitmapData objects ...


4

You're not working with bitmaps here. The graphics object you're using uses vector graphics. So basically you're painting a lot of rectangles to your mask... The only reasonable way to determine whether or not your mask is entirely filled would be to render it to a BitmapData (using BitmapData.draw) and then iterate through the pixels until you hit a ...


4

Note, that DisplayObjectContainer has 3 main methods: addChild, removeChild and getChildAt. All other mehtods (addChildAt, contains, getChildIndex, removeChildAt, setChildIndex, swapChildren, swapChildrenAt) are redundant (unnecessary) and can be implemented using 3 main methods above. Adobe added them for convenience, but it doesn't do quite what you're ...


4

Java defaults to using GDI (AWT, Swing). JavaFX supposedly will be able to make use of OpenGL in future. Java + LWJGL (an OpenGL wrapper that accesses native opengl32.dll via JNI) provides more direct hardware-accelerated support for Java. Flash Player 11 onward made use of OpenGL via Stage3D. Without using Stage3D, it is using a software renderer built to ...


4

They have console commands. There is a reason skyrim has all the commands in it. That game was very extensibly tested. And because it has couple hundred hours of content with every cave and guild, and some of this content is bound to a level, there is no way to make everyone play through everything. Do the same, create some commands whivh put you on an ...


4

When developing games it is important to separate the game mechanics from the game representation on the screen. The game mechanics of bowling can be simplified to a pure 2d simulation by looking at the game from above: You wouldn't lose too much of the core gameplay of bowling by not allowing the ball and pins to jump up from the lane. But using a 3d ...


3

The first thing I recommend you is to always start class names with a capital letter. That way you can immediately see whether something is a class or a variable. But that is style and shouldn't ruin your code. What actually is wrong as far as I know is the public keyword before var d:TextField. You declare that variable inside a function, and variables ...


3

I don't think that writing the entire game logic in one event in a single class is the best way. It's better to divide the game logic in several classes and follow the best practices of OOP. Like having some base classes, like Level, Player, Enemy, Weapon etc. that separate game logic, collision detection, input handling, event handling etc. on a more ...


3

I was looking for a solution to this too, but I found a easier, and performance-wise better one. Just draw everything in your graphics object again, but with a slightly fatter linestyle, wich is white and has an opacity of let's say 0.2. It gives you a nice little glow effect, and you probably won't even notice the difference until you zoom in (or if the ...


3

What the .hitTestObject() function does is compare the position and transformation of objects to see if the object's bounding boxes overlap at all. If you require more precise collision than that, it is usually better to test for collision between an object and various points on the other object using the .hitTestPoint function. For example in your scenario ...


3

this is just a guess but can you make sure your "levelArray" does't contain "\n" at the end of each line. maybe changing your condition to if(levelArray[i*37+j] == 1) solve the problem. note that it might also have an extra "\n\r" at the end of each line. In that case you need to multiply i by 38 in that condition. actually after checking the image you ...


3

I have tried different methods to get the elapsed time and this one has worked best for me so far: private var _t:int; // initialize _t and add ENTER_FRAME listener private function init():void { _t = getTimer(); addEventListener(Event.ENTER_FRAME, onEnterFrame); } private function onEnterFrame(e:Event):void { var t:int = getTimer(); var ...


3

The native Flash Events such as ENTER_FRAME etc. are quite fast and there's no way around them. If you want to learn more about the event flow, read this article. Personally I try to avoid the event system whenever possible though. Custom events (subclasses of Event) are slow. Using events can also cause memory issues when not used carefully (because a ...


Only top voted, non community-wiki answers of a minimum length are eligible