Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
Gideros 2016.10 released! - Gideros Forum

Gideros 2016.10 released!

john26john26 Maintainer
edited January 2017 in Announcements
We are pleased to announce the release of Gideros 2016.10. This release has been a little delayed due to extensive testing and rebuilding needed but as you can see there are many changes and many new APIs which we hope will be useful. Here are the changes and additions we have made:

NEW
Box2D particle contact events:
"BEGIN_CONTACT_PARTICLE", "END_CONTACT_PARTICLE", "BEGIN_CONTACT_PARTICLE2", "END_CONTACT_PARTICLE2"

Box2D ParticleSystem methods:
  • destroyParticles
  • getParticleCount
  • getParticleGroupList
  • containsParticle
Viewport:lookAt(eyex, eyey, eyez, targetx, targety, targetz, upx, upy, upz) -- set up the transform matrix of this viewport taking eye and target positions and up direction as arguments

JS.eval(code) -- execute arbitrary Javascript code on HTML5 platform

Mesh.clearTexture([slot=0]) -- clear texture

Matrix:invert()
Matrix:transformPoint()

Particles methods:
  • setParticleTag(i, tag) -- set the tag associated to the given particle
  • getParticleTag(i) -- returns the tag associated to the given particle
  • setPaused(isPaused) -- pause or resume this particle system
  • isPaused() -- returns wether this particle system is paused or not
  • getParticles([set, tag]) -- retrieve particles states of this system
Sprite methods:
  • setSkewX(kx), getSkewX(), setSkewY(ky), getSkewY(), setSkew(kx, ky), getSkew() -- new skew (aka "shear") transformation effect, kx and ky are numbers in -90..+90 degrees range
  • getAnchorPoint(), setAnchorPoint(ax, ay) -- to relatively set Sprite center position
  • getClip() --> x, y, w, h
  • Sprite:getWidth(true), Sprite:getHeight(true) -- to get sprite width and height without transformations
  • Sprite.setBlendMode(src, dst) -- support of blend functions:
    Sprite.ZERO, Sprite.ONE, Sprite.SRC_COLOR, Sprite.ONE_MINUS_SRC_COLOR, Sprite.DST_COLOR, Sprite.ONE_MINUS_DST_COLOR, Sprite.SRC_ALPHA, Sprite.ONE_MINUS_SRC_ALPHA, Sprite.DST_ALPHA, Sprite.ONE_MINUS_DST_ALPHA, Sprite.SRC_ALPHA_SATURATE
application:setKeyboardVisibility(visible) -- Android and iOS support native soft keyboard, returns true if platform has soft keyboard

Plugin (ads): Unity framework and gplugin script (Unity only)

Pixel methods allow to replace Bitmap class and more:
  • new(texture, [width = texture width], [height = texture height], [tsx = 1], [tsy = 1], [tx = 0], [ty = 0]) -- additional constructor to create Pixel with texture
  • setTexture([texture], [slot], [matrix]) -- set texture and apply matrix to that texture
  • setTextureMatrix(matrix) -- to apply matrix to it's texture
  • setTexturePosition(x, y)
  • getTexturePosition() --> x, y
  • setTextureScale(sx, sy)
  • getTextureScale() --> sx, sy
  • getDimensions() --> width, height
  • setColor(c1, a1, c2, a2, [angle]) --> set linear gradient with 2 color-alpha pairs and optional angle
  • setColor(c1, a1, c2, a2, c3, a3, c4, a4) --> set gradient with 4 color-alpha pairs (1 pair per vertex)
IMPROVEMENTS
+ new camera format detection for Android Camera plugin

+ loading errors checking on GLSL shader creation

+ Mesh.setTexture(texture, [slot=0]) -- to set additional texture for shaders

+ Shader.TIMER constant to allow passing os.timer() value to shaders without lua intervention

+ Path2D:setSvgPath(...) accepts multiple string/number arguments and concatenates them into one string

+ ads plugin: updatedadmob SDK and APIs, interstitial support preload and refresh when closed and fixed setAlignment issue.

+ improved plugin export commands

BUGFIXES
+ Mesh.getIndex correctly checks for maximum number of indexes

+ events are not dispatched to garbage collected object

+ updated APK export for splash screen disable/bgcolor

+ correct path to 'All plugins' folder (Fix plugins not applied on Mac)

+ Sound.setListenerPosition fix

