keep up the good work !
( especially for the free-move-version)
movements will be freed after i'm sure i will not apply big changes to the engine code, because the two last attempts to implement it were two failsDarky wrote:the previous versions were prettier and more fluid.
keep up the good work !
( especially for the free-move-version)
no, the code has several limitations that i can't break for nowmicha wrote:The rotation is awesome!! Can you also make it rotate around the z-axis?
I will have a look at the free movement version later.
Code: Select all
x = (gx-gy)/tw
y = (gx+gy)/th - gz*tz
thanks man for your encouragements !!Roland_Yonaba wrote:Gosh, I am following this since the start, and I am still like:...
Great job, keep it up!
so I spent some time reading the code(I'm working on something similar) and as far as I understand, you can add rotating around z-axis by changing `rhombus` function in engine.lua. I think you have to add a parameter like `angle` which will specify rotation around z-axis, then by rotating 8 points you're generating in `rhombus` function, you can emulate rotation(I mean by rotating 8 points around tile's center, which is specified by `rhombus` functions's `x` and `y` parameters).Saegor wrote:no, the code has several limitations that i can't break for nowmicha wrote:The rotation is awesome!! Can you also make it rotate around the z-axis?
I will have a look at the free movement version later.
the grid drawing calculation formula is something likewhere x and y are the drawing coordonees, gx, gy and gz are the space grid position and tw and th are the width and the heigth of the tile and tz is the Z offset applied to simulate the vertical dimension. i think it's not very complex for now but if i want to add Z rotation i will have to add some more parameters to the main formula... mmh maybe laterCode: Select all
x = (gx-gy)/tw y = (gx+gy)/th - gz*tz
changing viewing angle is handled by manipulating sprite's height and width values. it has no camera or any rendering tricks, it just makes sprites wider and shorter and it looks like we're zooming. here's the relevant code:Lafolie wrote:I really like this. I'm planning on making the visual element of my game isometric, this is great inspiration. I especially like the ability to shift the viewing angle; I suspect this is achieved through manipulation of the way the map is rendered (using primitives). I wonder, is this sort of mechanic realistically achieve-able with sprites too. I guess you could map textures to the primitives, but I imagine there is a more effective way to do this, rather than almost simulating 3D polygons.
Code: Select all
if ke.isDown("r")
and tile_h < h_zoom_max then
tile_w = tile_w + dt * zoom * w_change
tile_h = tile_h + dt * zoom * h_change
tile_z = tile_z - dt * zoom * z_change
elseif ke.isDown("e")
and tile_h > h_zoom_min then
tile_w = tile_w - dt * zoom * w_change
tile_h = tile_h - dt * zoom * h_change
tile_z = tile_z + dt * zoom * z_change
end
If your sprites only consist of faces orthogonal to the coordinate axes (x,y and z) then this is possible and not too difficult. If you have arbitrary shapes, there is no simple way to implement this without using proper 3d polygons, as you say.Lafolie wrote:I really like this. I'm planning on making the visual element of my game isometric, this is great inspiration. I especially like the ability to shift the viewing angle; I suspect this is achieved through manipulation of the way the map is rendered (using primitives). I wonder, is this sort of mechanic realistically achieve-able with sprites too. I guess you could map textures to the primitives, but I imagine there is a more effective way to do this, rather than almost simulating 3D polygons.
Users browsing this forum: No registered users and 2 guests