Giter Site home page Giter Site logo

sparrow-framework's Introduction

Sparrow Framework

The Open Source Game Engine for iOS

Important: Legacy Version!

This repository contains the 1.x version of the Sparrow Framework. The latest version (v2) has moved to a new repository:

Use Sparrow Framework 1.x if you need support iOS 3 and 4. All other users should upgrade to Sparrow 2, as it builds on modern technologies like iOS 5, OpenGL ES 2, ARC, etc.

What is Sparrow?

Sparrow is a pure Objective C library targeted on making game development as easy and hassle-free as possible. Sparrow makes it possible to write fast OpenGL applications without having to touch OpenGL or pure C (but easily allowing to do so, for those who wish). It uses a tried and tested API that is easy to use and hard to misuse.

Who is Sparrow for?

Obviously, Sparrow is for iPhone and iPad developers, especially those involved in game development. You will need to have a basic understanding of Objective-C – but there’s no way around that on the iOS anyway.

If you have already worked with Adobe™ Flash/Flex technology, you will immediately befriend with Sparrow since it uses lots of similar concepts and naming schemes. That said, everything is designed to be as intuitive as possible, so any Java™ or .Net™ developer will get the hang of it quickly as well.

How to start?

sparrow-framework's People

Contributors

bren3582 avatar brianensorapps avatar holgua avatar mnem avatar pnutus avatar primaryfeather avatar renebigot avatar sandyarmstrong avatar tadasv avatar tconkling avatar walm avatar yonitsafir 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  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  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

sparrow-framework's Issues

SPStage +mainStage method

Adding an [SPStage mainStage]; method would be very useful for a various situations.

SPStage.h

+ (SPStage*)mainStage;

SPStage.m

+ (SPStage*)mainStage{
    if (stages && [stages count] > 0)
        return  (SPStage*)[stages objectAtIndex:0];
    return nil;
}

doubleOnPad not working properly

doubleOnPad does not work properly on our universal app with 1.3
In SPTexture on line 266,
glTexture.scale = [path contentScaleFactor];
seems to cause the issue, because when I comment it, things works flawlessly on iPad, but it breaks the iPhone retina scale.

Something like this did the trick for me :

if (!(IS_DEVICE_IPAD() && [SPStage doubleResolutionsOnPad])) {
glTexture.scale = [path contentScaleFactor];
}

Testing on Mac

I'd love to be able to test or possibly deploy to mac, any chance of that?

Font @2x

File: SPBitmapFont.m
Function: - (void)parser:(NSXMLParser_)parser didStartElement:(NSString_)elementName

@"info" and @"common" tokens need to divide mSize and mLineHeight (respectively) by mFontTexture.scale if mFontTexture != nil. Otherwise the conditional scaling in the @"page" token is skipped for atlas-based fonts.

EXC_BAD Access

SPSound.m:45

There are too many [self release] lines. The object is already released on line 40.

SPRenderTexture bug: texture binding not working

As pointed out in this forum thread, there is problem with SPRenderTexture when there is nothing else on the screen.

The reason is that SPRenderTexture uses its own SPRenderSupport object, which is not in sync with the conventional object. The architecture has to be reconsidered.

Unable to load resources in octest bundles

[Moved from forums]

Problem: The library currently isn't able to find any media resources in a unit test bundle.
How to reproduce: Create any unit test bundle that exercises loading a resource using the SenTestingKit.

**Cause:**Various spots in the library that loads resources uses a [NSBundle mainBundle] as the basis for retrieving a resource. When running a SentTestingKit unit test bundle, the tests are injected into another executable, "octest" which will actually run the tests. The mainBundle path will always be where "octest" is located, not where the intended game executable and resources are.

Orientation support for SPStage or Game

Not sure what would be the best way to go about this, but it would be nice to have orientation support built into Sparrow. Game could subclass an SPSprite, but then adding display objects to SPStage would become obsolete.

The "i am a descendant of myself" Paradox

Possible bug leading to infinite display list recursion - I've just had a quick look at the Starling source code for the DisplayObject and DisplayObjectContainer classes, and I couldn't see any checks being done (when adding a child to a container) to determine if the child is being added to its own display list.

ChildA -> ChildB -> ChildC -> ChildA ...

I haven't run any tests, so I apologise if I've overlooked something, but I thought I would mention this while I was here.

[EDIT] Sorry, this should have been posted in the Starling Framework issues :(

AppScaffold Project

AppScaffold Project is unable to build and generates the following error:

Argument list too long: recursive header expansion failed at /Applications/Adobe InDesign CS5.5/Adobe InDesign CS5.5.app/Contents/MacOS/Required/Application UI.InDesignPlugin

Xcode 4.2.1
Mac OS 10.7.3

SPDisplayObject setRotation can hang.

I inadvertently set the rotation on a sprite to a huge double (something in the 1.0e+9 range) and my program appeared to hang. I modified my fork like so:

  • (void)setRotation:(float)value
    {
    // clamp between [-180 deg, +180 deg]
    mRotationZ = fmod(value, TWO_PI);
    mOrientationChanged = YES;
    }

Just hoping to save someone some head scratching.

Access stage from SPDisplayObject init method

Dependant on issue #1021.

Allows access to the stage even when the object doesn't have a parent or isn't connected to the stage.

SPDisplayObject.m

- (SPStage*)stage
{
    SPDisplayObject *root = self.root;
    if ([root isKindOfClass:[SPStage class]]) return (SPStage*) root;
    else return [SPStage mainStage];  /// This line is different.
}

SPTextField auto-size interest?

Hi Daniel,

I'm interested in adding auto-sizing support to SPTextField. Is this something you'd be interested in? If not, would you be amenable to a patch that makes SPTextField's internals protected instead of private, so that it can be subclassed? The functionality I want to add requires a new member variable, so it can't easily be added in a category.

Port Sparrow to mac os x

Hello are you planning to port Sparrow-Framework to mac os x in the future?
Sory, for my bad English.

Changing the texture of a SPImage

When you create an image with a texture it sets up the quad to match the texture size. But when you change the texture the quad is not updated. And it is not even possible to change the quad manually because the setWidth and setHeight methods only change the scale (!).

Make Sparrow compatible with ARC

ARC = Automatic Reference Counting, introduced in iOS 5.
Currently, a struct used by the SPPoolObject does not comply with ARC.

Resizing a SPQuad width won't work as expected

Some how the new value given to the width is reduced.

Ex:

currentQuad.width = [self distanceBetweenPoints:cQp and:tp];
NSLog(@"%f - %f",currentQuad.width,[self distanceBetweenPoints:cQp and:tp]);

At the log I'm getting:

 19.204235 - 170.735748

The weird thing is that setting a smaller height value initially, reduces the gap between this two numbers. Could be this be related to scaling?

Resource loading within Unit Tests not possible

When you load a resource (textures, sounds, etc.) in a unit test, Sparrow wants to load it from the wrong path.

The detailed description about the problem, and a working solution, can be found here.

It should be evaluated if the proposed solution can be added to the Sparrow core, or if there are alternatives.

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.