BASIC

Author Topic: Isometric look - can be freely rotated  (Read 10977 times)

Offline Wampus

  • Prof. Inline
  • *****
  • Posts: 1004
    • View Profile
Isometric look pseudo 3D 'engine'



You can download the example app here: http://www.mediafire.com/file/sr8z51bbwe8d96f/isometricdemo.app.zip

Left click and hold while moving the mouse to adjust view. Right click and hold while moving the mouse to rotate the view. Use the mouse wheel to zoom in or out.

I wrote this last night for fun after I had the idea about how it could be done. The whole scene is rendered with polyvectors and a little trigonometry math. Surfaces aren't drawn if they're covered up by other surfaces.

Since I can't think of anything to use it for that couldn't be done better in normal 3D or rendered isometric look bitmaps I probably won't ever use this for anything or develop it further. If anyone can think of a good use for this kind of look please let me know. :)

MrTAToad

  • Guest
Re: Isometric look - can be freely rotated
« Reply #1 on: 2012-May-25 »
Its rather good - and could be quicker than using 3D on devices like the Android.   Any chance of releasing the source code ?

Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
Re: Isometric look - can be freely rotated
« Reply #2 on: 2012-May-25 »
Source code please!

Tapatalk 2-vel küldve az én GT-I9000-ről

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3340
  • Integrated Brain
    • View Profile
Re: Isometric look - can be freely rotated
« Reply #3 on: 2012-May-25 »
Wampus how make the isometric camera... I have troubles whit the ortho command of OpenGL... always I have an error like @24XXX or something like this... I read something about this you have to add a link to the compilder... but not works for me...

Good work!!!, the Isometric view , it´s very nice for some games, and very useful in applications...

I hope you release the code  :nw: :nw: :nw: :nw:

Offline Wampus

  • Prof. Inline
  • *****
  • Posts: 1004
    • View Profile
Re: Isometric look - can be freely rotated
« Reply #4 on: 2012-May-25 »
mentalthink I skipped using OpenGL and did the calculations in code instead. Since you and others have asked I'll upload the code into the snippets section once I've finished a business call.

Be aware that the code was done in a rush. There isn't much notation, there are a few duplicitous or unnecessary calculations and the zooming and rotating control is currently a hack rather than true zooming and rotation. There are also many things it doesn't do. For example, there is no function to translate screen co-ordinates to world co-ordinates. Still, I hope someone finds it useful.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4146
    • View Profile
    • Portfolio
Re: Isometric look - can be freely rotated
« Reply #5 on: 2012-May-25 »
Gasp! Amazing! And it moves smoothly with no glitches or anything, just perfect!
Such engine has a lot of potential, congratulations.

Offline Slydog

  • Prof. Inline
  • *****
  • Posts: 929
  • KodeSource
    • View Profile
    • KodeSource
Re: Isometric look - can be freely rotated
« Reply #6 on: 2012-May-25 »
Incredible!   :good:
It is very smooth!

How did you do the shading when a face rotates away from the 'camera'?
Did you just apply a shading factor based on how directly the face is towards the camera, then pass that factor to the polyvector command (using the colour parameter)?
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

Offline Wampus

  • Prof. Inline
  • *****
  • Posts: 1004
    • View Profile
Re: Isometric look - can be freely rotated
« Reply #7 on: 2012-May-25 »
Ok the code has been uploaded. The end result might look nice but really, the code was a rush job.  :-[ Here is the link: http://www.glbasic.com/forum/index.php?topic=8152.0

Incredible!   :good:
It is very smooth!

How did you do the shading when a face rotates away from the 'camera'?
Did you just apply a shading factor based on how directly the face is towards the camera, then pass that factor to the polyvector command (using the colour parameter)?

Yes, that's what it does. Depending on the angle it will pass darker or lighter colours to the polyvector command.

There is a quality variable. If you set it to 0 instead of 1 you can see what it looks like without shading. Not very good, basically. Hard to tell what's happening.

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4133
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: Isometric look - can be freely rotated
« Reply #8 on: 2012-May-25 »
That's really great and mirrors something that I was considering working on in the future (a Final Fantasy Tactics/Onimusha Tactics type TBS game).

Lovely :)
I came. I saw. I played.

Offline r0ber7

  • Prof. Inline
  • *****
  • Posts: 517
    • View Profile
Re: Isometric look - can be freely rotated
« Reply #9 on: 2012-May-25 »
Are those Minecraft textures?  ;)

Offline theprotocol

  • Mc. Print
  • *
  • Posts: 22
    • View Profile
Re: Isometric look - can be freely rotated
« Reply #10 on: 2012-May-26 »
This is extremely cool! Well done, Wampus.

How did you get the idea to do this?

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4146
    • View Profile
    • Portfolio
Re: Isometric look - can be freely rotated
« Reply #11 on: 2012-May-26 »
That's really great and mirrors something that I was considering working on in the future (a Final Fantasy Tactics/Onimusha Tactics type TBS game).

Yep, we need more tatical games, I´m quite a fan of both (and ogre battle too).
But you could also have an adventure going, like cadaver, or maybe something more rts like powermonger.

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4133
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: Isometric look - can be freely rotated
« Reply #12 on: 2012-May-26 »
I nearly added Ogre Battle and Disgaea but didn't want to weigh the post down too much...
I came. I saw. I played.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4146
    • View Profile
    • Portfolio
Re: Isometric look - can be freely rotated
« Reply #13 on: 2012-May-27 »
you should have :whip:
I never heard of Disgaea, now I will have to scavenge about it since I love tatical games! Thanks :good:

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4133
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: Isometric look - can be freely rotated
« Reply #14 on: 2012-May-27 »
Disgaea is/are one of the best 3D TBS games available. It's available on DS, PSP, PS2 and PS3 in various guises and ports. They are wonderfully inventive, with super silly attacks that'll have you laughing your socks off.
I came. I saw. I played.