Quick Links: Download Gideros Studio | Gideros Documentation | Ultimate Guide | Gideros Development Center
Code snippets - Gideros Forum

Code snippets

Everything that you can plug into your app without changing much or at all.
Discussion
Started By
Replies
Views
Most Recent
Button class is (multitouch)
my advanced version: --[[ class button Usage: ------------------------------------ local pause = Button.new(Bitmap.new(Texture.new("img/gui_48.png"))) stage:addChild(pause) pause:addEventListener("clickDown", function(e) e:stopPropagation() knopka:play() end) pause:addEventListener("clickUP", function(e) e:stopPropagation() knopka:play() end) ------------------------------------- ]] Button = gideros.class(Sprite) function Button:init(upState) self:addChild(upState) self:addEventListener(Event.TOUCHES_BEGIN, ...
1
29
Beautiful Gradients on Gideros
Hi folks! I'm working on a script which you can test in this link: https://github.com/HubertRonald/Gradient It's still in ...
15
187
Pulsing rainbow glow effect
Another shader I've just made and which might be useful below. It creates an animated ...
5
57
Possible Gideros Splash Screen
Recently there has been some discussion about how to grow the Gideros community. To me ...
7
241
Radial blur effect class
Here is a quick lua class to add a fast-but-not-perfect blur effect to any sprite ...
10
212
New Lua enhancements
I've added a multi-dimensional array indexing with comma syntax patch by Mark Fieldman. It modifies the ...
Answered
28
168
How to create a RESTful API using Node.js
I'm trying to read more about RESTful API usisng node.js and try to using on ...
Question
1
32
Multi-font fonts !
When programming a game you need to pick the right font that matches your game, ...
4
75
xtralife include file and tutorial.
Clan of the Cloud was changed to become xtralife some time ago. It's an open source ...
16
109
Using the < > and > < custom Gideros operators.
The Gideros version of Lua has some extra operators not present in regular Lua. Two of ...
10
87
Unified random number generator
When writing a game it's often useful to be able to get a random number. ...
3
37
RoundedRectangle class
You're welcome. :) RoundedRectangle = Core.class( Path2D ) function RoundedRectangle:init( width,height,radius ) local diameter = radius*2 if width < ...
Question
1
34
tilemap object and tiled tile flip
Hi, [edit, I was totally wrong the first time :) ] I just noticed that TileMap ...
Answered
2
80
Easy text translation
Whilst making RetroStar I decided to improve my text translation routines. I think some ...
1
44
glsl syntax highlighting in zerobrane studio
i missed syntax highlighting of glsl files in zerobrane studio. after asking @paulclinger, there is ...
1
16
Retro 8 bit palette sprites!
I wondered if there was an easy way to make paletted sprites - as used ...
8
126
Simple swipe detection library
Hi, in my most recent project I needed to use simple swipes (4 and 8 ...
Answered
3
48
Cool glslEditor
Hi everyone, I just see it and I think it is cool for us to learning ...
2
60
MOUSE.ROLL event
Hi everyone (always happy to be back here each 3 years... :D) ! I'm 'working' ...
Answered ✓
3
41
Simple Log Window Class
Hi all. While getting noobhub (http://giderosmobile.com/forum/discussion/4293/noobhub-free-opensource-multiplayer-and-network-messaging-for-gideros-coronasdk#Item_45) to work as a chat system I made this ...
14
235
Work In Progress: 3D Scene display
Just a quick demo of my latest work on 3D support for Gideros: This demo ...
5
159
Bunnymark improvements
Hi Gideroseans, I am still learning a lot about Gideros and wondered about best practices on ...
Answered ✓
12
80
Better Button Class?
Here is my take on a generic button class.. --[[ name: ImageButton vers: 1.0.0 desc: ...
1
51
Upcoming background tasks support in Gideros: a quick example
So, suppose you made a game which loads a lot of assets during init, suppose ...
27
324
How to write shader, blurring texture relative some world coordinate
Please help me to write this shader, I read a tons of info about, but ...
Answered ✓
8
95
How to support landscape and portrait games
For android you will need to alter the manifest, change "sensorLandscape" or "sensorPortrait" to "fullSensor". Or, ...
1
52
Using a mask and the new sprite skew commands to make a shadow
I sometimes create a mask of a sprite to have pixel perfect collision detection and ...
7
106
path2d drawCircle() extension
Hi, I made some use of the code from @mertocan (http://giderosmobile.com/forum/discussion/6374/path2d-circle-indicator/p1) and extracted the drawCircle ...
12
184
Alpha Particle Effect
Hi, I created a simple class for particle animation. I wanted to share in the event ...
4
93
How to implement a queue using Lua
Hi all, Here's another example of a classic data structure using OOP: Queue = Core.class() function Queue:init(list) ...
13
285