Page 1 of 2

mode 7

Posted: Wed 11 Apr, 2012 12:07 pm
by tr1p1ea
Since there hasn't been anything in here in ages, i thought id just add something quick.

Been messing with mode 7 over the past 2 weeks, mainly during lunch at work *hides*.

Very rough and not awesomely accurate (uses lots of shortcuts :)), but its kind of the effect:

Image Image

Its only a side project for kicks, i don't think anything will become of it. Just in case anyone is paying these forums any attention :).

Re: mode 7

Posted: Thu 12 Apr, 2012 1:57 am
by Xeda
That is really cool o.o I need to better figure this stuff out o.o Do you read from a bitmap to figure out which regions should be darkened? In other words, are you pretty much viewing a bitmap from ground level, so to speak?

Re: mode 7

Posted: Thu 12 Apr, 2012 8:29 am
by tr1p1ea
Thats kind of the idea. You can read from a bitmap or in this case a tilemap to save space.

Basically the idea is for each line you draw you apply a scaling factor. To apply rotations its kind of like a line routine that steps through your image data each line using the magic of trig.

Im assuming anyone who has dabbled in calc mode7 has got their inspiration from this: http://www.helixsoft.nl/articles/circle/sincos.htm

Very good resource :).

Re: mode 7

Posted: Thu 12 Apr, 2012 8:21 pm
by shmibs
/me got all excited when you posted this in irc.

what sorts of shortcuts did you use? it looks fast and not too fuzzy for a game of some sort.

Re: mode 7

Posted: Sat 14 Apr, 2012 6:56 am
by tr1p1ea
It looks a lot better with rough grayscale:

Image

calc84manic was kind enough to discuss how gs is implemented in his fzero engine, its the same idea here however it is not in synch timing wise its still a good start. Interestingly the way the rest of the engine works is vastly different. Its probably one of the most fascinating things about coding, there are lots of ways to achieve the same goal :).

Re: mode 7

Posted: Sat 14 Apr, 2012 3:41 pm
by benryves
It looks very smooth and fast, tr1p1ea - great work! :-)

Re: mode 7

Posted: Mon 16 Apr, 2012 9:17 pm
by Xeda
Yeah, fast o.o Are you using 15MHz, as well?

Re: mode 7

Posted: Tue 17 Apr, 2012 11:50 am
by tr1p1ea
Yeah that screenie is at 15MHz, seems to work pretty well at that fortunate cpu speed :).

Re: mode 7

Posted: Thu 03 May, 2012 1:36 pm
by Art_of_camelot
Def. looks better with gray. Even if nothing comes of this it's a cool distraction nonetheless. :)

Re: mode 7

Posted: Wed 16 May, 2012 9:19 pm
by shmibs
not being in synch doesn't seem to matter a whole lot with that much motion, too, so i don't think it's something you need to worry too much about.

you should definitely try turning this into something bigger (once you're done with desolate, of course)!

Re: mode 7

Posted: Thu 17 May, 2012 10:13 am
by chickendude
Wow, how'd i miss this? It looks great! I really am awful at math and have long since forgotten how all that trig stuff works/what it does, i really should revisit that stuff...

Re: mode 7

Posted: Fri 01 Jun, 2012 5:53 pm
by Madskillz
Mario Kart! Ha just kidding, i'm with chickendude...once I finished college all that stuff got filed away somewhere. All those coding going on is starting to make me feel left out ha

Re: mode 7

Posted: Fri 29 Nov, 2013 12:24 am
by tr1p1ea
Well ive ported the basics over to the 84C, with some modification of course.

At this stage i havent optimised so its a little slow. Currently the draw area is 128x60 in 160 mode:

Image

I havent tested on hardware, but think that it wont run this fast (think the screenie delays are borked).

Re: mode 7

Posted: Sun 22 Dec, 2013 6:30 am
by benryves
That looks really neat, tr1p1ea - did you get the opportunity to try it on hardware to see how well it performs?

Re: mode 7

Posted: Mon 23 Dec, 2013 11:44 am
by tr1p1ea
http://www.youtube.com/watch?v=pj20af9NbzM

Thanks Ben! :).

That is a video of a rough test on hardware, the speed is ok but the accuracy has improved since that was taken.