+ UrlLoader: PUT and POST correctly implemented

+ Gideros Studio: fixed sendFile check to print correct status

+ Fixed timer and particles running while app is suspended

+ gdrexport: fixed filedownloader

+ particles compile on WinRT

+ timer resuming after suspend

+ Mesh with empty arrays on WinRT doesn't crash

+ fixed logcat overflowing and crashing

+ every TextField (with bitmap, cached and uncached fonts) has correct behavior: cached TextField is not blurred at window resize and uncached TextField respects logical scale

+ fixed sample parameter behavior for all TextFields

+ Path2D could crash app

EXAMPLES
"Graphics/MapClown" added
"Audio/Moving sound" added
"3D Horse" updated: lighting added
"Hardware/Keyboard" updated: soft keyboard support added

We hope you enjoy Gideros 2016.10 and look forward to getting your comments here on the forum!

Download Gideros 2016.10
+1 -1 (+16 / -0 ) Share on Facebook
«134

Comments

  • Wow!! That's a lot of new features / fixes. Well done guys.

    Likes: n1cke, hgy29

    +1 -1 (+2 / -0 ) Share on Facebook
  • html export seems to work, great.
    i like the clown examples a lot.
    btw they should be next to each other (now bird anim 3d is inbetween two of them).
    +1 -1 (+3 / -0 ) Share on Facebook
  • That's great!
    :)

    Do you think it's better to use textured Pixel in place of Bitmap?

    Thank you heaps

    Likes: n1cke, hgy29

    +1 -1 (+2 / -0 ) Share on Facebook
  • n1cken1cke Maintainer
    @pie: textured Pixel is better because it's texture will be fitted automatically into it's dimensions (Letterbox mode). This way you don't need to think about texture size. Pixel is also useful for textures in Texture.REPEAT wrap mode: you can adjust texture scale and texture position or use them for background scrolling/zooming effects. Another good thing is each textured Pixel can have it's own color mask with Pixel:setColor method.

    Likes: pie

    +1 -1 (+1 / -0 ) Share on Facebook
  • Yes loving the pixel stuff and will be using it on my next game app after playing with it a bit recently :)

    Good work guys!

    Donated.
    +1 -1 (+5 / -0 ) Share on Facebook
  • john26john26 Maintainer
    Thanks very much for your donation, @MobAmuse. And thanks to everyone else who has donated recently! Your generous contributions keep the whole show on the road!
  • mertocanmertocan Member
    edited November 2016
    There is something wrong with Particles. Can you check particle Clown example. Dots are getting too big.

    BTW. Perfect job!
  • piepie Member
    edited November 2016
    Does this mean that Bitmap has become "obsolete"? :)
    I mean, can you think of some scenario where Pixel could not replace Bitmap?

    My first test with html5 export shows that it's running at 60 fps instead of 30 (as project settings)
    win32 export has the same behaviour (60 fps instead of 30, additional parameters to win32.exe have no effect)
    Everything is fine on "players" windows and android (30 fps as expected)

    On previous release I already had issues on fps, but on my laptop it was following the project setting , nothing changed on the fps count on the other laptop mentioned here: 1200 fps :)

    I also have another issue on win32, the game crashes if I try to draw a Path2d object


    However I love the new features, thank you! :)

    Likes: antix

    +1 -1 (+1 / -0 ) Share on Facebook
  • keszeghkeszegh Member
    edited November 2016
    @mertocan, i also have seen the same, after a while the particles 'blow up' in the particle clown example. this may be a bug indeed.
  • @keszegh yes, Maybe there is a fix for this. Because, StarField example works well.
  • keszegh & mertocan: I coded those demos a couple of versions ago. I'll revisit them and see what's up. Glad you like the clown stuff though - I tried to keep them short so they don't get to complicated.
  • I think it is not about your code. I am also using particle in my game. It is also the same. Something is wrong about it. Actually, thats why I checked Particle samples. Thanks.
  • Export html5 is working correctly, I love you all! :)
  • So yes, is Bitmap now obsolete? If pixels are faster I would begin converting all of my Bitmap based classes to Pixels.

    However, I'm still on 2016.6 because I have no indication if newer versions are ready for production code and I don't want to release a product that has bugs (ones that aren't of my own making anyway).
    Follow me on FaceBook Check out my DevBlog, my GitHub, and try my games...
    Falling Animals | Breaky Wall | Exetor | Mini Putt Golfing | Ninja Fruit Master
  • n1cken1cke Maintainer
    @antix: textured Pixel has same speed as Bitmap. Bitmap has little different behavior and supports TextureRegions so we cannot make it obsolete.

    Likes: antix, pie

    +1 -1 (+2 / -0 ) Share on Facebook
  • @n1cke thanks. I'll stick with trusty old Bitmap for now then since I use TextureRegions extensively. The new features of Pixel are very cool and I will get to try them sometime I hope.
    Follow me on FaceBook Check out my DevBlog, my GitHub, and try my games...
    Falling Animals | Breaky Wall | Exetor | Mini Putt Golfing | Ninja Fruit Master
  • i guess pixel is more like a squared mesh.
  • @mertocan, I think that now the particles are scaled correctly, but before they may not have been.
  • simwhisimwhi Member
    edited November 2016
    When I do a clean export with the ads plugin included there are no dependencies in my gradle file. Which version do I need to add for admob?
  • mertocanmertocan Member
    edited November 2016
    @SinisterSoft So, How can I fix the clown particle sample?
  • hgy29hgy29 Maintainer
    Hi @simwhi,

    Ads plugin should be integrated into your android studio project, but Admob will not, you have to add admod manually as before. Currently, only UnityAds can be integrated automatically
  • Hi @hgy29

    The release notes refer to updated Admob SDK and APIs. Which version of Admob do I need to add as a dependency?
  • The original Pixel class was very good. The new one (whilst fantastic) seems to be totally different. The old syntax to create a new pixel was...
    Pixel.new([color, alpha, width, height])
    But the new syntax is...
    Pixel.new(texture [, width, height, texture_scale_x, texture_scale_y, texture_x, texture_y])
    Is it even possible to make the old style pixel now? Or are we forced to add textures and stuff now?

    I ask because I'm making extensive use of the Pixel class in my new game. If you look at the screen shot you can see the radar, which uses a lot of Pixels. So I am wondering if I upgrade to the latest Gideros will I have to re code a whole heap of stuff?
    exetor_16_11_2016.png
    960 x 640 - 174K
    Follow me on FaceBook Check out my DevBlog, my GitHub, and try my games...
    Falling Animals | Breaky Wall | Exetor | Mini Putt Golfing | Ninja Fruit Master
  • The existing one will still work, just use 1 to 4 parameters (I think!)....

    Likes: antix

    +1 -1 (+1 / -0 ) Share on Facebook
  • @SinisterSoft why Particles over Pixels? or is that in its self a stupid question? ;)
    Follow me on FaceBook Check out my DevBlog, my GitHub, and try my games...
    Falling Animals | Breaky Wall | Exetor | Mini Putt Golfing | Ninja Fruit Master
  • Particles are MUCH, MUCH faster... have one particle sprite and add everything to it.

    btw, here is the fixed clown particles demo, this time with square particles...
    (just replace the code in the demo)
    local clown=Bitmap.new(Texture.new("clown.png"))
    local w,h=clown:getWidth(),clown:getHeight()
     
    local render=RenderTarget.new(w,h)
    render:clear(0,0)
    render:draw(clown)
     
    local particlesClown=Particles.new()
     
    local p
    for y=0,h-1 do
    	for x=0,w-1 do
    		local c,a=render:getPixel(x,y)
    		if a>0 then
    			p=particlesClown:addParticles((-w*5)+x*10,(-h*5)+y*10,-9,0)
    			particlesClown:setParticleColor(p,c,a)
    		end
    	end
    end
     
    particlesClown:setPosition(400,400)
    particlesClown:setScale(2)
    stage:addChild(particlesClown)
     
    local count=0
    local pos=0
    function gameLoop(e)
    	particlesClown:setRotation(particlesClown:getRotation()+2)
    	count=count+1
    	if count>300 then
    		pos=pos+1
    		if pos<=p then
    			particlesClown:setParticleSpeed(pos,(math.random()-0.5),math.random()-0.5,5)
    		end
    	end
    end
     
    stage:addEventListener(Event.ENTER_FRAME,gameLoop)</pre>
  • @SinisterSoft, okay "MUCH MUCH Faster" explains it. I'll revamp some code then :)

    Likes: SinisterSoft

    Follow me on FaceBook Check out my DevBlog, my GitHub, and try my games...
    Falling Animals | Breaky Wall | Exetor | Mini Putt Golfing | Ninja Fruit Master
    +1 -1 (+1 / -0 ) Share on Facebook
  • mertocanmertocan Member
    edited November 2016
    @SinisterSoft, @john26
    There are still some issues on Particle.

    I runned this code about 20 times. Sometimes, Particles are not added to stage or added to wrong places. Can you also try it?

    ParticleFactory Class
    ParticleFactory = Core.class(Sprite)
     
    function ParticleFactory:init(config)
     
    	self.conf = {
    		autoStart = true,
    		width = 7,
    		height = 7,
    		density = 100,
    		texture = "Assets/Images/rating.png",
    		particleColor = 0xAAAA00,
    		alphaSpeed = 0.03,
    		sizeSpeed = 0.03,
    		sizeMin = 10,
    		sizeMax = 19,
    		rotationMin = 5 ,
    		rotationMax = 10,
    		speedMin = 10,
    		speedMax = 200
    	}
     
    	if config then
    		for key,value in pairs(config) do
    			self.conf[key]= value
    		end
    	end
     
    	self.count = self.conf.density * self.conf.height * self.conf.width * 0.002
     
    	self.started = false
     
    	if self.conf.autoStart == true then
     
    		self:start()
     
    	end
    end
     
    function ParticleFactory:createParticles()
     
    	self.particles = Particles.new()
     
    	local p
    	for y=0,self.count do
    		local angle = math.random()*math.pi*2;
    		local length =  math.random();
    		local xPos = math.cos(angle) * (self.conf.width/2) *length
    		local yPos = math.sin(angle) * (self.conf.height/2) *length
     
    		--Todo speed config
    		p= self.particles:addParticles(xPos,yPos,math.random(self.conf.sizeMin*10,self.conf.sizeMax*10) / 10)
     
    		local speedX = (math.random(self.conf.speedMin,self.conf.speedMax) / 100) * (xPos/ math.abs(xPos)) 
    		local speedY =  (math.random(self.conf.speedMin,self.conf.speedMax) / 100) * (yPos/ math.abs(yPos))
     
    		self.particles:setParticleTtl(p,10000)
    		self.particles:setParticleSpeed(p,speedX,speedY, math.random(self.conf.rotationMin,self.conf.rotationMax) / 10)
    		self.particles:setParticleColor(p,self.conf.particleColor,math.random(5,10)/10)
     
    	end
     
    	--self.particles:setTexture(Texture.new(self.conf.texture,true))
    	self:addChild(self.particles)
     
    end
     
     
    function ParticleFactory:start()
     
    	self:createParticles()
     
    	self:addEventListener(Event.ENTER_FRAME,self.onEnterFrame,self)
    	self.started = true
     
    end
     
    function ParticleFactory:onEnterFrame(e)
     
    	local canRemove = true
    	for y=1,self.count+1 do
    		local color,alpha = self.particles:getParticleColor(y)
    		alpha= alpha - (self.conf.alphaSpeed * e.deltaTime * 60)
    		self.particles:setParticleColor(y,color,alpha)
    		--self.particles:setParticleSize(y,self.particles:getParticleSize(y)-self.conf.sizeSpeed)
     
    		if alpha > 0 then
    			canRemove=false
    		end
     
    	end
     
    	if canRemove then
    		self:removeEventListener(Event.ENTER_FRAME,self.onEnterFrame,self)
    		self.particles:removeParticles()
    		self:removeFromParent()
    		self = nil
    	end
     
    end
     
     
    function ParticleFactory:getWidth()
    	return self.conf.width
    end
     
    function ParticleFactory:getHeight()
    	return self.conf.height
    end

    Main.lua
    local conf = {width=400,height=1,density = 300,sizeMin=13,sizeMax= 24,alphaSpeed=0.02,speedMax=65}
     
     
     
    local fac = ParticleFactory.new(conf)
    fac:setPosition(fac:getWidth()/2,299)
    fac:setRotation(30)
    stage:addChild(fac)
  • + ads plugin: updatedadmob SDK and APIs, interstitial support preload and refresh when closed and fixed setAlignment issue.
    I'm having problems with interstitial ads for admob. What has changed exactly? My code used to work fine before.

    I already use ad:loadAd(adType)

    Is this still pre-load?
Sign In or Register to comment.