Author Topic: Psuedo mode 7 with lines?  (Read 12161 times)

0 Members and 1 Guest are viewing this topic.

Offline boot2490

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 607
  • Rating: +54/-36
    • View Profile
    • Boot2490's Stuff
Psuedo mode 7 with lines?
« on: February 21, 2012, 07:21:41 pm »

What do you think?


...Mario Kart on the 83...?
I'm not worried about SOPA creating censorship, that will not stand for long. I'm worried that they'll succeed in stopping piracy!

Spoiler For Signature, updated march 23, 11:28 PM EST:















An useful tool!

PM me if you need some help. I am glad to be of assistance and part of the TI Communnity.

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Psuedo mode 7 with lines?
« Reply #1 on: February 21, 2012, 07:23:53 pm »
It kinda reminds me how DJ got his dungeon map generated, which was about generating map based on a "minimap" he stored in the Picture file.
But I wonder how fast will that mode 7 thingy be with TI-BASIC O.o
Sig wipe!

Offline boot2490

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 607
  • Rating: +54/-36
    • View Profile
    • Boot2490's Stuff
Re: Psuedo mode 7 with lines?
« Reply #2 on: February 21, 2012, 07:24:32 pm »
Probably AXE.
« Last Edit: February 21, 2012, 07:24:40 pm by boot2490 »
I'm not worried about SOPA creating censorship, that will not stand for long. I'm worried that they'll succeed in stopping piracy!

Spoiler For Signature, updated march 23, 11:28 PM EST:















An useful tool!

PM me if you need some help. I am glad to be of assistance and part of the TI Communnity.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Psuedo mode 7 with lines?
« Reply #3 on: February 21, 2012, 08:32:47 pm »
I think it's probably more like wireframe 3d than mode7. I suppose it could be faster than mode7 because it doesn't have to loop through each pixel on the screen, but it does look rather lonely :P
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline boot2490

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 607
  • Rating: +54/-36
    • View Profile
    • Boot2490's Stuff
Re: Psuedo mode 7 with lines?
« Reply #4 on: February 21, 2012, 08:39:44 pm »
It would look better when it was animated.
And it would be SO much faster!

How would it work, though? How would it know how to translate the points from the lines on to a plane sort of thing?
« Last Edit: February 21, 2012, 08:45:14 pm by boot2490 »
I'm not worried about SOPA creating censorship, that will not stand for long. I'm worried that they'll succeed in stopping piracy!

Spoiler For Signature, updated march 23, 11:28 PM EST:















An useful tool!

PM me if you need some help. I am glad to be of assistance and part of the TI Communnity.

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: Psuedo mode 7 with lines?
« Reply #5 on: February 21, 2012, 08:46:03 pm »
It kinda reminds me how DJ got his dungeon map generated, which was about generating map based on a "minimap" he stored in the Picture file.
But I wonder how fast will that mode 7 thingy be with TI-BASIC O.o
It was 2D, though, and didn't use lines.

However a racing game attempted a similar method in the past I think, or maybe it was a different one, but it still drew tracks with lines. It had slopes, though: 

http://www.ticalc.org/archives/files/fileinfo/126/12690.html

It didn't support clipped lines, though (as you can see, it doesn't use the entire screen)

Offline boot2490

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 607
  • Rating: +54/-36
    • View Profile
    • Boot2490's Stuff
Re: Psuedo mode 7 with lines?
« Reply #6 on: February 21, 2012, 08:47:46 pm »
I was thinking, for the one I actually made, that the line positions would be predetermined, like 20 or so possible track pieces.
I'm not worried about SOPA creating censorship, that will not stand for long. I'm worried that they'll succeed in stopping piracy!

Spoiler For Signature, updated march 23, 11:28 PM EST:















An useful tool!

