Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: lookitsan00b on January 19, 2011, 05:07:26 pm

Title: Isometry
Post by: lookitsan00b on January 19, 2011, 05:07:26 pm
Read the screenie :P
Spoiler For just in case your browser doesn't support .gifs (i.e. IE8):
Its an isometric graphics engine made in Axe, with an awesome demo map.

Soon its gonna support scenery, and the map should probably be compressed somehow.

I already have an awesome tree sprite.
Title: Re: Isometry
Post by: Munchor on January 19, 2011, 05:08:24 pm
This is fantastic, it reminds me of Habbo, which sucks, unlike this! Source?
Title: Re: Isometry
Post by: lookitsan00b on January 19, 2011, 05:10:58 pm
justasec, I'll extract it from my calc :P

horribly uncomressed map data, I know.

ISOENG is the executable
Title: Re: Isometry
Post by: Munchor on January 19, 2011, 05:12:04 pm
What are all those comments in the beginning of the code?

It looks nice, though.
Title: Re: Isometry
Post by: yunhua98 on January 19, 2011, 05:12:04 pm
Thats amazing!  I tried to attempt something like this a while back, but I failed, although I might be able to do it now...
Title: Re: Isometry
Post by: Munchor on January 19, 2011, 05:12:54 pm
Thats amazing!  I tried to attempt something like this a while back, but I failed, although I might be able to do it now...

This reminds me of the RayCaster engine, now we can start making stuff out of this, thanks looksitan00b, not you, though.
Title: Re: Isometry
Post by: Xeda112358 on January 19, 2011, 05:14:22 pm
Hrm, I like it! Um, is your emulator not on 100%? If it is set higher, the .gif will seem slower.
Title: Re: Isometry
Post by: lookitsan00b on January 19, 2011, 05:16:04 pm
Thats amazing!  I tried to attempt something like this a while back, but I failed, although I might be able to do it now...
Thanks ;D
What are all those comments in the beginning of the code?

It looks nice, though.
in prgmISO, thats the code for a random map generator. simply uncomment that, and change 'Str1->M' to 'L1->M'
in prgmTIMG, its so I don't forget what the images are.
Hrm, I like it! Um, is your emulator not on 100%? If it is set higher, the .gif will seem slower.
umm.. all I cnanged from default was the autosave name and set the .gif framerate to 9. yeah, it is pretty slow.

now that I think about it, I probably should be drawing vertical lines rather than looping through 16x16 'pt-Mask('s
Title: Re: Isometry
Post by: Xeda112358 on January 19, 2011, 05:29:01 pm
Ah, okee. It might be just the OS on the homescreen thing. Still that is really cool! I wish I knew Axe... And you say you have tree made already?!? Does that mean you are making a 3D tilemap engine?! That could be really cool!
Title: Re: Isometry
Post by: ztrumpet on January 19, 2011, 05:31:01 pm
Wow, looks great!  Nice job! ;D
Title: Re: Isometry
Post by: lookitsan00b on January 19, 2011, 06:16:55 pm
I temporarily removed the part that draws the tile all the way to the bottom, and look at the speed potential!  Floating blocks FTW.

Trees officially work, at the cost of an extra byte per tile.  Gotta get some compression now.

Anybody know a good way to draw lots of vertical lines quickly and safely?  Since the tiles snap to bytes, I could simply calculate the proper bytes and write $8181 to them.

I'm still waiting for somebody to tell me where I pulled that map from :P
Title: Re: Isometry
Post by: yunhua98 on January 19, 2011, 06:18:08 pm
Nice!   I think it looks better without drawing tiles all the way down.  ;)
is this at 15mHz or 6mHz?
Title: Re: Isometry
Post by: lookitsan00b on January 19, 2011, 06:22:16 pm
6mhz ;D

