<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Game &amp;amp; application design — Gideros Forum</title>
        <link>https://forum.giderosmobile.com/</link>
        <pubDate>Sun, 15 Mar 2026 08:18:21 +0000</pubDate>
        <language>en</language>
            <description>Game &amp; application design — Gideros Forum</description>
    <atom:link href="https://forum.giderosmobile.com/categories/game--application-design/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>React Physics 3D</title>
        <link>https://forum.giderosmobile.com/discussion/8366/react-physics-3d</link>
        <pubDate>Wed, 16 Dec 2020 07:20:18 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>MoKaLux</dc:creator>
        <guid isPermaLink="false">8366@/discussions</guid>
        <description><![CDATA[Let me create this post to share my progress with gideros and react physics 3d and animations.
<b>What I have done:</b>
-imported a 3d model from mixamo to blender to gideros
-animated it in gideros
-built a level with Tiled (from a top down view perspective)
-you control the player with arrow keys

<b>What is left:</b>
-"writing" a class for each type of shape I would like (plane, cube, circle, ...)
-"writing" a class to import obj or fbx
-adding other characters (why always enemies)
-I don't want to make it an FPS (I am a peaceman)
-but he needs to throw something (pebbles?)
-...
-always having fun  :) 

I try to keep GH up to date: https://github.com/mokalux/gideros-3D-FP
<img src="http://forum.giderosmobile.com/uploads/editor/bf/f4694lj8geuq.png" alt="" />
]]>
        </description>
    </item>
    <item>
        <title>What games are you guys building today?</title>
        <link>https://forum.giderosmobile.com/discussion/8831/what-games-are-you-guys-building-today</link>
        <pubDate>Wed, 03 Dec 2025 17:20:02 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>zeroexu</dc:creator>
        <guid isPermaLink="false">8831@/discussions</guid>
        <description><![CDATA[I'm thinking about getting back into game development, and I'm looking to find out if there are other developers here making games and if you're finishing them. It's really tough being a solo developer, and I was hoping to hear about the challenges you face every day.
Best Regards]]>
        </description>
    </item>
    <item>
        <title>Pseudo-3d</title>
        <link>https://forum.giderosmobile.com/discussion/2687/pseudo-3d</link>
        <pubDate>Mon, 18 Feb 2013 09:32:42 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>jdbc</dc:creator>
        <guid isPermaLink="false">2687@/discussions</guid>
        <description><![CDATA[Hi all.

After reading a post about how to develop a classic OutRun game from http://codeincomplete.com/posts/2012/6/23/javascript_racer_v1_straight/, I have developed part of this code to Gideros / lua.

It works smoothly in Gideros Player but really slow in my Samsung Galaxy Ace. I guess main problem is that a simple port always redraws again all polygons of the road in every frame as actually sample javascript code does.

Better solution is to build an static set of array of polygons and change only color and textures. 

Any suggestions or someone who had try similar issue? I attach my current testing Gideros project.
]]>
        </description>
    </item>
    <item>
        <title>3D Animation</title>
        <link>https://forum.giderosmobile.com/discussion/7868/3d-animation</link>
        <pubDate>Fri, 08 Nov 2019 16:03:14 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>hgy29</dc:creator>
        <guid isPermaLink="false">7868@/discussions</guid>
        <description><![CDATA[I have been working on amiated 3D models for Gideros, and I am please to say that IT WORKS!
I used fbxconv tool from libgdx to convert my fbx models into json, then made a loader in lua to parse that json file, create meshes and run the animation thanks to a dedicated shader.

The models are from Kenney character pack: https://kenney.itch.io/kenney-character-assets

https://youtu.be/kUm2cd6Zcxo
]]>
        </description>
    </item>
    <item>
        <title>BUMP (CBUMP) ECS PLATFORMER</title>
        <link>https://forum.giderosmobile.com/discussion/8611/bump-cbump-ecs-platformer</link>
        <pubDate>Tue, 06 Dec 2022 04:33:07 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>MoKaLux</dc:creator>
        <guid isPermaLink="false">8611@/discussions</guid>
        <description><![CDATA[Hope you are all doing well  :) 
In this thread I will try to keep up making yet another platformer using awesome Gideros  o:) 
First of all a demo link:
<b>https://mokalux.itch.io/gideros-tests</b>
So far it has:
- cbump (gideros cbump is working fine, the issues I had before was between the keyboard and the chair  :p )
- ECS, following my hero (<b>rrraptor</b>) I tried using tiny ECS (I am still learning it!)
- <b>rrraptor's GCam</b>
- coyote time and a kind of key buffering for jumping (I used a dirty trick for this one as they were many challenges)
- parallax bgs
- variable jump height
- ladders
- coins
- 1 type of nme
- no delta time (which seems good)
- hide nmes and coins when not on screen (performance?)
- passthrough platforms
- moving platforms
- mobile controls
- ...

<b>I am quite happy with the result</b>  ;) .

<b>TODO</b>:
- sounds
- killing the player
- score
- refining the code
- add a boss
- wall jump?
- dashing?
- ...

