Hot answers tagged

53

There are ways to make nice 3d graphics with low memory footprint, however that requires you to have the right experience and knowledge. There are games like .kkrieger which is a 3d first person shooter, with the size of a few kilobytes. This is not just compression algorithms. You can't just make a massive game and press a button and suddenly its 100kb, ...


13

Flash garbage collector doesn't work very well, nor its destructors do a good job of actually destroying things either. Even if your code is correct and shouldn't leak, Flash might mess it anyway. Try to allocate the bare minimum of things you actually need, and instead of destorying and recreating them, just recycle them.


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 ...


8

This is actually very simple if your objects match up with your isometric tiles. Take a look at this image: You should first draw the object at the red position, then objects at blue, then green, then yellow, then magenta, and so on... It should be fairly obvious how to implement this if your board has objects in it instead of objects having position as an ...


8

Is there a point where the complexity of a game is enough for people to say "ok, I'm going to download and play that"? No. The logic of what you are suggesting is that people see simple games which are uninteresting, and then as they see progressively more complex games, they eventually think, "aha! This is complex enough for my interests - I shall download ...


7

I would recommend you to take a look at the grapefrukt exporter. I didn't tried it myself yet (I will for sure!), but it seems to match your needs (well most of them). Here is the list of features (from their website) Exports sprites to transparent pngs Exports MovieClips to animation sheets Parses positions of parts in MovieClips and exports keyframe ...


7

I dont know how technically Sonic 2 bonus stages are done, they could be computed by the cpu/special custom chip (and thus realtime) or totally precalculated and stored inside cartridge (like a very low resolution movie). If you are using same color range, resolution and low framerate as sonic example you give, you should be able to get really lower than ...


7

petr's answer assumes you already know how to deploy a Flash app on Android; maybe you already know that, but you don't mention it in your question so I want to point out that you can package a Flash .swf as an Android .apk using AIR. Once you are actually deploying your in-development game as an Android app then you get to the higher level concerns of ...


6

If you're fetching all the vertex attributes in the shader, then in general attributes in multiple streams may be slower than all attributes in one stream, due to the loss of cache locality. However, using multiple streams can still be a good idea in some cases, such as: Some passes only need to read a few of the attributes. For example, drawing the ...


6

Whenever you do a float operation, some rounding errors are bound to occur. Because you are adding each specific layer's position change on every frame, eventually these errors add up and become noticeable. Say you have a max error e in each multiply operation, then with your algorithm the frame 1 position is: layer1.x(1) += cameraTarget.moveX * layer1....


6

My understanding is that you should never trust the client in a multiplayer game and therefore aim to do any gameplay critical processing server-side. The disadvantage of pure client-side logic is that there is no verification In other words you should probably go with a third option; send an abstract representation of what the player wants to do to the ...


6

There are multiple ways to solve this. If you want to include said long drops and other one-way obstacles, that should be factored in possibly as a feature. The Legend of Zelda series often uses these to prevent the player from missing or giving up on important rooms of the dungeon. A simple solution is to allow the player to use an item they obtain later ...


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

The creator of N actually put together a few tutorials explaining a little of the technology they used. Tutorial A is about the collision detection used (separating axis theorem) but may be useful to you. http://www.metanetsoftware.com/technique/tutorialA.html Tutorial B explains more about the tile shapes used and from the looks of it, they are just a ...


5

The second idea would be much, much faster. Rendering dozens of DisplayObjects every frame is going to be slower than occasionally re-blitting to a Bitmap. Depending on the speed/memory tradeoff you want to make, you can make the background Bitmap wider to make your redraws less frequent. Keep in mind that there is a maximum size for Bitmaps, depending on ...


5

Firstly the main thing would be to render them at a lower resolution and scale them up without anti-aliasing for the pixelated effect. Old dos style games where often at resolutions like 320x240. 640x480 would have been fairly high res back then. Just doing that would give you a Quake 1 played on a 486DX graphics style. I would recommend doing them at 1/2, 1/...


5

You can convert a Flash game to run on an Android device if you package it up with Adobe AIR, with the Android SDK through terminal using -apk and you can script / code in the #import features that allow you to do some native control for the game. However, from personal experience ; I've made a couple AIR / Android games and the problem with AIR is that it ...


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

It is highly not recommended to make an iPad game without a device. The simulator is decent, but some things cannot be tested properly on it. For example, In App Purchases cannot be tested without a device. And believe me, you want to test those things. You also won't get much of an idea of its performance on the simulator since it may run much faster or ...


4

Usually shader languages come with special types that hold multiple values. For example GLSL has vec2, vec3, and vec4 types which hold 2, 3 or 4 float values... these types are ideal for something like RGB or RGBA values. I don't know which shader language you use, but from your other question I'm guessing it's AGAL (Flash shader). There you use register ...


4

A naive approach would be to simply perform a brute-force check on all pixels. As soon as you hit a non-transparent pixel you can stop searching further. This won't work very well with large images and can result in quite extensive searches if the last non-transparent pixels are at the end of the search. There are two better ways I can think of: Similar to ...


4

Unless I am misunderstanding the situation you are asking about, this seems like premature optimization to me. I would say implement whatever technique is most straightforward for you. You can optimize it later if you start having performance issues, but for such a simple game I wouldn't expect to have a bottleneck with the creation of random objects.


4

I managed to fix it with a profiler (the miner). I had b2vec2 and sprite leaks. GC won't gather if you keep references to objects so just make sure you have a destructor in your custom classes, delete and null everything you can. Most of all if you use big libraries such as box2d make sure you null even local vars. With bitmap data use bmpdat.dispose(); and ...


4

If both methods give you the same result, and if you're not programming it, let your programmer decide. If it's easier for him to implement this one way, why would you force him the other way?


4

It's not the compilation method that makes the games lag, it's the garbage collector, and the Flash garbage collector is separate from the browsers. I think I can pretty confidently reason that you run Firefox, because the Firefox garbage collector is the worst piece of crap you can get, from a gaming point of view. If you open just one tab and run a light ...


4

Box2D is a physics engine; Flixel and Flashpunk are game frameworks. You can use both Flixel and Flashpunk with Box2D. I highly recommend using a framework like Flixel or Flashpunk. It will simplify and accelerate your coding experience. For a platformer, Box2D is probably not necessary unless you want interesting physics to be a part of your gameplay. If ...


4

In with Unity before anyone else! (or I'll delete my answer). Unity really is the standout in this space, and it can in fact be used to distribute standalone games. If you want to make a game, use something very polished like Unity. If you want to mess with technology, use one of the systems you mentioned.


4

I'm not aware of a standard way to deliver a HTML5 game (yet). Most portals I'm aware of just list the games (together with ratings), but then link to external sites where the games are hosted (eg. to the site of the game-creator). As things evolve, I'm sure there will be efforts to keep people on the portal-site and similar things that are currently known ...


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 ...


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