Yeah, it does look pretty cool with just floating blocks, but not for what I eventually want it to do.  I eventually want it to not draw so many vertical lines... they're a little annoying.
Title: Re: Isometry
Post by: Xeda112358 on January 19, 2011, 06:27:19 pm
Oh my g. That is really looking cool! Um, I am not familiar with axe, but I know how to do it in regular assembly (making vertical lines). But yeah, are you familiar with making tilemap data? Each byte can be a tile. Like, if the byte is 00, draw nothing, if it is 01, draw just the tile, if it is 02, draw a tree, if it is 03, draw a tile and a tree. Pretty much, if the number is odd, draw a tile and a pic, if it is even, draw a pic. I might be able to make some random opcodes...
Title: Re: Isometry
Post by: Binder News on January 19, 2011, 06:50:53 pm
How about using the Line function? As for compression, how about X,Y, and Z coordinates? More later, homework time.
Title: Re: Isometry
Post by: FinaleTI on January 19, 2011, 06:52:55 pm
For drawing vertical lines, you could use Line() or Rect() with a width of 1.
Title: Re: Isometry
Post by: lookitsan00b on January 19, 2011, 07:18:19 pm
Oh my g. That is really looking cool! Um, I am not familiar with axe, but I know how to do it in regular assembly (making vertical lines). But yeah, are you familiar with making tilemap data? Each byte can be a tile. Like, if the byte is 00, draw nothing, if it is 01, draw just the tile, if it is 02, draw a tree, if it is 03, draw a tile and a tree. Pretty much, if the number is odd, draw a tile and a pic, if it is even, draw a pic. I might be able to make some random opcodes...
Yep, I'm familiar with tilemap data... but this is awkward.  I need an X, Y, and Z coordinate for each tile, as well as tile type.
For drawing vertical lines, you could use Line() or Rect() with a width of 1.
Oh wow.. thanks I totally forgot Rect(). That totally solves all of my problems!!!  :hyper: ;D :D :o :hyper: :w00t:

and yeah, I tried the line function... it kept randomly giving negative numbers, and was way too slow.
Title: Re: Isometry
Post by: Xeda112358 on January 19, 2011, 07:21:33 pm
Ah, so you plan to have a lot of "levels" available? That is really cool!
Title: Re: Isometry
Post by: Binder News on January 19, 2011, 07:50:51 pm
You only need to map the top part of each column, right? So you could arrange everything by X and Y, then before drawing the object, draw the vertical connector lines. This way, they would be erased by the tile when it's drawn. I'll make a mock up later after I finish my HW.
Title: Re: Isometry
Post by: shmibs on January 19, 2011, 08:11:13 pm
/\yes, draw the tiles that are furthest away and move towards the viewer. this looks pretty kewl!

oh, and hi again, xeda!
Title: Re: Isometry
Post by: willrandship on January 19, 2011, 10:59:52 pm
That even leaves a possible optimization :P

Title: Re: Isometry
Post by: Happybobjr on January 19, 2011, 11:06:14 pm
I'm still waiting for somebody to tell me where I pulled that map from :P

Final Fantasy Tactics Advance


Looks great.  (hint hint ^)
Title: Re: Isometry
Post by: lookitsan00b on January 20, 2011, 09:41:34 am
Yay! It's recognizable!  Now even more so ;D

