Author Topic: Isometric look code  (Read 17985 times)

Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
Re: Isometric look code
« Reply #15 on: 2012-May-30 »
"Uint8array is not defined" error on my Android stock browser

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

Offline metzzo

  • Mr. Polyvector
  • ***
  • Posts: 140
  • Coolo ist cool!
    • View Profile
    • programming with design
Re: Isometric look code
« Reply #16 on: 2012-May-30 »
Yes I know. Uint8Array is used by the file functions... nothing much I can do against it because file commands really depend on that (Thats the reason why it doesn't work on IE, IE also has no Uint8Array implemented)

Try using Chrome for Android, maybe this browser supports it.
That's no Bug, that's my project!

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

Offline Wampus

  • Prof. Inline
  • *****
  • Posts: 1004
    • View Profile
Re: Isometric look code
« Reply #17 on: 2012-May-30 »
 :happy:

Albert that shading adds so much visual appeal. Fantastic job on the editor too. You've really made the code your own.

Re: the drop in performance when shading is enabled, I get that on the Galaxy S2 as well. If the S2 can't handle it smoothly then I think it should be considered too much for Android in general. However, at a much larger cost in texture memory (could be anything from 3-9 times) it would be possible to get something relatively smart by adding shading to tile textures directly. It wouldn't look as nice or be as flexible as your example but performance would be the same as non-shaded. Alternatively, at something approximately 2x the performance cost, shaded texture shapes could be added over drawn tiles. This would still give better or equivalent performance to a popular game like Epic Astro Story but the result would look and feel so much more...special.

Coolo performance may be poor on Firefox but even still, I was very excited to see GLBScript working like that.

Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
Re: Isometric look code
« Reply #18 on: 2012-Jun-01 »
Thanks.
I would love to see some gameobject moving in this isometric world. Do you have any progress?
I feel it a little bit like in wonderfl.net: somebody shares a good code, then some folks fork it.
Did you mind if I use your code in one of my game? I have got some new ideas.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4186
    • View Profile
    • Portfolio
Re: Isometric look code
« Reply #19 on: 2012-Jun-01 »
What a great job you guys are doing!

It is wonderful when people share their code and it gets revised by others.
IMHO It does feel like a community attempting to self improve on the fronts. Fells like team work.
Congratulations guys! :good:

Offline Wampus

  • Prof. Inline
  • *****
  • Posts: 1004
    • View Profile
Re: Isometric look code
« Reply #20 on: 2012-Jun-01 »
Thanks for encouragement Erico :)

Albert no progress but I've just started National Game Development Month so something is bound to happen. :)

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5014
  • O Rly?
    • View Profile
Re: Isometric look code
« Reply #21 on: 2012-Jun-02 »
you guys can make a like Minecraft game for handhelds :D
Ready to kick some a*s :D
« Last Edit: 2015-Sep-09 by Schranz0r »
I <3 DGArray's :D

PC:
AMD RYzen 7 1700 @3.9Ghz, 16GB HyperX Fury 2666Mhz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

Offline djtoon

  • Dr. Type
  • ****
  • Posts: 290
    • View Profile
Re: Isometric look code
« Reply #22 on: 2012-Jun-03 »
can you post the code on mediafire? and not dropbox ? the dl isnt working

Offline Wampus

  • Prof. Inline
  • *****
  • Posts: 1004
    • View Profile
Re: Isometric look code
« Reply #23 on: 2012-Jun-03 »
Re: Erico's comments about Voxels, I found a 50 page thread about creating a voxel engine in Unity3D. Lots of info: http://forum.unity3d.com/threads/63149-After-playing-minecraft...

I have sort of bad news from my end. While working on an alternative shading routine on Friday that would work fast enough on Android I wrote a list of what would be needed to get a decent game engine working. I realised the amount of code needed to get a finished game by the end of June made it a bad choice for NaGaDeMo. Well, I couldn't get anything great fun to play and nicely polished done in that time. Trying to do that might actually squander the potential of this isometric look. Instead I'll be finishing the (free version) Chaos remake this month.

:whistle:

Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
Re: Isometric look code
« Reply #24 on: 2012-Jun-04 »
Forget Minecraft.
If you have performace problems with large maps, see Bastion:
<a href="http://www.youtube.com/watch?v=VZAuKkv4eZE" target="_blank">http://www.youtube.com/watch?v=VZAuKkv4eZE</a>

You can make a tactical war game like FF Tactics or Ogre Tactics
<a href="http://www.youtube.com/watch?v=CCL2HxPuXQA" target="_blank">http://www.youtube.com/watch?v=CCL2HxPuXQA</a>

