The examples is just a bunch of code... no coment... the program site also has no any support... Can't google anything 'cause I can't find anything anywhere... Don't understand that... Just wanted to show what I've created... How can I not do a so simple thing?
Hi @Paulo777 As a new user of Gideros I can share some thoughts. When it comes to tutorials&documentation, Gideros looks newbie-unfriendly compared to extremely popular engines like Construct or Unity.
But community&maintainers are extremely helpful. Any question here is answered within few hours, by people who actually develop Gideros. And it changes the whole situation.
So Gideros looks unfriendly from the start, but wins at the end.
When I have something to ask I try to use Google search, like: site:giderosmobile.com tiled Most of the time answers already exist on forum. If not, we can ask here, any question is answered withing few hours.
> 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)
The actual map data is a rectangular grid that can be huge - many screens in size. Think a Mario or Sonic size map or bigger. The individual x,y sections of the map are called 'tiles', in the old days we used to call them 'blocks'.
The tilemap also needs to have a pointer to a texture. This is the graphic data for the actual map.
You can change the x or y position of the tilemap and it will be clipped to the screen (or viewport). For example to scroll the screen left you would subtract from the x so its origin is more off the screen to the left and so on. Don't panic as like I said it's clipped so you are not really drawing off the edge of the screen.
You can set a tile or clear a tile. When setting a tile you can also specify if the tile should be flipped in various combinations.
A tile that has been cleared is not drawn at all - so if you have a map with a lot of empty sections then it will be drawn extremely quickly.
Basically within Gideros what happens is that only the area of the tilemap that is currently on screen is analysed and then a single mesh is made of all the tiles that have been set for that specific area. That mesh is then the thing that is drawn.
There are some helper functions for doing specialist games such as endless runners, this is a function to move all the blocks in a specific direction. You then just feed the edge with new data. This isn't a smooth scroll though - so inbetween needing to move and feed you would smooth scroll with the modulo of whatever the tile size is and so on. If you are not doing an endless map then you don't really need to worry about this though.
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
@Paulo777 Gideros has a steep learning curve compared to some other engines but the effort required is totally worth it. Once you are a bit more familiar with how stuff works you will be richly rewarded
Having said all that, yes there could be better documentation and such, especially for things like TileMaps.
Hello everybody really thank you for the responses... I have been learning from scratch from 0 and so on... I really found Gideros intuitive and practic to learn and apply, and I'm learning by the tutoriais in the Gideros site.
Now I am stuck on this: TiledMaps. Because the only example that has, is the sewer and desert. It is made in an older version of the Tiled (program) and there is no any explanation on the code itself then I have no any Idea of what's going on in there.
The Tiled program, I can generate .lua files... and in the lua files there is a lot of configurations of what I've done... However I have no any idea of how to manage it, show it, do whatever I want to do because there is nothing can find then I don't understand the code I don't know what to do then It is useless... I tried to use some parts of the code from the sewer/desert (tried to used the whole code) nothing worked it gives me errors that I don't know how It comes from... If you all have some light to me up I am greatly appreciated
offtopic: @antix, although i never used tilemaps, in many other aspects i find that the learning curve of gideros is actually far from steep, one of the best i've encountered. this may be subjective, i agree. yet, starting to develop with gideros is as easy as it gets, including testing on device. and starting to do the real programming work was also quite smooth for me (admittedly i was familiar with sprite hierarchies and events, coming from flash).
Sorry but this doesn't help... The matter is not how to do... but how to make all of it work in the gideros... what is what... tiles... tilessets... how to display it on screen... how to declare instances or if I can use directly... how to manage everything I've created... the matter is in the MAIN lua file... it is just BLANK... because I have no any ideia what to write on that
Thank you for the links... I'm studying and I got encouraged to go deeper on the sewer/desert code and facing the errors.. but has anyone got stuck on this? attempt to index field 'data' (a nil value) the line is local gid = layer.data[i]
@Paulo777 this error means that your table layer.data[i] has no value.(nil value) so when you try to assign it to variable gid it is raising an error hence that table pointer is nill.
I strongly suggest you to start as simple as possible as @oleg suggests. Before diving into tiles code, try to study the basics like tables, parameters, scopes, gideros events , loops and logical operators and clauses,sprites . When you understand those it will be much more easy to understand and trace any code.
Thank you for the links... I'm studying and I got encouraged to go deeper on the sewer/desert code and facing the errors.. but has anyone got stuck on this? attempt to index field 'data' (a nil value) the line is local gid = layer.data[i]
here is a short test
local map =require("sewers")print(map.layers[1].data[1])
Hey... really thank you one more of attention aggregated for more understanding... Now I got to get it working. But there is a thing That I didn't get... My lua file has 4 layers and It just ignore the other 2 layers as it didn't really exist... I just want to know why it does happen... You can see... the print code show 4 layers but I set the for loop to 2 otherwise the compiler crashes... stating the error mentioned above...
Hello anybody! Doing some more tests I created a map a little bigger, but I'm having a trouble: it is not showing it entirely as has been built. I don't know if gideros supports only some resolution, some configuration... some light would be greatly appreciated
The big numbers are tiles that have been flipped, the flip data is included in the number. I'm sure there is a reason for this deliberate obfuscation, but it confused me until I found the solution here.
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
Hey, what 'bout using platform layer and background layer, for example: When I'm about to create a runner game, there is a layer with 'ground' to run on, and the 'sky', or 'cities' or anything behind. How is that in the layer. I've created some in the tiled program, but I have no idea of how to integrate it on the game as of 'rocks' to collide with, or 'enemies', coins... objects we create in the map that we can deal with it and manage actions in it... It's kinda hard to google it
@Paulo777, So you have 3 layers... 1. Background (your sky, cityscape, etc) 2. Platforms (what the player jumps about on) 3. Objects (the things that collide with the player like rocks and coins)
Yeesss! I can create it on Tiled, the Gideros documentation that @oleg posted has helped me, but I wanted to know how to use everything I've created on Tiled and manage it on Gideros. I'm making a spaceship shooter, and I managed to deal with the layers, I've learned here and digging in the code, testing I'm figuring out even better how Gideros works and how everything works I'm feeling amazed and learning a lot. But what if when I'm about to insert collision objects in the level? the Tiled documentation doesn't bring material on how to work with the code generated
@Paulo777 it's pretty hard to say how to add collision items without a clear explanation of how your tiled map is structured, and how your levels flow.
So if the level has walls that your ship can crash into that's one kind of collision. If there's a layer that describes enemies and collectables then that's different too.
Is your shooter side scrolling or forward scrolling?
Maybe you are just generating enemies and stuff offscreen on a timer? That's also dfferent.
It's very hard to present something that covers every condition I'm afraid.
The best thing is to find out what is considered best practice for your chosen genre (SHMUP in your case) and follow that method.
I'm sure if you can post something a bit more than "it's a spaceship shooter" we could totally help you more. Do you have a small design document that describes the game, and it's basic mechanics? It's always good to make one for each project you start, just so you can plop it out in a thread when you need a bit of help
Comments
As a new user of Gideros I can share some thoughts.
When it comes to tutorials&documentation, Gideros looks newbie-unfriendly compared to extremely popular engines like Construct or Unity.
But community&maintainers are extremely helpful. Any question here is answered within few hours, by people who actually develop Gideros. And it changes the whole situation.
So Gideros looks unfriendly from the start, but wins at the end.
When I have something to ask I try to use Google search, like:
site:giderosmobile.com tiled
Most of the time answers already exist on forum.
If not, we can ask here, any question is answered withing few hours.
https://github.com/1dot44mb/gideros/tree/master/tools/TiledAsWorldEditor
Likes: antix, Paulo777
"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)
The actual map data is a rectangular grid that can be huge - many screens in size. Think a Mario or Sonic size map or bigger. The individual x,y sections of the map are called 'tiles', in the old days we used to call them 'blocks'.
The tilemap also needs to have a pointer to a texture. This is the graphic data for the actual map.
You can change the x or y position of the tilemap and it will be clipped to the screen (or viewport). For example to scroll the screen left you would subtract from the x so its origin is more off the screen to the left and so on. Don't panic as like I said it's clipped so you are not really drawing off the edge of the screen.
You can set a tile or clear a tile. When setting a tile you can also specify if the tile should be flipped in various combinations.
A tile that has been cleared is not drawn at all - so if you have a map with a lot of empty sections then it will be drawn extremely quickly.
Basically within Gideros what happens is that only the area of the tilemap that is currently on screen is analysed and then a single mesh is made of all the tiles that have been set for that specific area. That mesh is then the thing that is drawn.
There are some helper functions for doing specialist games such as endless runners, this is a function to move all the blocks in a specific direction. You then just feed the edge with new data. This isn't a smooth scroll though - so inbetween needing to move and feed you would smooth scroll with the modulo of whatever the tile size is and so on. If you are not doing an endless map then you don't really need to worry about this though.
Likes: Paulo777
https://deluxepixel.com
Having said all that, yes there could be better documentation and such, especially for things like TileMaps.
Now I am stuck on this: TiledMaps. Because the only example that has, is the sewer and desert. It is made in an older version of the Tiled (program) and there is no any explanation on the code itself then I have no any Idea of what's going on in there.
The Tiled program, I can generate .lua files... and in the lua files there is a lot of configurations of what I've done... However I have no any idea of how to manage it, show it, do whatever I want to do because there is nothing can find then I don't understand the code I don't know what to do then It is useless... I tried to use some parts of the code from the sewer/desert (tried to used the whole code) nothing worked it gives me errors that I don't know how It comes from... If you all have some light to me up I am greatly appreciated
Likes: antix
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: Paulo777
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Look for the commands you do not understand in the documentation
http://docs.giderosmobile.com/reference/gideros/TileMap/new
start with something simple
from studying tables
with the study of sprites
study of events
I also recommend:
https://www.packtpub.com/game-development/gideros-mobile-game-development
Likes: Apollo14
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
I strongly suggest you to start as simple as possible as @oleg suggests. Before diving into tiles code, try to study the basics like tables, parameters, scopes, gideros events , loops and logical operators and clauses,sprites . When you understand those it will be much more easy to understand and trace any code.
Likes: Paulo777
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
need to look at the code
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Likes: antix
Likes: Paulo777
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Likes: antix, Apollo14
Doing some more tests I created a map a little bigger, but I'm having a trouble: it is not showing it entirely as has been built. I don't know if gideros supports only some resolution, some configuration... some light would be greatly appreciated
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
To get the actual values you can use this code:
Likes: oleg, Paulo777, antix
I make the data cleaner
to the atlas I add 3 variants of the returned tile
and after export, I delete these pictures
Likes: Paulo777
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Totebo, it worked like a charm! It loaded all my map!
Likes: totebo
Likes: antix
https://deluxepixel.com
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
1. Background (your sky, cityscape, etc)
2. Platforms (what the player jumps about on)
3. Objects (the things that collide with the player like rocks and coins)
Is that correct?
So if the level has walls that your ship can crash into that's one kind of collision. If there's a layer that describes enemies and collectables then that's different too.
Is your shooter side scrolling or forward scrolling?
Maybe you are just generating enemies and stuff offscreen on a timer? That's also dfferent.
It's very hard to present something that covers every condition I'm afraid.
The best thing is to find out what is considered best practice for your chosen genre (SHMUP in your case) and follow that method.
I'm sure if you can post something a bit more than "it's a spaceship shooter" we could totally help you more. Do you have a small design document that describes the game, and it's basic mechanics? It's always good to make one for each project you start, just so you can plop it out in a thread when you need a bit of help
Likes: Apollo14
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!