This is a video of my isometric racing prototype. I have only used sprites as tiles and lua tables to create infinite and random blocks on the road. Isometric tiles from Kenney: http://kenney.nl/assets/isometric-city
Controls are easier: tap to accelerate and do not touch screen to brake.
-- Get isometric coordinates from cartesian coordinates (x,y)function twoDToIso(x, y)local isoX = x -y
local isoY =(x + y)/2return isoX, isoY
end-- Get cartesian coordinates from isometric (isoX, isoY)function isoTo2D(isoX, isoY)local x =(2* isoY + isoX)/2local y =(2* isoY - isoX)/2return x,y
end
Rendering with isometric coordinates and collision in converted 2d coordinates. Tile width and tile height are 64 bits. To create the map I have generated 12 blocks and they are added to scene from top to down and left to right. First 6 blocks do not allow transversal roads.
-- Rendering blocksfor a=0,12doif(a >5)then
num =6endlocal block = Block.new(num)
block:setPosition(twoDToIso(0, TILE_HEIGHT * a))table.insert(block_list, block)
road:addChild(block)
num = num -1if(num <0)then
num =math.random(0,3)endend
Tried it, nice! A bit stuttery when you go fast on my Nexus 6, and the bitmaps are a bit blurred.
Are you using a spritesheet? If not that can speed things up. And the @2, @3 feature for crisp bitmaps is a winner.
This is just a prototype, I am using 64x64 isometric tilemaps, so I know that bitmaps are blurred with high screen resolutions. Every bitmap are stored as individual file, I should use spritesheet to improve performance.
I suppose I will buy Kenney art to get 128x128 images (or even 256x256) from vectorial ones (9$ all assets): http://kenney.nl/assets?q=source
Hey, pretty cool mate. I would recommend shelling out the few bucks for the Kenney Assets, they are fantastic! You also get all future updates to the pack too which makes it even better
Hey, pretty cool mate. I would recommend shelling out the few bucks for the Kenney Assets, they are fantastic! You also get all future updates to the pack too which makes it even better
I have bought Kenny assets. Isometric tiles that I need are provided as 3D models, I must convert them to images.
Invert controls, tap to brake and automatic acceleration could be fine, thanks for your ideas.
I tried the other one, it's smoother but it also seems "slower" than the first one. If you put an fps counter I could tell you better.
I have increased now the speed and difficulty so. Controls are inverted, tap to brake and speed up if you do not. I should improve the collision system but its playable for the moment.
Comments
To create the map I have generated 12 blocks and they are added to scene from top to down and left to right. First 6 blocks do not allow transversal roads.
A big CongoRatz!!
https://drive.google.com/file/d/0BylWto9E0xmLQThJWlM1aFlvMEk/view?usp=sharing
it seems a bit "heavy" on galaxy s2 when speed is high: I don't know if it's due to this known bug on android - https://github.com/gideros/gideros/issues/22
I would try "inverting" the controls to promote adrenaline
I have tested in my Bq Aquaris again with a very previous version (2014.01) and it works smoothly.
What happens with lastest versions that have worse performance?
I go back to previous versions at least for Android.
https://drive.google.com/file/d/0BylWto9E0xmLVVpKRUd3WGVWTXc/view?usp=sharing
Are you using a spritesheet? If not that can speed things up. And the @2, @3 feature for crisp bitmaps is a winner.
I suppose I will buy Kenney art to get 128x128 images (or even 256x256) from vectorial ones (9$ all assets):
http://kenney.nl/assets?q=source
Invert controls, tap to brake and automatic acceleration could be fine, thanks for your ideas.
Next days will be first version in Google Play.