In this thread I will try to explain how I did things, you can ask any questions as well  ;) 
I will post to <b>GH </b>when I am happy with the code structure (<b>God's willing</b>).

<b>Viva Gideros Studio  </b>&lt;3 ]]>
        </description>
    </item>
    <item>
        <title>Just released my game Block Combo Crunch!</title>
        <link>https://forum.giderosmobile.com/discussion/8795/just-released-my-game-block-combo-crunch</link>
        <pubDate>Mon, 17 Mar 2025 07:27:36 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>errorpi</dc:creator>
        <guid isPermaLink="false">8795@/discussions</guid>
        <description><![CDATA[<p>After almost a month of struggle on Google Play (closed testing for 14 days, reviews after reviews on each update), my game is finally listed! Inspired by 2048, and the block games trend, I added some unique twists like puzzles and combos. Thank Gideros for another completed project. &lt;3&lt;/p&gt;
</p><p>Here's the Google Play link: <a rel="nofollow" href="https://play.google.com/store/apps/details?id=com.errorpi.blockcrunch" target="_blank">https://play.google.com/store/apps/details?id=com.errorpi.blockcrunch</a></p>

<img src="https://play-lh.googleusercontent.com/I7qghLcDUdU_B-KUOli_zMoA8J1bH75pQAyxQZpdG_LT1iQj7zUBkEgwMqGOee7jag=w2560-h1440-rw" width="200" alt="image" />

<img src="https://play-lh.googleusercontent.com/cAwG4QR_pqXl_0eNGfpWZRBt1Y6IB0X7s5m02qwmp0gB7l_sZaDDyW0Yc-GP3sd37w=w2560-h1440-rw" width="200" alt="image" />

<img src="https://play-lh.googleusercontent.com/vkKMJ1TZMl-jsjdsf0d52O7CINlHfvZ1JJy9uJb1GSGaqMWIKAcjYzgO1XWf0bsiV1WX=w2560-h1440-rw" width="200" alt="image" />
]]>
        </description>
    </item>
    <item>
        <title>Beat'em up</title>
        <link>https://forum.giderosmobile.com/discussion/8724/beatem-up</link>
        <pubDate>Wed, 27 Dec 2023 17:37:23 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>MoKaLux</dc:creator>
        <guid isPermaLink="false">8724@/discussions</guid>
        <description><![CDATA[Hi guys, I have always dreamt of making a street fighter game!
After just <b>a couple of days</b> it turned out to be the beginning of a beat'em up  :p 
The project started almost from scratch and putting together some code from the wiki  ;) 

Some screenshots:
<img src="https://forum.gideros.rocks/uploads/editor/cf/8pavcodczr9p.png" alt="" />
<img src="https://forum.gideros.rocks/uploads/editor/o3/woa99mxjecmg.png" alt="" />

A link to try the proto in your browser  :) 
<b>https://mokalux.itch.io/gideros-beatem-up</b>

Let me share the very rough and dirty prototype that I have. I am using tiny-ecs. I followed sir <b>rrraptor</b>  steps and tried ecs in Gideros and now I am hooked  o:) 

<b>ECS speaks to me because you have a problem, you make a system, problem solved, I love ECS</b>.