Got vertical lines working :) (came out to 4 Rect(/RectI( commands per tile, virtually bug-free, see screenie for only known bug)

Now what should water look like?  Transparent or just a couple waves?  Should it look different on the sides?

I had a little trouble with the new tiles.  Turns out Pt-Mask( and FlipH( don't like each other.  The back layer gets flipped, but the front doesn't.  Spits out garbage instead of a pretty tile... So I had to include images for the flipped tiles instead.
Title: Re: Isometry
Post by: DJ Omnimaga on January 20, 2011, 09:45:47 am
Darn that looks so impressive! Great job! I always wanted to see an isometric game. I hope someone makes one for calcs. Would it be possible to not lose speed if you add blocks at the bottom so it won't look like floating blocks, though? Because if yes, then someone could maybe redo Kirby's Dream Course (Kirby Bowl) for calcs. :D
Title: Re: Isometry
Post by: lookitsan00b on January 20, 2011, 09:57:52 am
Darn that looks so impressive! Great job! I always wanted to see an isometric game. I hope someone makes one for calcs. Would it be possible to not lose speed if you add blocks at the bottom so it won't look like floating blocks, though? Because if yes, then someone could maybe redo Kirby's Dream Course (Kirby Bowl) for calcs. :D
Well, I do have it displaying the blocks at the bottom at a better speed than before... probably not good enough for like a racing game, but perfect for an rpg, methinks. ;)  Of course, I'll still try and make it faster.
Title: Re: Isometry
Post by: Happybobjr on January 20, 2011, 10:38:02 am
Yay! It's recognizable!  Now even more so ;D

Got vertical lines working :) (came out to 4 Rect(/RectI( commands per tile, virtually bug-free, see screenie for only known bug)

Now what should water look like?  Transparent or just a couple waves?  Should it look different on the sides?

I had a little trouble with the new tiles.  Turns out Pt-Mask( and FlipH( don't like each other.  The back layer gets flipped, but the front doesn't.  Spits out garbage instead of a pretty tile... So I had to include images for the flipped tiles instead.
So was I right.  Is it from Final Fantasy Tactics Advance?


Is this just an engine or everyone to use?  Or are you planning to make a game with it first.
(Hint^ :P)
Title: Re: Isometry
Post by: lookitsan00b on January 20, 2011, 11:34:58 am
So was I right.  Is it from Final Fantasy Tactics Advance?
Yep :P

Is this just an engine or everyone to use?  Or are you planning to make a game with it first.
(Hint^ :P)
Yes, and yes. ;) I don't mind whatsoever if anybody wants to use this (or just parts), but the sprites are currently being oriented towards a Tactics game I fully intend to make.
Title: Re: Isometry
Post by: Happybobjr on January 20, 2011, 12:38:19 pm
SWEET!!!
IT WAS THE BEST GAME EVER!
If there is anything i can do to help, don't hesitate to ask.
Title: Re: Isometry
Post by: Ashbad on January 20, 2011, 02:00:15 pm
Normally I avoid saying this unless I absolutely think something is awesome, but:

holyfuckingshitholyfuckingshitholyfuckingshit sw33t ;D
Title: Re: Isometry
Post by: willrandship on January 20, 2011, 05:34:11 pm
Well, for DJ's idea you don't need any more blocks, just make it so the lines always go to the bottom of the screen.

Simply amazing though!
Title: Re: Isometry
Post by: Ranman on January 20, 2011, 05:56:52 pm
Another amazing looking project.

Just imagine all of the games that could be made with this engine -- wow!
Title: Re: Isometry
Post by: squidgetx on January 20, 2011, 07:11:37 pm
O.o

Awesomesauce. Really nice work there. The slanted tiles are especially impressive
Title: Re: Isometry
Post by: lookitsan00b on January 20, 2011, 08:05:04 pm
O.o

Awesomesauce. Really nice work there. The slanted tiles are especially impressive
I actually have to revise every single slanted tile... Gotta take the bottom line off.  Sure, the cases where that line would show up are pretty rare, it is still not supposed to be there.  Its not visible in the screenie because every sloped tile is no more than one level higher than the tiles around it.  But that'll be a pain...

Another amazing looking project.

Just imagine all of the games that could be made with this engine -- wow!
Isometric chess just popped into my head randomly :P
Title: Re: Isometry
Post by: Ashbad on January 20, 2011, 08:09:04 pm
I think you should release this in more of a library and then I can make it into an axiom for ya and optimize it for speed and size.
Title: Re: Isometry
Post by: Xeda112358 on January 20, 2011, 08:10:02 pm
Awesomesauce? Is that regional? I know a girl who liked to use that a lot... But yeah, that describes this proggy exactly!
Title: Re: Isometry
Post by: Ashbad on January 20, 2011, 08:10:36 pm
....proggy? :P

never heard that one before :)
Title: Re: Isometry
Post by: Xeda112358 on January 20, 2011, 08:12:31 pm
Bah, you say program, I say apple or however that saying goes :P But holy cow, Checkers or chess would be amazing. Oh, and if you want to go insane, you should make it able to rotate the map... on all axes! (no pun intended...)
Title: Re: Isometry
Post by: squidgetx on January 20, 2011, 08:14:30 pm
Awesomesauce? Is that regional? I know a girl who liked to use that a lot...
Not sure...Where (generally, and if you want to answer) do you live?
Title: Re: Isometry
Post by: Xeda112358 on January 20, 2011, 08:17:26 pm
Erm upstate New York, but the she is from Massachusetts.
Title: Re: Isometry
Post by: Happybobjr on January 20, 2011, 08:18:45 pm
are you near Boston? (if you want to answer)
Title: Re: Isometry
Post by: squidgetx on January 20, 2011, 08:19:26 pm
Hm, I'm in NJ :P I only know one other friend that uses it though...it's like our custom phrase. It's weird how these things get around
Title: Re: Isometry
Post by: Happybobjr on January 20, 2011, 08:20:19 pm
you once used proggy, I use that verbally now :P.
Title: Re: Isometry
Post by: Ashbad on January 20, 2011, 08:21:10 pm
lol so off topic :P

banana
Title: Re: Isometry
Post by: Xeda112358 on January 20, 2011, 08:28:28 pm
Banana wrappers. No, I live more toward the Great Lakes (western n'york) But I have a few friends from New Jersey :D
Title: Re: Isometry
Post by: DJ Omnimaga on January 20, 2011, 08:42:32 pm
I think awesomesauce is common on internet forums, but is not used by the majority of people.

Also I can't wait to see what people will make with this. Has anyone thought about doing marble madness? I think Benryves actually attempted one before, but he never finished it.

As for Kirby Bowl and Marble Madness here's what I mean:



Title: Re: Isometry
Post by: Ashbad on January 20, 2011, 08:44:25 pm
yeah, I would do marble madness, but first I would convert this to an axiom and make it faster before I made a product with it.
Title: Re: Isometry
Post by: DJ Omnimaga on January 20, 2011, 10:10:44 pm
An axiom would actually be cool, if we can customize it and stuff. It would allow for more projects :D
Title: Re: Isometry
Post by: Munchor on January 21, 2011, 03:28:32 pm
yeah, I would do marble madness, but first I would convert this to an axiom and make it faster before I made a product with it.

Axiom Isometry Games would be interesting. However, I can't really see what kind of games could be made with this engine :S I can only come up with Habbo :P
Title: Re: Isometry
Post by: Ashbad on January 21, 2011, 03:30:49 pm
I think this engine, while still long ways away from being immaculate in speed, size, and graphics, can still be used for some really cool projects; I can think of at least 50 different ways to use it, like a 3D pinball or rollercoaster creator
Title: Re: Isometry
Post by: Munchor on January 21, 2011, 03:31:52 pm
I think this engine, while still long ways away from being immaculate in speed, size, and graphics, can still be used for some really cool projects; I can think of at least 50 different ways to use it, like a 3D pinball or rollercoaster creator

ROLLERCOASTER, hahah I'd love that.
Title: Re: Isometry
Post by: Ashbad on January 21, 2011, 03:34:09 pm
How about a rollercoaster game with a pinball machine attached to the coaster seats ;D
Title: Re: Isometry
Post by: Munchor on January 21, 2011, 04:09:38 pm
How about a rollercoaster game with a pinball machine attached to the coaster seats ;D

Is there a pinball already?

Well, I prefer 2D Pinball, but that would be interesting to code :)
Title: Re: Isometry
Post by: Ashbad on January 21, 2011, 04:10:44 pm
no pinball in quasi-3D yet, but there was a most excellent one on ticalc that had a really long and weird name that started with an 'A' that was awesome.
Title: Re: Isometry
Post by: ztrumpet on January 21, 2011, 04:19:23 pm
Acelgoyobis
http://www.ticalc.org/archives/files/fileinfo/355/35586.html
It means "little steel ball" in Hungarian. :)
Title: Re: Isometry
Post by: Munchor on January 21, 2011, 04:20:18 pm
It has a jAva map editor?
Title: Re: Isometry
Post by: lookitsan00b on January 21, 2011, 05:54:55 pm
An axiom would actually be cool, if we can customize it and stuff. It would allow for more projects :D
I don't think that's likely to happen.  Nobody is going to want to be limited to the built-in sprites, and I really don't think that axioms are that customizable, but I wasn't around when they were an option, so idk.  The most I could give is something that calculates X and Y from X, Y, and Z, a 16x16 Pt-Mask(), and a couple rect()'s.  That comes out to (in unoptimized axe, ASM would be soo much easier):
Spoiler For big code block:
Code: [Select]
:Pt-16-Iso(X,Y,Z,Pic_16_With_Mask)

:[00000000]->Str1  .temporary memory space, so we don't have to use named variables (won't work with apps)
:r1-r2*8->{Str1}                   .X on screen
:r1+r2-r3*4->{Str1+1}           .Y

:.Draw the two bottom lines any which way, I used masked sprites :P

:.Just in case Y is off the top of the screen (can be ignored if that limitation is removed)
:If {Str1+1}+16<<0
:0->{Str1+2}
:r3*4+{Str1+1}+16->{Str1+3}
:Else
:{Str1+1}+16->{Str1+2}
:r3*4->{Str1+3}
:End

:.Connector lines
:Rect({Str1},{Str1+2},8,{Str1+3})
:Rect({Str1}+8,{Str1+2},8,{Str1+3})  .Because if X is off the left side...
:RectI({Str1}+1,{Str1+2},6,{Str1+3})
:RectI({Str1}+9,{Str1+2},6,{Str1+3}) .same

:Pt-Mask_16({Str1},{Str1+1},r4)

Main problem with my current setup is that I have to draw so many rectangles and do so many calculations.  The task is trivial in ASM, as, for the connector lines, all you have to do is load $8181 to a column...

On second thought, an axiom would be so useful.  However, a X/Y offset argument would be useful, especially for smoother scrolling (just add or subtract from the initial X/Y calculations).

I'm having trouble with compression in my program, tho.  It works perfectly fine with uncompressed data, but when I try to compress something, it messes everything up. :(

The compression should work like:
Spoiler For compression example:
Code: [Select]
Uncompressed data:  (format: [TTXXYYZZ], TT=tile type)
[00010101]
[00020101]
[00030101]
[00040102]
[00050003]
[00050102]
[00060102]
[00070102]

Compressed Data:
[F00007]  //make T=00 for 7 blocks, not including exceptions... lol oxymoron
[F1010107]  //auto-increment X, and keep Y=01 for 7
[F30103]  //make Z=1 for 3 blocks
[FF] //ignore me and loop, stupid program
[FE00050003] //EXCEPTION! ignore everything else and interpret this as uncompressed
[F30204]  //make Z=2 for the last four blocks
[FF] //:P
That compresses 32 bytes to 20 bytes!!! (most maps would get a much better ratio)

PS: the compression codes were specifically chosen to represent the task they perform, for example, F1 replaces bytes starting at 1, FE is an exception...
It has a jAva map editor?
Are you offering? ;) I don't know much java. ???
Title: Re: Isometry
Post by: Binder News on January 21, 2011, 06:36:23 pm
I would do a Java map editor. I know a lot of Java.
Title: Re: Isometry
Post by: Builderboy on January 22, 2011, 03:06:46 am
I think maybe an Axiom that does the tilemapping based on window settings and tilemap width would be actually pretty neat!  You could have a setup function where you could give it the Matrix address, the sprite address, and the mask address, the map width and height, and the window size and it would be all set up.  After that, just a simple Draw(X,Y) would render the screen at that point! With maybe a couple more commands for drawing isometric sprites.
Title: Re: Isometry
Post by: Binder News on January 22, 2011, 10:08:26 am
@^^ Yeah! That would be AWESOME!
Title: Re: Isometry
Post by: Happybobjr on January 26, 2011, 10:30:56 pm
How is progress going?
Is it halted because your Ti-94+SE is crashed?
Title: Re: Isometry
Post by: kalan_vod on January 26, 2011, 11:24:04 pm
Looks like a great demo you have going on, I hope this is finished one day! That is a custom compression technique :P
Title: Re: Isometry
Post by: DJ Omnimaga on January 27, 2011, 12:54:13 am
How is progress going?
Is it halted because your Ti-94+SE is crashed?
He's working on a Final Fantasy Tactics Arena game using the engine.
Title: Re: Isometry
Post by: Builderboy on January 27, 2011, 01:05:07 am
Heh I can't wait to see this Final fantasy Tactics game :D
Title: Re: Isometry
Post by: lookitsan00b on January 28, 2011, 05:31:34 pm
now that I think about it, I should've posted a link here... :P

After all I did link there to this thread...

Final Fantasy Tactics Advance TI Arena (http://ourl.ca/8933/167667)
Title: Re: Isometry
Post by: DJ Omnimaga on January 30, 2011, 04:50:46 am
Note, the black underline text above is an actual link, for those who haven't noticed. The color kinda hides the fact it's a link lol. :P
Title: Re: Isometry
Post by: Xeda112358 on January 30, 2011, 11:21:13 am
Wow, this is going to be really cool, isn't it? I've never played Final Fantasy Tactics, but it sounds fun!