It looks like you're new here. If you want to get involved, click one of these buttons!
<pre> require "box2d" application:setScaleMode("stretch") application:setFps(60) application:setBackgroundColor(0x000000) b2.setScale(20) -- pixels per metre sprites={} world=b2.World.new(0,9.8) -- x gravity, y gravity bottom=world:createBody({}) ground=b2.EdgeShape.new(-200,320,520,320) -- x1,y1,x2,y2 bottom:createFixture({shape=ground,density=0}) function box(x,y,w,h,c,t) if t==nil then t=1 end local body=world:createBody{type=b2.DYNAMIC_BODY, position={x=x,y=y}} local shape=b2.PolygonShape.new() shape:setAsBox(w/2,h/2) -- w/2,h/2,centre x,centre y,angle body:createFixture{shape=shape, density=1, restitution=0.1, friction=0.3} local sprite = Shape.new() size=w+h size=size/2 sprite:setFillStyle(Shape.SOLID,c,t/size*2) for loop=1,size do div=(1/loop)*size sprite:moveTo(0/div,-h/div) sprite:lineTo((w/1.50)/div,(-h/1.12)/div) sprite:lineTo((w/1.25)/div,(-h/1.25)/div) sprite:lineTo((w/1.12)/div,(-h/1.50)/div) sprite:lineTo(w/div,0/div) sprite:lineTo((w/1.12)/div,(h/1.50)/div) sprite:lineTo((w/1.25)/div,(h/1.25)/div) sprite:lineTo((w/1.50)/div,(h/1.12)/div) sprite:lineTo(0/div,h/div) sprite:lineTo((-w/1.50)/div,(h/1.12)/div) sprite:lineTo((-w/1.25)/div,(h/1.25)/div) sprite:lineTo((-w/1.12)/div,(h/1.50)/div) sprite:lineTo(-w/div,0/div) sprite:lineTo((-w/1.12)/div,(-h/1.50)/div) sprite:lineTo((-w/1.25)/div,(-h/1.25)/div) sprite:lineTo((-w/1.50)/div,(-h/1.12)/div) sprite:endPath() end sprite:setFillStyle(Shape.SOLID,c,t) sprite:beginPath() sprite:moveTo(-w/2,-h/2) sprite:lineTo(w/2,-h/2) sprite:lineTo(w/2,h/2) sprite:lineTo(-w/2,h/2) sprite:endPath() w=sprite:getWidth() h=sprite:getHeight() sprite:setPosition(w/2,h/2) print(w) print(h) print(" ") dest=RenderTarget.new(w,h) dest:draw(sprite) sprite=Bitmap.new(dest) sprite:setAnchorPoint(0.5,0.5) stage:addChild(sprite) sprites[body]=sprite return sprite end count=0 function onEnterFrame(event) local pi=math.pi local pi180=180/pi world:step(1/60,8,3) -- time stepped, volocity count, position count count=count+1 if count%100==0 then box(math.random(0,480),-400,math.random(20,100),math.random(20,100),math.random(0,0xffffff)) end for body,sprite in pairs(sprites) do sprite:setPosition(body:getPosition()) sprite:setRotation(body:getAngle()*pi180) end end stage:addEventListener(Event.ENTER_FRAME,onEnterFrame) |
Likes: dealsnap
Comments
local frame = 0
stage:addEventListener(Event.ENTER_FRAME, function(event)
print(frame) -- < this count is displayed, so it is running!
local r = math.sin(frame * 0.03) * 0.3 + 0.7
local g = math.sin(frame * 0.04) * 0.3 + 0.7
local b = math.sin(frame * 0.05) * 0.3 + 0.7
bmp:setColorTransform(r, g, b, 1)
frame = frame + 1
rt:draw(bmp)
end)
It does count up, so the program is running, but nothing is displayed.
https://deluxepixel.com
https://deluxepixel.com
sorry but S3 is Exynos 4412 (quad-core A9, Mali-400) no tegra 3 like ouya...
www.tntengine.com
There is a possibility that you have old .so and .jar files with your Ouya player. Can you replace them with the .so and .jar files that comes with Gideros installation?
https://deluxepixel.com
Likes: SinisterSoft, atilim
www.tntengine.com
https://deluxepixel.com
My win 8 Game (Ranatan free game) in last 10 days was downloaded only 469 times.
btw i no make promotions. ( so not many peoples know about my game.
i'm also curios about Ouya market.
www.tntengine.com
http://www.giderosmobile.com/forum/discussion/comment/27171#Comment_27171
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
My experience with GMS is good, very good.
as you know i love gideros and his team (talent people, great and i mean really great support).
so..
i used gms mainly for publish on windows 8 maket. and i coded ranatan in very short time. performances are good (very good) and i have ranatan running at full speed on android, iphone,osx linux and winphone 8 with no code change.
(i can't publish on other store cause win8 compo... until 1^st september).
btw gms is a little bit BUGGED; but i know it's a big project so... (every new release is better anyway). and now with yyc (native compiler) and shaders it's very very intresting.
what do you mean when you say: :-/
www.tntengine.com
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
ah ok. understood now.
you can publish with your name.
no obligation on yoyo team.
www.tntengine.com