Have a nice one!]]>
        </description>
    </item>
    <item>
        <title>Creating Cut Scenes</title>
        <link>https://forum.giderosmobile.com/discussion/2344/creating-cut-scenes</link>
        <pubDate>Sat, 29 Dec 2012 00:15:34 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>BigWinston</dc:creator>
        <guid isPermaLink="false">2344@/discussions</guid>
        <description><![CDATA[Hey guys,

What do you guys use for creating cut-scene movies?  This is a completely new world to me and I have no idea on where to start...

Obviously, I will want to use the complete cut-scene's within a Gideros application for intro animations or game complete animations.

Thanks!]]>
        </description>
    </item>
    <item>
        <title>ImGui new thread</title>
        <link>https://forum.giderosmobile.com/discussion/8399/imgui-new-thread</link>
        <pubDate>Tue, 16 Mar 2021 01:45:03 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>MoKaLux</dc:creator>
        <guid isPermaLink="false">8399@/discussions</guid>
        <description><![CDATA[dear giderians, I would like to start a new thread regarding imgui and its implementation in gideros. The old imgui thread is a bit outdated imho. Let's start fresh and I will try to update the wiki as we gather more tips and use case on how to use imgui in gideros.

<b>imgui original thread starts at: http://forum.giderosmobile.com/discussion/comment/63655/#Comment_63655
</b>
<b>Thank you  :) </b>]]>
        </description>
    </item>
    <item>
        <title>Responsive ui with imgui.</title>
        <link>https://forum.giderosmobile.com/discussion/8721/responsive-ui-with-imgui</link>
        <pubDate>Wed, 20 Dec 2023 12:46:59 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>giovifav</dc:creator>
        <guid isPermaLink="false">8721@/discussions</guid>
        <description><![CDATA[As mentioned in a previous post I am creating a password manager with gideros and imgui. I am trying to figure out how to create a GUI that is adaptable for both desktop and mobile. For now I have selected a very high resolution 16/9 portrait. Do you have any advice for how to manage a non-game related GUI that is scalable and resizable?
Thanks!]]>
        </description>
    </item>
    <item>
        <title>Jumper : (Very) Fast Pathfinder for 2D Grid-Based games</title>
        <link>https://forum.giderosmobile.com/discussion/1081/jumper-very-fast-pathfinder-for-2d-grid-based-games</link>
        <pubDate>Fri, 01 Jun 2012 06:58:45 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>Roland_Y</dc:creator>
        <guid isPermaLink="false">1081@/discussions</guid>
        <description><![CDATA[Jumper is a pathfinding library designed for uniform cost 2D grid-based games.
It is written in pure Lua and features a mix of <a rel="nofollow" href="http://en.wikipedia.org/wiki/A*_search_algorithm">A-star</a>, <a rel="nofollow" href="http://en.wikipedia.org/wiki/Binary_heap">Binary-Heaps</a> and <a rel="nofollow" href="http://harablog.wordpress.com/2011/09/07/jump-point-search/">Jump Point Search</a> algorithm.
Indeed, it is extremely simple to use, lightweight, and works really fast! 
<strong>Jumper</strong> can fit in games where pathfinding is needed.

<strong>Example</strong> :

<code>
local Jumper = require('Jumper.init')
-- A collision map : 0 for walkable tiles, 
-- non-zero for unwalkable tiles
local map = {
	{0,1,1,0},
	{0,1,1,0},
	{0,0,0,0},
}

local pather = Jumper(map,0) -- Inits our pathfinder
pather:setAutoFill(true) -- Turns on autoFill feature
local startX, startY = 1,1 -- starting node
local endX, endY = 4,1 --end node
local path, dist = pather:getPath(startX, startY, endX, endY) -- gets the path
-- Output it!
if path then 
	print(('From [%d,%d] to [%d,%d] : Length: %.2f'):format(startX, startY, endX, endY, dist))
	table.foreach(path, function(i,node) 
		print(('Step %d: x = %d, y = %d'):format(i,node.x,node.y)) 
	end)
else
	print(('From [%d,%d] to [%d,%d] : No Path found!'):format(startX, startY, endX, endY))
end
</code>

The output:
<code>
main.lua is uploading.
Uploading finished.
From [1,1] to [4,1] : Length: 5.83
Step 1: x = 1, y = 1
Step 2: x = 1, y = 2
Step 3: x = 2, y = 3
Step 4: x = 3, y = 3
Step 5: x = 4, y = 2
Step 6: x = 4, y = 1
</code>

Find it on Github, with Documentation, usage examples, and visual demos!
Find attached to this post a sample project with Gideros featuring the above snippet.
Hope you like it!

<strong>Page</strong>: <a rel="nofollow" href="http://yonaba.github.com/Jumper/">Jumper</a>
<strong>Github</strong>: <a rel="nofollow" href="http://github.com/Yonaba/Jumper">Jumper</a>]]>
        </description>
    </item>
    <item>
        <title>Gideros UI and layouts (WidgetKit) Thread</title>
        <link>https://forum.giderosmobile.com/discussion/8703/gideros-ui-and-layouts-widgetkit-thread</link>
        <pubDate>Sun, 17 Sep 2023 05:57:57 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>vitalitymobile</dc:creator>
        <guid isPermaLink="false">8703@/discussions</guid>
        <description><![CDATA[
Hello everyone, while working on UI/UX for games, I stumbled upon the "Library/ui" folder which contains a variety of components like Buttons, Text, ScrollList, DropDown, and even a Calendar. So, I'm starting this thread hoping to engage with you all about Gideros' GUI system. I believe many of you might be interested as well. Please share any examples and questions related to this built-in UI and Layout system. I find its architecture and code quite lightweight, and with comprehensive documentation and examples, it has great potential! 

@hgy29  I hope that when you have the time, you will post some small examples and tutorials about this system so that everyone can use it and make it more popular!
I now start reading setLayouttConstraints/ setLayoutParameters in https://wiki.gideros.rocks/index.php/Sprite:setLayoutConstraints
]]>
        </description>
    </item>
    <item>
        <title>selectable text in app?</title>
        <link>https://forum.giderosmobile.com/discussion/8711/selectable-text-in-app</link>
        <pubDate>Fri, 27 Oct 2023 19:09:31 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>pie</dc:creator>
        <guid isPermaLink="false">8711@/discussions</guid>
        <description><![CDATA[Hi I'd like the user to select some app generated text and copy it to his device clipboard. The only way I can think of doing it is through imgui inputText wih readonly flag, but using imgui only for this feature seems a bit overkill. 
Is there any other way I am not aware to do this in gideros?

Thank you! :)]]>
        </description>
    </item>
    <item>
        <title>I made a simple canvas class with undo and redo function that can be used for simple doodling</title>
        <link>https://forum.giderosmobile.com/discussion/8709/i-made-a-simple-canvas-class-with-undo-and-redo-function-that-can-be-used-for-simple-doodling</link>
        <pubDate>Thu, 26 Oct 2023 07:34:33 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>koeosstudio</dc:creator>
        <guid isPermaLink="false">8709@/discussions</guid>
        <description><![CDATA[
I attached the demo project.
Please have a try and tell me some suggestion :)
<img src="https://forum.giderosmobile.com/uploads/editor/90/iqdcant14zci.gif" alt="" />
]]>
        </description>
    </item>
    <item>
        <title>I made a canvas class for simple doodling</title>
        <link>https://forum.giderosmobile.com/discussion/8708/i-made-a-canvas-class-for-simple-doodling</link>
        <pubDate>Thu, 26 Oct 2023 07:33:01 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>koeosstudio</dc:creator>
        <guid isPermaLink="false">8708@/discussions</guid>
        <description><![CDATA[
I made a simple canvas class with undo and redo function that can be used for simple doodling.
I attached the demo project.

Please have a try and tell me some suggestion :)
<img src="https://forum.giderosmobile.com/uploads/editor/90/iqdcant14zci.gif" alt="" />
]]>
        </description>
    </item>
    <item>
        <title>execute a bunch of code somehow extending imgui button?</title>
        <link>https://forum.giderosmobile.com/discussion/8705/execute-a-bunch-of-code-somehow-extending-imgui-button</link>
        <pubDate>Thu, 05 Oct 2023 13:43:48 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>pie</dc:creator>
        <guid isPermaLink="false">8705@/discussions</guid>
        <description><![CDATA[Hi, I guess there might not be an easy way to do this but many people are smarter than me, so maybe there is:

I have a thousand imgui buttons in my app, and I'd like to execute a small piece of code for each one of them to give some acoustic feedback when they are pressed.

The basic (not smart) idea is to wrap my sound:play() code inside a single playfeedback() function and call it inside each "button actions". 

However, since they are many already, and adding the same piece of code is time consuming and prone to errors I was wondering if it might be possible to extend the imgui button class through lua to do it in one simple passage.

It would be easy if imgui:buttons were Core.class object but with imgui I am not sure if this is feasible and how, without touching imgui itself..

Thank you :smile: ]]>
        </description>
    </item>
    <item>
        <title>Will it make sense to pack multiple files together? How?</title>
        <link>https://forum.giderosmobile.com/discussion/8698/will-it-make-sense-to-pack-multiple-files-together-how</link>
        <pubDate>Mon, 14 Aug 2023 13:00:28 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>pie</dc:creator>
        <guid isPermaLink="false">8698@/discussions</guid>
        <description><![CDATA[Hi, 
my question rises from a thought I had about my app: 

I'd like to add a lot of sound files (around 5000, but they could be more) and I am worried that I would eventually reach some <i>maximum number of files allowed</i> cap: see here https://stackoverflow.com/a/2652238/20463613

My first thought was to split them in subdirectories, but I wonder if there is a better way to handle that which might even be of easier maintenance for the future and "download friendly". 

If I could "pack" like tarball my sound files I will have to handle only one "soundpack" file, and I could easily have this single file available as "additional downloadable content" for the users who are running low on storage space. (my app is less than 10mb, but with sounds it goes up to 50mb and counting).

Unfortunately my knowledge stops here: 
Do you think it's worth thinking about this potential issue or I am just being too much pessimistic? :)

If I am making sense: how could I build a pack of files, keeping an index, so that when my app needs "SOUND00345" it can read directly this sound from the soundpack file based on its index? I guess that this is almost the same that the filesystem does, so maybe I am just thinking about redoing something that already is taken care of..  :# 

I've found an untar pure lua library here: https://github.com/mimetic/tar.lua which works fine in gideros, but the only way to extract a single file from the archive is to parse it all until it finds the file/files inside the archive, and this might be counterproductive if the archive is big because it certainly takes time..

Any idea/suggestion is appreciated

Thank you :)

]]>
        </description>
    </item>
    <item>
        <title>how to get the path/directory where the app resides on windows?</title>
        <link>https://forum.giderosmobile.com/discussion/8694/how-to-get-the-path-directory-where-the-app-resides-on-windows</link>
        <pubDate>Tue, 25 Jul 2023 13:05:39 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>pie</dc:creator>
        <guid isPermaLink="false">8694@/discussions</guid>
        <description><![CDATA[Hi I don't know if it's possible: 
assume to have a gideros QT/win32 export in 
<b>C:\MyApp\</b>
Is there a way for the app to know that it is there? 
It might be easier to collect files generated by the app: ie. saving logs in <b>C:\MyApp\Logs\</b> instead of looking for the documents (|D|) directory, making the apps <i>portable</i>.

thank you]]>
        </description>
    </item>
    <item>
        <title>need help improving performance of a real time game</title>
        <link>https://forum.giderosmobile.com/discussion/7545/need-help-improving-performance-of-a-real-time-game</link>
        <pubDate>Tue, 15 Jan 2019 21:13:03 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>pie</dc:creator>
        <guid isPermaLink="false">7545@/discussions</guid>
        <description><![CDATA[Hi, it's the first time I am in this situation and I am not sure if my approach is the right one:

I have some guys roaming across the stage, who are being targeted by turrets as in any tower defence game.

A bit of overall lag when they're many would be acceptable, but at some point I lose control of their "status" (like burn, or freeze).
I suppose due to the lag because when they are only a few it's not an issue.

I tried keeping everything simple: 
almost everything is handled by a single enterframe function in the level file, that sets a "tick" each second (frame based) and changes values. 
Later in the same function those values are read, and with a bunch of conditions based on these values things happen.
I am now playing with profiler to lighten the heaviest functions, but I think I used all the tricks I know: from localizing anything to loading the fewest texturepacks. 
I still see some potential by pooling status sprites (everything else is already in a pool) but I am not sure it would be enough.

To make a practical example: every actor has a property to define its status, which is a table made by 2 entries: the first one is a counter that starts from 0 and is increased on every new "tick", the second one is the limit it should reach before annihilation (this is also handled by the same function that increase it)

Pseudocode goes like this: 

<pre><code>function onTick()
 --increase status time
  if actor.status[1]&lt;=actor.status[2] then
      actor.status[1] = actor.status[1]+1
  else
       actor.status = nil
  end

  --remove graphics relative to status
  if actor.status == nil then
     actor.statusSprite:removeFromParent()
     actor.statusSprite = nil
  else
 --apply status damage
    actor.hp = actor.hp -1
   end

-- ... and so on for almost anything

end&lt;/code&gt;</code></pre>



What I don't understand is how is it possible that some lines of code are executed, while others seems to be skipped: I mean, even if I lose "tick number 34", shouldn't this thing be executed on "tick number 35" and following "ticks"?
So why there is a random condition when I still see flames on a guy who doesn't get any damage from them and they won't ever disappear?
I may avoid adding flames as a new movieClip, but if I have to draw any guy in flames in 3 frames I would exponentially increase the number of textures I need to load... :/ 

Thank you ]]>
        </description>
    </item>
    <item>
        <title>how do you handle your audio (soundmanager)?</title>
        <link>https://forum.giderosmobile.com/discussion/8466/how-do-you-handle-your-audio-soundmanager</link>
        <pubDate>Sun, 05 Sep 2021 06:14:20 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>MoKaLux</dc:creator>
        <guid isPermaLink="false">8466@/discussions</guid>
        <description><![CDATA[<b>how are you all doing  :) ? </b>
I know the basics stuff for sound and sound channel but I wonder how to handle all the audio files?
<b>https://wiki.gideros.rocks/index.php/Playing_Sound_and_Music</b>

Is it good to declare every audio files in init or main?
Is it good to declare them as global?
...

I would also like to control the volume of all the sounds at once (via the option menu).

I have seen this class written in 2012!!! but I am not sure how to handle the management of audio files. Any tips for a sound manager please  ;) ?

