Coder Social home page Coder Social logo

axel's Introduction

Axel

Website

http://axgl.org

About

Axel is a library that makes flash game development as easy as possible. Axel takes advantage of Flash Player 11's Stage3D in order to offload all the rendering to the GPU in order to gain huge performance boosts over the typical flash display list. As of Adobe Air 3.2, Stage3D is also supported when building your games for mobile devices. This means exporting your flash games to iOS and Android has never been easier!

Axel is completely free, so download it and start making games today! Axel is released under the MIT license, so you don't have to worry about being restricted about what you can do with your games!

Note that Axel is currently in testing phases. While it contains all the basics to creating a game, there is some ideal logic that is not yet implemented. Resizing, context loss, and better zooming support (to name a few) are things that will be implemented soon. In addition, there are many more features planned to help improve it. If you encounter any problems, please submit an issue on Github or post on the forums. You can also use the forums for anything else such as feature requests and suggestions.

Demos, Tutorials, and Documentation

axel's People

Contributors

arkeus avatar rogerbraun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

axel's Issues

Fix Sprite Flipping

Sprite flipping behaves funny when you have offsets. Fix this.

Current fix will be to, if the sprite is flipped, flip the graphic but keep the exact same bounding box. That means if your bounding box is in the bottom right, and you flip it, it will still be in the bottom right. I don't know any uses cases where this is a problem, but please speak up if you have a reason this shouldn't be the behavior.

Has development stopped with Axel?

I see there have been no updates for 4 months. The last milestone which included atlases has not been completed yet.

Arkeus, are you still working on the framework? If not, is anyone willing to pick it up?

Cheers

AxTilemap.scale?

Changing AxTilemap.scale doesn't seem to do anything, for example in the AxeliteBasic demo I'm trying:

        ...
        tilemap.scale.x = 4;
        tilemap.scale.y = 4;
        add (tilemap);

Mobile Performance

Performance on retina display iPods and iPhone 4 is really bad, because they seem to struggle with anything complex in the fragment shader. Removing the color transform from the fragment shader results in a huge performance boost.

A quick fix would be to make two shader programs, one with color transform, one without, and only use the expensive one if it's actually needed.

Another thing that would be great is drawing in batches like it is implemented in Starling, where everything on the same texture is drawn at the same time, if possible. For reference: http://wiki.starling-framework.org/manual/performance_optimization?s[]=performance#minimize_state_changes.

Fix Zooming

Currently zooming works inconsistently. Sometimes things get scaled funny or spaces appear between tiles, etc.

To fix this, I will be placing a hard requirement such that you can only zoom at integer levels (x2, x3, x4, etc). Smooth zooming is cool, but it seems to be introducing a lot more problems than it is worth. I think for now if that is something you need, it'll have to be handled in post processing (probably easier once rendering to a texture is in there).

Also, drawing will now be aligned to x1 pixels. So if you zoom the game at 4x, if you move right a tiny bit, the sprite would move at a minimum 4 pixels (so that the left side cannot be mid-pixel, like it can now). I do not like this behavior, but I think it's a requirement for consistent zooming, and is probably preferred by most.

Fixed Timestep

Add an option to fix the timestep with the framerate.

Multiple cameras (with different zoom levels)?

I wonder if it would be possible to implement multiple cameras in Axel. Currently there is only one camera and I exepect it won't be as easy as adding an array of cameras in Ax - just like Flixel does it. Is it feasible in Axel's architecture and rendering system?

Why does not support zoom out ?

I have a question: Why does not support zoom out?
I found that I just changed very little code can support this feature.
you are deliberately wrote?

change the following code:
1.
public function Ax(initialState:Class = null, width:uint = 0, height:uint = 0, zoom:uint = 1, framerate:uint = 60, fixedTimestep:Boolean = false) {
if (zoom < 1) {
throw new Error("Zoom level must be an integer greater than 0");
}
==>

    public function Ax(initialState:Class = null, width:uint = 0, height:uint = 0, zoom:Number = 1, framerate:uint = 60, fixedTimestep:Boolean = false) {
        //if (zoom < 1) {
            //throw new Error("Zoom level must be an integer greater than 0");
        //}

Ax.worldZoom = Math.ceil(worldZoom);
==>
Ax.worldZoom = worldZoom;

Sounds overflow issue

If you play sounds or musics by Ax.sound()/Ax.music(), it will new a AxSound and push it into the Ax.sounds (an AxGroup) for updates.

But if the AxSound.destroy() has been called after play (there have another bug that it will never been called by listener), the object reference still within the Ax.sounds group, and updating.

Should be a way to remove it from the group after playback.

And if the program like your tutorial, let's say just using Ax.sound(FIRE); after thousands plays it will crashed, by array overflow and updating a null reference.

UPDATE:

I fixed this issue by:

  1. add a reference "parent:AxGroup" into the AxSound object, the contractor will need a reference passed;
  2. at "destory()" add "parent.remove(this)" to ensure it removed from the update group;
  3. MAJOR BUG, at AxSound.as, function "play()", line "sound.addEventListener(Event.SOUND_COMPLETE, destroy);", it should be "soundChannel.addEventListener". Otherwise it will never callback destory() function. And the callback function should have at least one parameter. So I do this way:
    ...
    soundChannel.addEventListener(Event.SOUND_COMPLETE, onSoundChannelComplete);
    ...
    public function onSoundChannelComplete(sender:Event):void {
    destroy();
    }

That would fixed this issue.

AxRect.overlaps can yield nonsensical results with AxGroup

If you want to overlap an AxSprite with an AxGroup, you might try sprite.overlaps(group). This will work, as both Group and Sprite inherit from Rect, but it does not make sense. The x and y coordinates of the group are probably the default values of 0, so the call will always return false.

Feature request: add color (ColorTransform) + fog color

In Flash, I normally use ColorTransform a lot.
In Axel, it seems like only the multiply part is available, not the add/offset part.
Could that be added?

Also, having a fog color (+ fog intensity) would be great.
So the final color would be:

(color * colorTransformMul + colorTransformAdd) * (1 - fogIntensity) + fogColor * fogIntensity

Add Support For Atlases (AxAtlas)

Implement AxAtlas such that it supports loading texture atlases in format(s) that popular tools export to. Also support manually creating the atlas via code.

Most likely you will construct it as follows:

var atlas:AxAtlas = new AxAtlas(xmlFormat);

And it will load from formats such as the one TexturePacker exports to. You'll also be able to add your own via code (so you can create the manually):

atlas.add("player_stand", 50, 72, 32, 32);
atlas.add("player_walk", 50, 84, 32, 32, 5, 10);

Then in AxSprite you can load from an atlas. This will add all the relevant animations also.

Pathfinding

Implement A* pathfinding in AxTilemap. Given a start and end tile, attempt to find the shortest path and return that as an AxPath which will be a series of either tile indices or points. Heuristic will be Manhattan distance.

Stretch goals: Include options for simplifying the path, whether to allow diagonal movement, etc.

In the future: Possibly support adding weights to tiles. Perhaps use raycasting to further simplify paths.

Please feel free to mention any ideas or requests you have for pathfinding. :)

Add Right Click Support

With 11.2 we can now have custom right click functionality. Figure out how to sensibly allow you to use Ax.mouse.pressed(AxMouseButton.RIGHT). Might require something like Ax.enableRightClick so that it doesn't destroy the default right click menu in flash (or if there's a way to rebind the default one, enable right click by default and give a way to disable it).

Ax.as is private

Change Ax.as private properties and methods to be protected, for easier extending.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.