Tag Info

Hot answers tagged

13

Golden rule when working with any kind of angle: Make sure you are using the correct unit. In this case, you should be using radians, not degrees. Math.sin(i * interval * Math.PI / 180); Math.cos(i * interval * Math.PI / 180); If you want to fire bullets directly between boss and player, use atan2, FYI.


6

You are doing the division the wrong way round, and you are using degrees rather than radians, like the maths functions do. By chance this results in a pattern that look a bit like the desired. Just fix your calculation of the interval variable. var interval : Number = 2 * Math.PI / BULLETS_PER_WAVE; Edit: For those not familiar with the concept this code ...


5

I think you should do 360 / BULLETS_PER_WAVE instead which gives in your case 360 / 72 = 5 degrees between each bullet. Also are you sure that the Math.sin and Math.cos functions wants their input in degrees and not radians?


5

You could consider running a simple PID controller in your game. It's simple to implement in a function like the one you have already. By tweaking the parameters (or computing them, there are many techniques) you should be able to get a pretty neat behaviour. Be sure to run your physics loop with a fixed time step though, as this is necessary to achieve ...


5

I'd say you should start without a framework, just to get used to ActionScript and the core flash classes. Maybe write something very basic like Pong. When you feel comfortable with ActionScript and the core concepts, feel free to use a framework like Flixel or FlashPunk (look here to get started). They are quite different from the usual Flash philosophy, ...


5

Depends on what you mean by "libraries". Flixel and FlashPunk are basically Game-Engines and have implementations for collision-detection, particles, animation, save-games, audio playback etc. Other than these two you mentioned, there's also the Push Button Engine which is more modular than the other two. If you're interested in learning Flixel or ...


4

While you have been answered, here is a funnier answer : learn from nature. Use the golden ratio instead. const GOLDEN_RATIO : Number = 1.618033989; var interval : Number = 2 * Math.PI * GOLDEN_RATIO; See : http://www.mathsisfun.com/numbers/nature-golden-ratio-fibonacci.html


3

Yes! You can use Adobe AIR to package and export the Flash file. http://help.adobe.com/en_US/air/build/WSfffb011ac560372f-5d0f4f25128cc9cd0cb-7ff6.html


3

Apart from possible degree/radian issue, I reckon the main problem is that you're using integer values for the calculations. You haven't shown GameConstants.BULLET_NORMAL_SPEED_X or its Y counterpart but make sure they are represented as floating point numbers, not integers. Alternatively, cast them into floating point values during the multiplication for ...


3

This question pretty much covers the software part. Then I suggest you use a framework like Flixel or Flashpunk for your game as it will allow you to: Build a game rather quickly and... Doesn't require Flash IDE to create graphics, since these engines are Bitmap based (so you could use GIMP or other image editing software to create your sprites).


3

The question isn't "Is it used?" (it is, even stuff like menus and whatnot are non-trivial bits of AS code in many games), but "How much?". Unless you have some UI/UX experience it may be somewhat difficult to find a job as a dedicated Scaleform person. Even if a team needs to make a minigame like that, it might be a week or two of work at the most, no need ...


3

Keep in mind that the Internet Channel (Opera browser) uses Adobe Flash Lite 3.1; Basically Flash 8 with some Flash 9 features. I would perhaps target the Wii but make the game accessible to any browser. Best of both worlds. Think of it more like a regular browser on an ancient machine using the Flash 8 plugin and you shouldn't have too much trouble. ...


3

Gamepad for input - http://blog.iainlobb.com/2010/04/introducing-gamepad.html (my project) Box2d for physics - http://www.box2dflash.org/ TweenMax for animation - http://www.greensock.com/tweenmax/ Signals for eventing - http://github.com/robertpenner/as3-signals


2

As @Iain mentioned, that is not why the WiiFlash was made. You will be using actionscript 2.0 to make Flash Games for the WII. There is a title out there on this subject:Nintendo Wii Flash Game Creator's Guide HTH


2

The WiiFlash project was for using the wiimote on PC/Mac games. I think you want to look at the MarioToo project for creating wii browser games. To be honest though, why bother? You've got a much bigger audience to target with Flash by going for the general PC/Mac/Linux audience.


2

Apple changed their mind about Flash-derived apps (as seen here). Developers can use Adobe's Packager for iPhone to convert Flash apps to native iPhone apps. The Flash VM is still not supported in the iPhone's browser.


2

You can't take a flash app and just have it run on an iOS device as-is. CS5 does have an export process to put projects on a device. I'm assuming it's running in a VM or is some kind of cross compiler or something. Using Flash in CS5 for iOS


2

Consider increasing your dampening as you get closer to the target height or making a boolean switch for a fixed increase once you've reached the target and until another height is set. That would allow you to have faster movement without sacrificing your ability to stop or requiring much change in code.


2

Service Stack for services and serves up XML, JSON etc. Amazing in general for setting up the services. Also cross platform. As far as 'DB communication', if you are able to use Windows Server for hosting, Entity Framework works well, and very easy to use and code against. There might be alternatives like DbLinq (Linq To SQL for Mono), but haven't tried it ...


2

One thing you can try: MClip.mouseEnabled = false


2

Increase the distance the player moves per timer iteration Change your += or -= 1 to a variable [speed]. Your speed starts out at 1 and increases as the game progresses


2

I'd recommend you to start without any framework like flixel, flashpunk or even Box2d. They do really make life simpler to you by keeping in mind the ancient programmer philosophy "Don't always reinvent the wheel" If you start programming games with just flash, these would be your plus points You learn little bit about the essential computer graphics ...


2

Use a framework; I recommend Flixel because it's the one I'm familiar with. There's no real value in reinventing the wheel, and Flixel makes development much faster and easier, which means that you'll see results faster and you'll get experience more quickly. Frameworks help to structure your game, so you'll make fewer rookie mistakes with regard to ...


1

I've had the exact same problem when i tried to add sponsorship SWF's to my game projects (I'm using FlashDevelop & flixel/as3). After a long search i found a way of adding the SWF, through converting it into some byteArray or something and adding to the stage. It worked (checked with Kongregate loader), but the clip just kept on looping and i found no ...


1

I'm not seeing the aim of your question, are you asking can you host and import or are you asking where should you host your files to import into your code. Personally I'd recommend you compress the MP3 files, there is a good answer on another Stack Exchange which you can find here If you're looking to host your MP3 files I'd recommend Dropbox - it's free ...


1

Simply have the pivot point in the center of your laser clip. Calculate the distance between the player and the input. var dx:Number = touchX - player.x; //Assuming SAME coordinate space var dy:Number = touchY - player.y; // Else use localToGlobal var halfdist:Number = Math.sqrt(dx*dx+dy*dy)/2; Now scale your movieclip by distance. laser.width = ...


1

I'm assuming you're using the Flash IDE? If your file isn't an Actionscript class, just use the include statement. Eg. on frame 2, write: include "myFile.as"; If you're using classes, there's an option in the Actionscript-3 settings, where you can specify a frame where classes should be imported to. So if your class is MyClass, just call something like ...


1

altering the code you've pasted in Shader Toy I've reached something acceptable: #ifdef GL_ES precision highp float; #endif uniform vec2 resolution; uniform float time; uniform sampler2D tex0; uniform sampler2D tex1; uniform sampler2D tex2; uniform sampler2D tex3; void main(void) { vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / resolution.xy; vec2 uv; ...


1

There is not one silver bullet. You can use an event driven paradigm: Whenever something happens in your game that can be relevant for a quest, raise an event. Define classes for your quests with event listeners to react to these events. Store the currently active quests (and their status and parameters) in a database When initializing your game state, ...



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