Thanks!

<div><pre><code>--[[
Bismillahirahmanirrahim

Audio control class for Gideros
by: Edwin Zaniar Putra (zaniar@nightspade.com)

This code is MIT licensed, see http://www.opensource.org/licenses/mit-license.php
Copyright 2012 Nightspade (http://nightspade.com)

gideros_audio
=============
Audio control class for Gideros
This class provides:
* easy way to mute/unmute
* easy way to manage and play BGM
* easy way to manage and play SFX
```Audio.new()``` Creates a new Audio object
```Audio:setBgms(bgms)``` Sets BGMs table with ```bgms``` table
```Audio:setSfxs(sfxs)``` Sets SFXs table with ```sfxs``` table 
```Audio:clearBgms()``` Clears BGMs table
```Audio:clearSfxs()```Clears SFXs table
```Audio:addBgm(name, path)``` Adds new BGM to BGM table
```Audio:addSfx(name, path)``` Adds new SFX to SFX table
```Audio:removeBgm(name)``` Removes a BGM identified by ```name```
```Audio:removeSfx(name)``` Removes a SFX identified by ```name```
```Audio:playBgm(name, force)``` Plays a BGM identified by ```name```. Allow to replay currently playing BGM by setting ```force``` to ```true```
```Audio:playSfx(name)``` Plays a SFX identified by ```name```
```Audio:mute(mode)``` Mutes audio. Available ```mode```s are "bgm", "sfx". To mute all audio set ```mode``` to ```nil```
```Audio:unmute(mode)``` Unmutes audio. Available ```mode```s are "bgm", "sfx". To unmute all audio set ```mode``` to ```nil```

Simple example:
```
audio = Audio.new()
audio:setBgms{
	["mainmenu"] = "path/to/mainmenu.mp3",
	["gameplay"] = "path/to/gameplay.mp3"
}
audio:setSfx{
	["explosion"] = "path/to/explosion.mp3",
	["ding"] = "path/to/ding.mp3"
}
audio:playBgm("mainmenu")
audio:playSfx("explosion")
```
]]


Audio = Core.class()

function Audio:init()
	self.bgmChannel = nil
	self.bgmCurrentName = nil
	self.bgmCurrent = nil
	self.bgmPos = 0
	
	self.bgmMute = false
	self.sfxMute = false

	self.bgms = {}
	self.sfxs = {}
end

function Audio:setBgms(bgms) self.bgms = bgms end
function Audio:setSfxs(sfxs)
	for name, path in pairs(sfxs) do self.sfxs[name] = Sound.new(path) end
end

function Audio:clearBgms() self.bgms = {} end
function Audio:clearSfxs() self.sfxs = {} end

function Audio:addBgm(name, path) self.bgms[name] = path end
function Audio:addSfx(name, path) self.sfxs[name] = Sound.new(path) end

function Audio:removeBgm(name) self.bgms[name] = nil end
function Audio:removeSfx(name) self.sfxs[name] = nil end

function Audio:playBgm(name, force)
	if name ~= self.bgmCurrentName or force then
		if self.bgmChannel then
			self.bgmChannel:stop()
			self.bgmChannel = nil
			self.bgmCurrentName = nil
			self.bgmCurrent = nil
			self.bgmPos = 0
		end
		if not self.bgmMute and not self.bgmChannel then
			self.bgmCurrentName = name
			self.bgmCurrent = Sound.new(self.bgms[name])
			self.bgmChannel = self.bgmCurrent:play(self.bgmPos, math.huge)
		end
	end
end
function Audio:playSfx(name)
	if not self.sfxMute then return self.sfxs[name]:play() end
end

function Audio:mute(mode)
	if mode == "bgm" then
		self.bgmMute = true
		if self.bgmChannel then
			self.bgmPos = self.bgmChannel:getPosition()
			self.bgmChannel:stop()
			self.bgmChannel = nil
		end
	elseif mode == "sfx" then
		self.sfxMute = true
	else
		self.bgmMute = true
		if self.bgmChannel then
			self.bgmPos = self.bgmChannel:getPosition()
			self.bgmChannel:stop()
			self.bgmChannel = nil
		end
		self.sfxMute = true
	end
end
function Audio:unmute(mode)
	if mode == "bgm" then
		self.bgmMute = false
		self.bgmChannel = self.bgmCurrent:play(self.bgmPos, math.huge)
	elseif mode == "sfx" then
		self.sfxMute = false
	else
		self.bgmMute = false
		self.bgmChannel = self.bgmCurrent:play(self.bgmPos, math.huge)
		self.sfxMute = false
	end
end
</code></pre></div>]]>
        </description>
    </item>
    <item>
        <title>pimp my game</title>
        <link>https://forum.giderosmobile.com/discussion/8642/pimp-my-game</link>
        <pubDate>Wed, 08 Mar 2023 20:12:06 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>MoKaLux</dc:creator>
        <guid isPermaLink="false">8642@/discussions</guid>
        <description><![CDATA[good day everybody,
could you guys share some of your magic tricks to pimp an image please  o:) 
I haven't tested anything yet but the setColorTransform. Gideros has so much more to offer  :p 
Here is the image (game) I would like to pimp
<img src="https://forum.gideros.rocks/uploads/editor/k9/pu1dz7hi2mkt.png" alt="" />
With an image editor, tweaking only the brightness and the contrast I have this which looks already better imho
<img src="https://forum.gideros.rocks/uploads/editor/ap/wd9so45at3dg.jpg" alt="" />

I take everything <b>but shaders </b>(at least for now)  ;) 

