Search found 66 matches
- Fri Sep 20, 2013 1:13 am
- Forum: R.U.B.E discussion
- Topic: A quick question regarding Downhill Supreme
- Replies: 17
- Views: 26046
Re: A quick question regarding Downhill Supreme
sorry can't give out code belong to others, but i can point you in right direction. Code up above works, it's use to fill RUBE terrain vertices and texCoords for draw method, this code should be inside your update method. _hillKeyPoints should be filled with your rube terrain points. Like stated bef...
- Thu Sep 19, 2013 9:52 pm
- Forum: R.U.B.E discussion
- Topic: ButtonRUBELayer
- Replies: 4
- Views: 8044
Re: ButtonRUBELayer
I got it working for Android, looks good!
Hoping for one scene for screen aspects, but having multiple wont be to bad.
Thanks for the script!
Hoping for one scene for screen aspects, but having multiple wont be to bad.
Thanks for the script!
- Thu Sep 19, 2013 3:57 pm
- Forum: R.U.B.E discussion
- Topic: ButtonRUBELayer
- Replies: 4
- Views: 8044
Re: ButtonRUBELayer
awesome, i should have waited :) Have you tried this on Android? Wondering how i can support multiple screen sizes with RUBE base menu scenes...maybe use same approach as your iOS by displaying different aspect ratio in RUBE. By the way how can i easily add more aspect ratio lines to the RUBE scene?...
- Thu Sep 19, 2013 4:20 am
- Forum: R.U.B.E discussion
- Topic: ButtonRUBELayer
- Replies: 4
- Views: 8044
ButtonRUBELayer
I ported all RubeLayer related files to c++. In ButtonRUBELayer it have 'selector' and 'sceneClassType' my question can i do something similar in c++? i am pretty new to c++ and googling around didnt find anything. bi.selector = NSSelectorFromString( [NSString stringWithUTF8String:bi.selectorName.c_...
- Thu Sep 19, 2013 4:15 am
- Forum: R.U.B.E discussion
- Topic: A quick question regarding Downhill Supreme
- Replies: 17
- Views: 26046
Re: A quick question regarding Downhill Supreme
try, i am using cocos2d-x 2.1.4 c++ if (_nHillKeyPoints >= _toKeyPointI && (prevFromKeyPointI != _fromKeyPointI || prevToKeyPointI != _toKeyPointI)) { // vertices for visible area _nHillVertices = 0; _nBorderVertices = 0; CCPoint p0, p1, pt0, pt1; p0 = _hillKeyPoints[_fromKeyPointI]; //for (...
- Wed Sep 18, 2013 4:18 pm
- Forum: R.U.B.E discussion
- Topic: A quick question regarding Downhill Supreme
- Replies: 17
- Views: 26046
Re: A quick question regarding Downhill Supreme
what problems are you having? which cocos2d version?
- Tue Sep 17, 2013 6:22 pm
- Forum: R.U.B.E discussion
- Topic: A quick question regarding Downhill Supreme
- Replies: 17
- Views: 26046
Re: A quick question regarding Downhill Supreme
great, thanks guys! EDIT: vkreal how did you dump your vertices to hillVertices and hillTexCoords? did you save them as ccVertex2F? I just did same as Ray's tutorial explains about applying textures under a sine curve. instead of sine i just use vertices from RUBE. You just want draw visible sectio...
- Tue Sep 17, 2013 6:15 pm
- Forum: R.U.B.E discussion
- Topic: smooth terrain
- Replies: 19
- Views: 32472
Re: smooth terrain
ifMike, Like iforce2d said, all you need to do is adapt Ray's tutorial to RUBE vertices instead of the sine curves. cocos2d-x 2 use opengl 2.0 which you would need to fix. I posted the fixed somewhere on this forum. I can't provide any code samples since i am way from home. EDIT: glVertexAttribPoint...
- Tue Sep 17, 2013 6:03 am
- Forum: R.U.B.E discussion
- Topic: Creating Menus in RUBE
- Replies: 13
- Views: 19738
Re: Creating Menus in RUBE
Awesome Youtube! Where can I find the sample menus code you use in the video? I tried downloading sampleLoaders and didn't see it.
Thanks!
Thanks!
- Mon Sep 16, 2013 5:24 pm
- Forum: R.U.B.E discussion
- Topic: A quick question regarding Downhill Supreme
- Replies: 17
- Views: 26046
Re: A quick question regarding Downhill Supreme
here's what i use to draw terrain from RUBE in opengl 2
glVertexAttribPointer(kCCVertexAttrib_Position, 2, GL_FLOAT, GL_FALSE, 0, _hillVertices);
glVertexAttribPointer(kCCVertexAttrib_TexCoords, 2, GL_FLOAT, GL_FALSE, 0, _hillTexCoords);
glDrawArrays(GL_TRIANGLE_STRIP, 0, (GLsizei)_nHillVertices);
glVertexAttribPointer(kCCVertexAttrib_Position, 2, GL_FLOAT, GL_FALSE, 0, _hillVertices);
glVertexAttribPointer(kCCVertexAttrib_TexCoords, 2, GL_FLOAT, GL_FALSE, 0, _hillTexCoords);
glDrawArrays(GL_TRIANGLE_STRIP, 0, (GLsizei)_nHillVertices);