Author Topic: 3D in Axe - Isometric Projection  (Read 20072 times)

0 Members and 2 Guests are viewing this topic.

Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
3D in Axe - Isometric Projection
« on: April 27, 2012, 10:39:18 am »
Since I always wanted to make some 3D ish stuff in axe, I tried to figure out how isometric graphics work and made a whole bunch of functions to draw pseudo 3D tiles on the screen and to display an 8x8x8 bit array as a model made from little cubies.
It supports 3-level greyscale.

I will post code or a tutorial later if you are interested, this is just a preview of my upcoming stuff and what I've done so far.

       ?    ?    ?    ?    ?
Spoiler For the interesting stuff:
My editor for a 3D map:
(reuploaded gif)



The grey is better on calc.

Download can be found here
« Last Edit: November 16, 2013, 02:09:03 pm by MGOS »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: 3D in Axe - Isometric Projection
« Reply #1 on: April 27, 2012, 11:35:33 am »
Interesting :)
What do you plan to do with it if everything goes well ?
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
Re: 3D in Axe - Isometric Projection
« Reply #2 on: April 27, 2012, 11:52:44 am »
The next thing would be an Tilemapper, and then I will try to convert other stuff to this perspective, like buildings or vehicles.
A huge advantage is that this routine is incredibly fast (it uses only add, subtract and shift operations) so even complex stuff can be displayed with still an decent speed. The main speed problem are indeed the calculations to detect what is displayed first, what next etc. In my 3D editor program I always draw everything, so with the number of cubies the speed drops.
« Last Edit: April 27, 2012, 11:53:34 am by MGOS »

Offline hellninjas

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 625
  • Rating: +17/-0
    • View Profile
Re: 3D in Axe - Isometric Projection
« Reply #3 on: April 27, 2012, 12:01:58 pm »
ehem... C&C in Axe! :D

I like the way this looks, and can't wait for the tutorial or download ^^!

Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
Re: 3D in Axe - Isometric Projection
« Reply #4 on: April 27, 2012, 12:21:12 pm »
Here's the download:

Keys:
Horizontal cursor movement:
vertical cursor movement:
Add block:
Remove block:
Clear all:
Calculate random terrain (in progress):  
Exit without deleting:
Keypad 7|8|4|5 (just like the directions in the space)
+ (deeper) - (higher)
2nd (Hold and move for staight lines)
ALPHA
DEL
MATH
CLEAR
Because of the lag if there are many blocks, you sometimes need to hold a key instead of just a short click.

The model is saved to the first 64 bytes of L1, so it stays if you leave.
The Axe app and other programs use this space, so you can get some interesting shapes (e.g. if you compile).

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: 3D in Axe - Isometric Projection
« Reply #5 on: April 27, 2012, 12:22:06 pm »
Wow, this is great, nice job!

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: 3D in Axe - Isometric Projection
« Reply #6 on: April 27, 2012, 02:31:51 pm »
hmm...what about having the graphics ala civilization 2? Basically, Isometric tiles with regular tiles set on top, overlapping the tops of the above tiles, but not below.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: 3D in Axe - Isometric Projection
« Reply #7 on: April 27, 2012, 02:43:30 pm »
Oh wow, I never noticed program was uploaded because you ninja'd me D: Still, cool! I want to see if I can make something similar in Grammer :D I think I can make it not slow down no matter how many blocks there are.

Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
Re: 3D in Axe - Isometric Projection
« Reply #8 on: April 27, 2012, 03:32:47 pm »
I want to see if I can make something similar in Grammer :D I think I can make it not slow down no matter how many blocks there are.

Intresting. The basic way of transforming (X|Y|Z) (Z is depth) to (A,B) on the screen is:
Code: [Select]
A = 2 * (Ymax + X - Y)
B = X + Y + 2 * Z

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: 3D in Axe - Isometric Projection
« Reply #9 on: April 27, 2012, 08:03:58 pm »
Looks really good, I'll have to check out the source sometime.
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: 3D in Axe - Isometric Projection
« Reply #10 on: April 27, 2012, 11:04:43 pm »
now can you implement bigger cube? if you do? maybe someone can make FFT... :D
Sig wipe!

Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
Re: 3D in Axe - Isometric Projection
« Reply #11 on: April 28, 2012, 02:12:25 am »
now can you implement bigger cube? if you do? maybe someone can make FFT... :D

You can implement whatever you want. That's the strength of this method.
The problem is that you need twice as much data for an isometric tilemapper than for a normal (viewn from above, 3-level grey) tilemapper, even though the size of the tiles is the same. The cuby needs atm 48 bytes of data. If you made a flat isometric tilemapper, each (8x8) tile would need 32 bytes of data. You can imagine that an 8x8x8 pixel rough terrain tile or a character would need then 64 bytes.

I'm now gonna try to make a flat tilemapper.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: 3D in Axe - Isometric Projection
« Reply #12 on: April 28, 2012, 10:21:46 am »
That looks pretty cool, the 3D tile-mapper O.o

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: 3D in Axe - Isometric Projection
« Reply #13 on: April 28, 2012, 01:28:57 pm »
Question, how is the speed if you make the map larger and allow tile-by-tile scrolling?

I remember people worked on such games before, but unfortunately they had problems with speed. I'm sure it can be done to run quite fast, but I am curious how.

Looks nice by the way!

Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
Re: 3D in Axe - Isometric Projection
« Reply #14 on: April 28, 2012, 01:38:38 pm »
The tilemapper isn't finished yet, but I'm able to display a tilemap and scrolle up/down and right/left. The main problem I have to solve is to detect which group of tiles actually needs to be drawn. Because I have a rectangular frame, it could be possible using an array mask with the coordinate offsets to one corner to move the whole map. This would need a lot of data, but once you figured out how that works, it'd be super fast I guess.
« Last Edit: April 28, 2012, 01:39:38 pm by MGOS »