possible routes: <b>setBlendMode</b>, <b>shaders</b>, <b>setColorTransform</b>, ... ?

<b>Thank you  </b>&lt;3 ]]>
        </description>
    </item>
    <item>
        <title>Do you know if is there any software that helps laying out software flow diagrams?</title>
        <link>https://forum.giderosmobile.com/discussion/8624/do-you-know-if-is-there-any-software-that-helps-laying-out-software-flow-diagrams</link>
        <pubDate>Sun, 29 Jan 2023 16:05:18 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>pie</dc:creator>
        <guid isPermaLink="false">8624@/discussions</guid>
        <description><![CDATA[I know that there are many out there to write diagrams, and even a piece of paper or MSpaint would do, but I wonder if there is something specifically made to visualize software flows using variables where you can easily spot if you forgot something in your logic flow before starting to write actual code... I hope that this makes sense

Thank you :)]]>
        </description>
    </item>
    <item>
        <title>3D Scene editor</title>
        <link>https://forum.giderosmobile.com/discussion/8618/3d-scene-editor</link>
        <pubDate>Wed, 28 Dec 2022 09:31:57 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>hgy29</dc:creator>
        <guid isPermaLink="false">8618@/discussions</guid>
        <description><![CDATA[Hi guys,

I have been looking for a 3D scene builder that could be used to design game levels for Gideros, but couldn't find something that fulfill my needs. Blender is far too complex to use, Asset Forge (by KenneyNL) is nice but don't allow naming/tagging objects, so I decided to have a go to writing my own scene editor, in Gideros.

It is very early days, but it is already capable of showing an asset library and position models in 3D space with ease. It lacks almost everything else: opening/saving projects, rotationg and scaling objects, adjusting properties, etc. but I think I am on the right track.

Here is a screenshot, using assets from KayKit on itch.io.
<img src="https://forum.gideros.rocks/uploads/editor/z5/yk2g4dry4rl9.png" alt="" />
]]>
        </description>
    </item>
    <item>
        <title>Platformer example [using bump]</title>
        <link>https://forum.giderosmobile.com/discussion/7264/platformer-example-using-bump</link>
        <pubDate>Sat, 27 Jan 2018 10:45:00 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>rrraptor</dc:creator>
        <guid isPermaLink="false">7264@/discussions</guid>
        <description><![CDATA[Just want to share a simple platformer example :smile: 
Code is not very well commented, because my english is not good enough :neutral:

https://github.com/MultiPain/gideros-platformer ]]>
        </description>
    </item>
    <item>
        <title>Best practice to use imgui in app: local stuff or inside a Sprite?</title>
        <link>https://forum.giderosmobile.com/discussion/8603/best-practice-to-use-imgui-in-app-local-stuff-or-inside-a-sprite</link>
        <pubDate>Tue, 08 Nov 2022 11:40:14 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>pie</dc:creator>
        <guid isPermaLink="false">8603@/discussions</guid>
        <description><![CDATA[Hi, the question is in the title: 
I was used to use scenemanager so that everything on screen was bound to a sprite on stage: I could access everything anytime almost without using global stuff and I could get rid of it all together, but I was wondering if a local functions approach like the one in imgui tablesDemo might be suggested.

What do you think? :)
Thank you]]>
        </description>
    </item>
    <item>
        <title>my next project in a near future?</title>
        <link>https://forum.giderosmobile.com/discussion/8402/my-next-project-in-a-near-future</link>
        <pubDate>Sat, 20 Mar 2021 18:05:41 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>MoKaLux</dc:creator>
        <guid isPermaLink="false">8402@/discussions</guid>
        <description><![CDATA[<b>It seems so easy to do in gideros</b>. I add this to my to do list :smile: . I need to get better at imgui first :smile: .
https://www.youtube.com/watch?v=nJ7_hatND4Y
20$ on steam.]]>
        </description>
    </item>
    <item>
        <title>Liquidfun platformer</title>
        <link>https://forum.giderosmobile.com/discussion/8098/liquidfun-platformer</link>
        <pubDate>Wed, 15 Apr 2020 00:31:40 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>MoKaLux</dc:creator>
        <guid isPermaLink="false">8098@/discussions</guid>
        <description><![CDATA[I am building a platformer template for all to use (pros and noobs alike).
Tell me what you think  :) 
https://mokalux.itch.io/gideros-platformer-lf
An example:
<pre><code>
	elseif objectName == "lava" and application:getDeviceInfo() ~= "Web" then
		if object.shape == "polygon" then
			myshape = LF_Particles.new(self.world, self.camera, {
				x = object.x, y = object.y,
				coords = object.polygon, rotation = object.rotation,
				tex = "gfx/ui/btn_02_up.png",
			})
		elseif object.shape == "rectangle" then
			myshape = LF_Particles.new(self.world, self.camera, {
				x = object.x, y = object.y,
				w = object.width, h = object.height, rotation = object.rotation,
				tex = "gfx/ui/btn_02_up.png",
			})
		elseif object.shape == "ellipse" then
			myshape = LF_Particles.new(self.world, self.camera, {
				w = object.width, h = object.height, rotation = object.rotation,
			})
		else
			print("*** CANNOT PROCESS THIS SHAPE! line ~134 ***")
			return
		end
</code></pre>
Gravity is set to 48 instead of 9.8, Liquidfun is very tricky!
Will post my progress here if you don't mind.
PS: thanks to <b>antix</b> who told me to use Tiled in my platformers as well as providing some code to start off, thanks to <b>rrraptor </b>for his camera   &lt;3 
PS2: thanks to ALL of you as well  :) 
PS3: viva GIDEROS!]]>
        </description>
    </item>
    <item>
        <title>Dashing Ball (&quot;Hello world&quot; project)</title>
        <link>https://forum.giderosmobile.com/discussion/8468/dashing-ball-hello-world-project</link>
        <pubDate>Mon, 06 Sep 2021 06:45:35 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>E1e5en</dc:creator>
        <guid isPermaLink="false">8468@/discussions</guid>
        <description><![CDATA[<b>Dashing Ball</b> is an arcade game developed as part of the study of the Gideros game engine (a kind of "Hello word" project). This mechanic is a clone of an existing mobile game with modifications.

<h2><b>How to play</b></h2>

The player (blue ball) moves towards the "coin" (orange ball). Tapping (pressing LMB) reverses the direction of the player. Your task is to collect as many points as possible and face obstacles (white figures).
Music and sounds are absent. Laziness, maybe I will add later.

<div><img width="30%" height="30%" src="https://forum.giderosmobile.com/uploads/editor/z4/bq2gzduyzei6.jpg" alt="" />   <img width="30%" height="30%" src="https://forum.giderosmobile.com/uploads/editor/9s/2bllwkuhs7ba.jpg" alt="" />   <img width="30%" height="30%" src="https://forum.giderosmobile.com/uploads/editor/uf/ywgzl07p610r.jpg" alt="" /></div>

<h2><b>About development</b></h2>

As part of testing tools, I use them in game development contests (Jams) or develop simple projects. I love this mechanic, so I use it.
During the development, 2 incorrect decisions were made, which led to the complication of development and not the most optimal solutions. On the one hand, it was more difficult, on the other hand, it made it possible to get to know the game engine even better. Wrong decisions:
1) Using a physics engine to check for collisions.
This led in the future to another wrong decision and made it possible to study how to work with it. But it was possible to do without a physics engine, and just write a few functions to check for collisions.
2) Use sprites as objects of motion, and then synchronize them with physical bodies, and not vice versa.
It was possible to adjust the direction of linear acceleration or forces acting on objects, and then apply their position to the sprites, but then it seemed to me that it was easier to do this.
Of course, most likely, more mistakes were made, the structure of the project I do not like at the moment, and I have not completely decided on the style of the code.
The source code of the project is attached, but I am not responsible for your health after viewing it. Be careful not to take it lightly.  :D 

