> Newcomers roadmap: from where to start learning Gideros "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
@all ok gideros is a wonderful engine but why do you want to make games only, what about apps. I think a good example of one possible app is this video. I believe it can easily be done in gideros:
I believe it's going to be my next project...
I have already implemented this piece of code:
function Map:createMap()
self.map ={}
self.mapid ={}-- load map.txt and add each line to self.mapfor line inio.lines("MAPS/map.txt")do
self.map[#self.map + 1]= line
end-- store the position of the rooms as an indexed tablelocal x =2-- number of chars for the map idfor l =1, #self.map do
self.mapid[l]={}for c =1, #self.map[l] - 1, x do-- step xlocal id =string.sub(self.map[l], c, c + x - 1)if id =="ro"then
self.mapid[l][#self.mapid[l] + 1]=1else
self.mapid[l][#self.mapid[l] + 1]=0endendend-- tileslocal mytilesmap ={}local mymaptexture = Texture.new("MAPS/texture_mask_16_x01.png")for t =1, 16dolocal mymaptextureregion = TextureRegion.new(mymaptexture, (t - 1)*16, 0, 16, 16)
mytilesmap[#mytilesmap + 1]= mymaptextureregion
end-- draw maplocal spritemap = Sprite.new()local tileid =0for l =1, #self.mapid dofor c =1, #self.mapid[l]doif self.mapid[l][c]==1then
tileid =0if self:getContactAt(c, l - 1)then tileid +=1endif self:getContactAt(c + 1, l)then tileid +=2endif self:getContactAt(c, l + 1)then tileid +=4endif self:getContactAt(c - 1, l)then tileid +=8endlocal mytilebmp = Bitmap.new(mytilesmap[tileid])
mytilebmp:setPosition((c - 1)* mytilebmp:getWidth(), (l - 1)* mytilebmp:getHeight())
spritemap:addChild(mytilebmp)endendend
spritemap:setAnchorPoint(0.5, 0.5)
spritemap:setScale(1.5)
spritemap:setPosition(1.375* myappwidth /4, 0.25* myappheight /4)
self:addChild(spritemap)endfunction Map:getContactAt(xc, xl)if self.mapid[xl][xc]==1thenreturntrueelsereturnfalseendend
@all ok gideros is a wonderful engine but why do you want to make games only, what about apps. I think a good example of one possible app is this video. I believe it can easily be done in gideros:
Wow it's nice! Why do you use 'Tilesetter' from steam instead of free 'Tiled' editor? Are there any advantages?
> Newcomers roadmap: from where to start learning Gideros "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
@Apollo14 I don't use tilesetter (nor tiled). I want to make my own so I can use it for my projects. It's hard to explain but the video shows the whole process: you draw 2 tiles and it generates a whole tileset. I'll try to make a demo when I have something good to show and share.
some progress I did with the above mentioned project (which is delaying the new gideros install) So to recap the concept: PART 1 - you only draw one tile (any size will do 12*12, 32*32, ...) - and the project transforms this one tile into a full tileset! This part is done (maybe some fine tuning) PART 2 - you draw your basic map (in notepad or any other text editor) and save it as .txt - the project will select automatically the right tile to draw from the tileset This part is half done, I need to set the appropriate tile ID.
@oleg cool tutorial, I will try her method to make the tile I need for my program.
it's not a good lesson, but it shows the idea. You just do a 1000x1000 drawing Then you draw the texture of the tile Then you apply an offset filter 50% right and 50% down Now in photoshop you can scroll through the texture by pressing the "alt+ctrl+f" button
--To draw a block of 9 tiles, the offset filter must be moved by 33%
ok I have finished my app (see above examples). Polishing took quite some time. When you run the app it will save your tileset to your C:\Users\xxx\AppData\Local\Temp\gideros\mkgiOneTileToTileset\documents\finalts.png (on windows).
This was just a challenge to myself to see that I could do a "tilesetter" clone using gideros in a short period of time. Viva gideros.
@all ok gideros is a wonderful engine but why do you want to make games only, what about apps. I think a good example of one possible app is this video. I believe it can easily be done in gideros:... I believe it's going to be my next project... Viva gideros!
I finished my project because I wanted a quick way to build tilemaps for my other future projects (spoiler: platformers) Please have a look at the latest release on itch.io. You can try it on the browser or even better download the windows version. https://mokalux.itch.io/onetiletotileset Please let me know if this is useful to you. Can be used in TILED for example or through code directly. A quick recap: you draw only one tile and the app turns it into a full tilemap!
PS: it was a nice experience. Gideros has it all. PS2: android version ready. Need to publish it PS3: GIDEROS & FORUM ROCK!
You add a file type, then if that file is clicked on in the project then the file will be read by the editor (like the sfx and tile map editor examples) you then edit and can save.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Basically Gideros is not geared for creating apps that open and save files using a point and click interface.
what do you mean? I have a button save and when you click it it saves (an image in my case) and a button load to load (an image in my case). That doesn't work on html though.
@MoKaLux When you click your button.. does it open a native file requester that allows you to set the files path and filename? This is the kind of file access I'm talking about here.. the kind that's useful for real applications
@antix yes it does. Using the media plugin, you click the button then on windows it opens the save dialog box and you can choose your path and set a file name.
@MoKaLux interesting. It might be good if the media plugin could be stripped to have only native file request abilities and then be repackaged as a new plugin just for that purpose. For actual file operations the io library inside Gideros seems sufficient.
I'm assuming the media plugin works on Mac and Linux also?
Comments
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Likes: MoKaLux
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
I believe it's going to be my next project...
I have already implemented this piece of code:
Why do you use 'Tilesetter' from steam instead of free 'Tiled' editor?
Are there any advantages?
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
http://forum.giderosmobile.com/discussion/comment/56653/#Comment_56653
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
So to recap the concept:
PART 1
- you only draw one tile (any size will do 12*12, 32*32, ...)
- and the project transforms this one tile into a full tileset!
This part is done (maybe some fine tuning)
PART 2
- you draw your basic map (in notepad or any other text editor) and save it as .txt
- the project will select automatically the right tile to draw from the tileset
This part is half done, I need to set the appropriate tile ID.
Voilà. Will share soon, stay tuned
Likes: Apollo14
Professional artists create tiles with a filter - "offset"
Likes: Apollo14
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Likes: oleg
You just do a 1000x1000 drawing
Then you draw the texture of the tile
Then you apply an offset filter 50% right and 50% down
Now in photoshop you can scroll through the texture by pressing the "alt+ctrl+f" button
--To draw a block of 9 tiles, the offset filter must be moved by 33%
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
This was just a challenge to myself to see that I could do a "tilesetter" clone using gideros in a short period of time. Viva gideros.
PS: the tile size must be a power of 2.
Likes: Apollo14
Likes: Apollo14
https://mokalux.itch.io/onetiletotileset
You can save on windows and android but not html5 (I don't know how to read the html5 database).
Please have a look at the latest release on itch.io. You can try it on the browser or even better download the windows version.
https://mokalux.itch.io/onetiletotileset
Please let me know if this is useful to you. Can be used in TILED for example or through code directly.
A quick recap: you draw only one tile and the app turns it into a full tilemap!
PS: it was a nice experience. Gideros has it all.
PS2: android version ready. Need to publish it
PS3: GIDEROS & FORUM ROCK!
Likes: MoKaLux
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
I've gone down the dark path of JavaScript + HTML + CSS + Electron for my latest crazy experiment
Likes: MoKaLux
Likes: MoKaLux
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Likes: MoKaLux
Likes: MoKaLux, SinisterSoft
Dislikes: antix
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Likes: oleg
Likes: oleg
https://deluxepixel.com
-- List project files
print(json.encode(Studio.listFiles()))
http://docs.giderosmobile.com/reference/lua/io/open
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Basically Gideros is not geared for creating apps that open and save files using a point and click interface.
Likes: antix
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
https://wiki.giderosmobile.com/index.php/Media
I'm assuming the media plugin works on Mac and Linux also?