Coder Social home page Coder Social logo

asinesio / cocos2d-prkit Goto Github PK

View Code? Open in Web Editor NEW
128.0 128.0 34.0 3.05 MB

Additions to the fabulous cocos2d-iphone library as provided by Precognitive Research.

Home Page: http://precognitiveresearch.com

Objective-C 83.24% C 15.77% C++ 0.99%

cocos2d-prkit's People

Contributors

asinesio avatar panajev 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

cocos2d-prkit's Issues

Portrait Issue

When I use the portrait mode,

it aways shows error in line 155 in file PRFilledPolygon.m

this line ---->
glDrawArrays(GL_TRIANGLES, 0, areaTrianglePointCount);

Blending issues

PRFilledPolygon has some blending issues. Try putting some background sprite in the example code.

Texture problems: "swimming", glitches using PRKit, textured polygon

I'm creating a car driving game.. and when my car travel the level, where I've created many PRFilledpolygons, I see "swimming" and glitches effect on the polygons.
I've created a test project, to reproduce this: http://kamikazeua.narod.ru/test_3.zip
Just start project and touch once a screen, after that screen must start moving so you can see this glitches. Please take a look carefully. THIS CAN BE REPRODUCED ONLY ON REAL DEVICES.

UPD1: another example, on it this bug can be seen more often: http://kamikazeua.narod.ru/test_2.zip

UPD2 (added 13 march 2:26 GMT+2): LATEST - some funny car - http://kamikazeua.narod.ru/test_3.zip

Problem with Portrait and Landscape texture.

Hello Ihave a problem with Portrait/Landscape texture. I think it is bad textCord caculation. It's hard to describe so I just show.

That should be Portrait with one image.
Portrait

That should be Landscape with one image.
Landscape

any suggestion I will thankful :)

PRFilledPolygon's initWithPoints shouldn't return an autoreleased object

init methods never return autoreleased objects in obj-c.

initWithPoints: (NSArray *) polygonPoints andTexture: (CCTexture2D *) fillTexture

returns an autoreleades PRFilledPolygon while

initWithPoints:(NSArray *)polygonPoints andTexture:(CCTexture2D *)fillTexture usingTriangulator: (id<PRTriangulator>) polygonTriangulator

does not.

Problem with Cocos2d 2.0

I'm using PRKit with the new version of Cocos2d, and I'm getting EXC_BAD_ACCESS in PRFilledPolygon.m on the following line:
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); (in the draw method)

The texture is loaded correctly, and it works fine with the old version of Cocos2d.

So I assume the OpenGl version is the real problem, as the big difference with cocos2d 2.0 is that is uses OpenGLES 2.0.

But being a complete noob with OpenGL, I can't manage to make it work...

Any idea on how I could do that ?

textures do not display properly with retina display

PRFilledPolygon sprites are drawn much too small when running on the retina display. This appears to be due to the fact that cocos2d scales things by the CC_CONTENT_SCALE_FACTOR and PRKit is currently not doing the same. I'm running with the following patch in place which fixes the issue:

--- PRFilledPolygon.m
+++ PRFilledPolygon.m
@@ -67,7 +67,7 @@
     textureCoordinates = (CGPoint *) malloc(sizeof(CGPoint) * areaTrianglePointCount);

     for (int i = 0; i < areaTrianglePointCount; i++) {
-        areaTrianglePoints[i] = [[triangulatedPoints objectAtIndex:i] CGPointValue];
+        areaTrianglePoints[i] = ccpMult([[triangulatedPoints objectAtIndex:i] CGPointValue], CC_CONTENT_SCALE_FACTOR());
     }

     [self calculateTextureCoordinates];

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.