<h2><b>Suggestions/discussions:</b></h2>
- The physical world is tied in a global coordinate system, which cannot be changed in any way (move, rotate). And I would like to have such an opportunity, or bind it to a specific node (child), so that the local coordinate system is used. This will allow you to easily create interesting game mechanics (for example, just rotate / flip a level in a platform game), without changing anything else (gravity, controls).
Perhaps there is a way to rotate the "camera", but I did not find it.
- Set limits for canvas sizes in HTML5 assembly. Otherwise, it is always stretched and you can see how objects are created outside the left and right borders of the screen.

<b>Link to project page:</b> https://e1e5en.itch.io/dashing-ball?password=gideros

As a result, about 20 hours were spent on the project. I liked the game engine and you can start developing a "large" project with its help. :)
]]>
        </description>
    </item>
    <item>
        <title>Texture Packer Alternate</title>
        <link>https://forum.giderosmobile.com/discussion/8440/texture-packer-alternate</link>
        <pubDate>Sat, 19 Jun 2021 20:16:31 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>antix</dc:creator>
        <guid isPermaLink="false">8440@/discussions</guid>
        <description><![CDATA[Hey all, I came across a really neat little application for packing textures...

https://github.com/odrick/free-tex-packer

It is quite powerful and has a lot of nice features. It's also open source!

Even though it doesn't support Gideros by default  but the following custom script should export the basic stuff...
<code>
{{#rects}}
{{{name}}}, {{frame.x}}, {{frame.y}}, {{frame.w}}, {{frame.h}}, 0, 0, 0, 0
{{/rects}}
</code>
You would need to modify the above script to manage offsets and such (the last four variables).
]]>
        </description>
    </item>
    <item>
        <title>I have PLANS</title>
        <link>https://forum.giderosmobile.com/discussion/8437/i-have-plans</link>
        <pubDate>Fri, 04 Jun 2021 18:39:56 +0000</pubDate>
        <category>Game &amp; application design</category>
        <dc:creator>MoKaLux</dc:creator>
        <guid isPermaLink="false">8437@/discussions</guid>
        <description><![CDATA[I have big plans in the coming God's willing?

I want to write a book about gideros studio  :) I know that sounds crazy but I think I can do it?

My plan:
<ol>
<li> start small and increase the difficulty
</li><li> make a finished project
</li><li> gather all the code 
</li><li> put it in text form (explanation, comments, and the full code)
</li><li> I can proof read the text using <b>balabolka </b>(that's why I needed this https://mokatunprod.itch.io/text-line-remover  :) )
</li><li> make yt video that <b>briefly </b>explains the code as the goal is to build the finished project (all explanations should be in text)
</li><li> go chapter by chapter and publish on itch.io
</li><li> repeat
</li></ol>

I was going to call all the little projects (chapters) <b>GDOC XX Title </b>or <b>Gideros Express XX Title</b>, ...

I intend to start with the basics, then scene manager, then a little game (bubble), then a box2d platformer, maybe a cbump one too?, a shmup in 2D and one in 3D, then some more 3D if I can make "interesting" prototypes, ...

I kinda already started but it's the very beginning, loooong way to go  :p 

Why I am doing this?
1- to create my apps
2- to make tuts (text and videos)
3- because I love coding in Gideros
4- for <b>FUN</b>

<b>Viva Gideros  B) </b>]]>
        </description>
    </item>
   </channel>
</rss>