PM me if you need some help. I am glad to be of assistance and part of the TI Communnity.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Psuedo mode 7 with lines?
« Reply #7 on: February 21, 2012, 08:48:07 pm »
Though, it's not like my mode7 engine is super slow, either. The current version of it gets about 19 frames per second at the 15MHz speed (and the framerate stays pretty constant -- the line drawing method's speed could vary greatly with the number of lines that are onscreen)

Edit: Of course, not to discourage trying this method at all.
« Last Edit: February 21, 2012, 08:49:05 pm by calc84maniac »
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline boot2490

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 607
  • Rating: +54/-36
    • View Profile
    • Boot2490's Stuff
Re: Psuedo mode 7 with lines?
« Reply #8 on: February 21, 2012, 08:56:47 pm »
I have no idea how it would translate the line data onto a mode7 style 3d plane. Like, no idea almost. almost... I think I got it... not quite. Something to do with it finding the points within that view cone thing... lost it. How does yours work?
I'm not worried about SOPA creating censorship, that will not stand for long. I'm worried that they'll succeed in stopping piracy!

Spoiler For Signature, updated march 23, 11:28 PM EST:















An useful tool!

PM me if you need some help. I am glad to be of assistance and part of the TI Communnity.

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: Psuedo mode 7 with lines?
« Reply #9 on: February 21, 2012, 08:59:25 pm »
How would collision detection work, by the way?

@Calc84maniac that's in ASM, though, right?
« Last Edit: February 21, 2012, 08:59:56 pm by DJ_O »

Offline boot2490

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 607
  • Rating: +54/-36
    • View Profile
    • Boot2490's Stuff
Re: Psuedo mode 7 with lines?
« Reply #10 on: February 21, 2012, 09:01:46 pm »
Probably with a pixel test of sorts, but what about offroad, is the question..
I'm not worried about SOPA creating censorship, that will not stand for long. I'm worried that they'll succeed in stopping piracy!

Spoiler For Signature, updated march 23, 11:28 PM EST:















An useful tool!

PM me if you need some help. I am glad to be of assistance and part of the TI Communnity.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Psuedo mode 7 with lines?
« Reply #11 on: February 21, 2012, 09:03:44 pm »
Well, I actually translate pixel coordinates into world coordinates for the mode7 renderer, not the other way around. However, I do occasionally have to translate world coordinates into pixel coordinates, in the case of the movable sprite objects. Basically, I get the relative offset from the camera by subtracting the camera coordinates and then rotating that offset by the camera angle (which requires some multiplications by the cosine and sine of the camera angle). Then I calculate the pixel row and column by using some division and stuff.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: Psuedo mode 7 with lines?
« Reply #12 on: February 22, 2012, 02:42:36 am »
The way you explained that using such casual terms makes it sound like it's all just trivial, obvious calculations. :P Just made me laugh, that's all...
There's something about Tuesday...


Pushpins 'n' stuff...


Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Psuedo mode 7 with lines?
« Reply #13 on: February 22, 2012, 05:39:38 am »
Haha yeah, I just don't want to get the exact calculations unless it's really necessary, because I don't feel like deciphering my old code :P
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline boot2490

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 607
  • Rating: +54/-36
    • View Profile
    • Boot2490's Stuff
Re: Psuedo mode 7 with lines?
« Reply #14 on: February 22, 2012, 07:01:06 pm »
So, it would calculate a trapezoid, and find all of the lines that show up in that trapezoid. At the bottom of the trapezoid, or the "camera", the points remain the same, relatively speaking, and they are drawn on the bottom of the screen. However, points that show up at the top are moved in towards the middle of the trapezoid, width-wise, according to how far they are away from the viewer, or how close to the top of the "perspective cone", and are drawn closer to the horizon line.

Like this:
I'm not worried about SOPA creating censorship, that will not stand for long. I'm worried that they'll succeed in stopping piracy!

Spoiler For Signature, updated march 23, 11:28 PM EST:















An useful tool!

PM me if you need some help. I am glad to be of assistance and part of the TI Communnity.