Or a sideview platformer like Fez:
<a href="http://www.youtube.com/watch?v=e6BU9rVUvgk" target="_blank">http://www.youtube.com/watch?v=e6BU9rVUvgk</a>

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4186
    • View Profile
    • Portfolio
Re: Isometric look code
« Reply #25 on: 2012-Jun-04 »
you guys can make a like Minecraft game für handhelds :D
Ready to kick some a*s :D

I would not doubt, they sure could.

But wouldn´t  an isometric ´minecraft´ get a little confusin on the underground parts?
Even the ´tatics´ game sometime seem like had a lot of efforts on level design because of that.

I remember one 3d itteration of Xcom (a remake) that the 3d levels were too confusing for me to play.
It was done kind of pure 3d, but I could never get a sense of location/space, the possibility to zoom and rotate to any degree made things quite hard on my end.

Back on minecraft, I do get lost underground a few times hehe, but the first person helps a lot getting about.

Performance wise, I remember Powermonger ( :nw:) as well as Populous, had a limited view port, probably a performance issue, specially on powermonger side as it was a 3d engine with kind of dinamic texture map.

Just some thoughts that leads to nothing hehe.  :P

Offline Wampus

  • Prof. Inline
  • *****
  • Posts: 1004
    • View Profile
Re: Isometric look code
« Reply #26 on: 2012-Jun-04 »
That Fez game has a unique look. Doing something new like that - feels different and plays different, is what I want to do myself eventually.

I love the creativity of Minecraft. Some elements of that game will become ubiquitous. Unfortunately, like Erico says, a Minecraft clone wouldn't work well with isometric project. I've seen attempts to do it on YouTube and wondered what the devs were thinking. An isometric take on Dwarf Fortress might be worth thinking about though. I know many people have been wanting/pondering such a thing.

Incidentally, regarding performance I got half-way to completing a shading engine that would, at most, double the scene rendering cost. Initially I found that the way I was planning to do it would require 1296 32x32 blocks of texture memory to render the shadows for top-down sides. I managed to reduce that to 6 16x16 blocks by rendering each corner separately without loss of image fidelity. Not often possible to reduce memory usage by a factor of 216 so that felt good. :)

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4186
    • View Profile
    • Portfolio
Re: Isometric look code
« Reply #27 on: 2012-Jun-04 »
...An isometric take on Dwarf Fortress might be worth thinking about though. I know many people have been wanting/pondering such a thing.

 :offtopic:
http://www.bay12forums.com/smf/index.php?PHPSESSID=cb155653655e00c8efd6718c42102cf1&topic=106497

These guys are doing a great job that exact way.
Try and get a version of DF called LazyNewbPack Advanced

It has that plus a lot more to make it really wonderful. Be carfull though, DF can ruin your life :P
Such an amazing work DF is, I never saw anything even remotely close to it.

Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
Re: Isometric look code
« Reply #28 on: 2012-Jun-07 »
I've made some optimization and some code clean-up in the last two-three days.
Interestingly the major bottleneck of the code was here:

Code: GLBasic [Select]
FUNCTION coordvalid: x,y,l
        IF x<0 THEN RETURN FALSE
        IF x>xmapd-1 THEN RETURN FALSE
        IF y<0 THEN RETURN FALSE
        IF y>ymapd-1 THEN RETURN FALSE
        IF l<0 THEN RETURN FALSE
        IF l>layers-1 THEN RETURN FALSE
        RETURN TRUE
ENDFUNCTION

putting all the IFs into one row made a huge performance boost, also changing the parameters to integer made another one:

Code: GLBasic [Select]
FUNCTION coordvalid: x%,y%,l%
        IF x<0 OR x>xmapd-1 OR y<0 OR y>ymapd-1 OR l<0 OR l>layers-1 THEN RETURN FALSE
        RETURN TRUE
ENDFUNCTION

I've also added the abilities for slopes, but the shade is wrong on them, also the face culling for blocks next to them :)
Made some preparation and optimization for a Fez like game. Also expanded the debug and the setting with some useful stuff.
Also added a incredible slow wireframe mode.

Download source and binary: https://dl.dropbox.com/u/292449/glbasic/iso/isometric.zip
Download directly for Android: https://dl.dropbox.com/u/292449/glbasic/iso/isometric_optimized.apk


Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
Re: Isometric look code
« Reply #29 on: 2012-Jun-07 »
Oh there is some texture mapping problem:

The topgrass is missing from some sides, depending how the triangles generated