Author Topic: Isometric look code  (Read 17736 times)

Offline Wampus

  • Prof. Inline
  • *****
  • Posts: 1004
    • View Profile
Isometric look code
« on: 2012-May-25 »
Isometric look - code and some notes



You can download a compiled sample app here: http://www.mediafire.com/file/sr8z51bbwe8d96f/isometricdemo.app.zip
Instructions for the compiled app here: http://www.glbasic.com/forum/index.php?topic=8151.0

Attached to this post is the source code.

There isn't much notation at all about what does what. I used TexturePacker for packing the textures (exporting as Gideos format). The layers of blocks were made with SimpleTileEditor. I wasn't intending this for general release, just a proof of concept after I had the idea. Sorry if the code is not very accessible.

[attachment deleted by admin]

MrTAToad

  • Guest
Re: Isometric look code
« Reply #1 on: 2012-May-25 »
I'll see what it's like on Android :)

Its not bad at all - it could be a good alternative to 3D
« Last Edit: 2012-May-25 by MrTAToad »

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4181
    • View Profile
    • Portfolio
Re: Isometric look code
« Reply #2 on: 2012-May-25 »
Its not bad at all - it could be a good alternative to 3D

Yep, it would be nice to have a solution for sprites too or maybe diagonal blocks.
Maybe the engine can be adapted to work the same way on a kind of ´voxel´ sprite?
just some thoughts, I read the code later to catch an idea.

Offline Wampus

  • Prof. Inline
  • *****
  • Posts: 1004
    • View Profile
Re: Isometric look code
« Reply #3 on: 2012-May-25 »
A sprite function was something I was going to put in but didn't have time yesterday. Shouldn't be too hard though. I have the photoshop template ready for constructing them. I don't have much knowledge about real voxels. However, there are some more ways the routine can be optimised.

I tested the routine on Android and was surprised at how quick it was on weaker devices. Because of that I am now intending to improve the engine and create a basic game with it. Fun stuff.

Offline fuzzy70

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 828
  • Look left, Look right, LOOK OUT!!
    • View Profile
Re: Isometric look code
« Reply #4 on: 2012-May-26 »
Love the effect Wampus, Am working on an Isometric routine myself although nowhere near as smart looking as yours  :nw:

Lee
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4181
    • View Profile
    • Portfolio
Re: Isometric look code
« Reply #5 on: 2012-May-26 »
...Because of that I am now intending to improve the engine and create a basic game with it. Fun stuff.

Please DO! :good:

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2606
    • View Profile
Re: Isometric look code
« Reply #6 on: 2012-May-29 »
Little late to the party but this looks very nice, it's screaming for some sort of RPG or turn based game. Well done!  :good:
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

MrTAToad

  • Guest
Re: Isometric look code
« Reply #7 on: 2012-May-29 »
Or some improvement on Minecraft!

Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
Re: Isometric look code
« Reply #8 on: 2012-May-29 »
I've played a lot of this code.
Added vertical camera tilt, fixed half bricks topside render problem and added shade (press SPACE to toggle)

download: http://dl.dropbox.com/u/292449/glbasic/iso/isometricCODE.zip




Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4181
    • View Profile
    • Portfolio
Re: Isometric look code
« Reply #9 on: 2012-May-30 »
gasp cough :O
I guess I will just pack up and move to the country side and go plant potatoes...

...really great feats coming from this!

Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
Re: Isometric look code
« Reply #10 on: 2012-May-30 »
We want an editor!

Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
Re: Isometric look code
« Reply #11 on: 2012-May-30 »
Android version: http://dl.dropbox.com/u/292449/glbasic/iso/glbasic-debug.apk
Rotate: touch and drag or fling
Zoom: touch the left side of the screen and drag up/down
Toggle shade: touch the upper-left corner of the screen
« Last Edit: 2012-May-30 by Albert »

MrTAToad

  • Guest
Re: Isometric look code
« Reply #12 on: 2012-May-30 »
Runs very fast on my Android phone, although the screen size was set to be something larger than 320 x 480 :)


Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
Re: Isometric look code
« Reply #13 on: 2012-May-30 »
I've made a simple editor (using my IMGUI library)

Download for WIN32: http://dl.dropbox.com/u/292449/glbasic/iso/isometricEditor.zip
Download for Android: http://dl.dropbox.com/u/292449/glbasic/iso/isometric-editor.apk
With this large map Android version is running with lower FPS here when 'shaded' enabled, and running with full FPS if I disable it (Samsung Galaxy S), use the controlls on the window named 'settings'.


Offline metzzo

  • Mr. Polyvector
  • ***
  • Posts: 140
  • Coolo ist cool!
    • View Profile
    • programming with design
Re: Isometric look code
« Reply #14 on: 2012-May-30 »
Hey!

I wanted to see if GLBScript is capable of compiling and running this nice piece of code. Compiling was no problem and for executing I had to fix some bugs (mainly related to POLYVECTOR)

Here is the running example: http://programming-with-design.at/files/GLBScript/Isometric/GLBFile.html
Sadly Firefox is really slow, but Chrome seems to be the fastest (InternetExplorer does not even start...)
That's no Bug, that's my project!

http://programming-with-design.at/