dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
Mode 7 view setup
I was recently trying to make something with mode 7 and I found it was a bit of a pain trying to get the right view set up using a method of trial and
error to set the m7 parameters such as height and distance. So, I knocked up this simple m7 view editor which allows you to adjust the camera
position and focus while in the game and then save the settings.
You never know, it might come in handy.
Attachment: m7setup.PRG (3kB) This file has been downloaded 4652 times
|
|
MikeDX
|
|
This is really cool, nice work dom.
You're right about mode7 being a bit of a pain to get setup right, something i know too well from working on the mario kart game - ended up adding
various flying / cheat modes to get the correct view
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
Thanks.
When the creativity is flowing, stopping to make tools like these can seem like a waste of time resources as well as a distraction. However, as in
this case, I'd say they are generally worth it as they often pay for themselves almost immediately.
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
FIXED
IT SHOULD BE WORKING NOW.
Heres is a nice effect applied to a DIV original.All you need to do is overlay a mode 7 view over the original game and
use map_xput() to place the graphics on the sheet.Then after each frame use map_xput() again, this time with a transparent blank version of the
background to semi-erase the graphics.
If you want to try it, put all these files in a folder along with the relevant sounds from the original "Steroids" which you can get from the
"steroids" folder inside the PCM folder. (in case you didn't know)
Attachment: fx33.pcm (16kB) This file has been downloaded 5142 times
Attachment: nave.pcm (17kB) This file has been downloaded 4633 times
Attachment: steroid.fnt (23kB) This file has been downloaded 4599 times
Attachment: tubo5.pcm (10kB) This file has been downloaded 4598 times
Attachment: tubo8.pcm (2kB) This file has been downloaded 4612 times
Attachment: A4oids.PRG (11kB) This file has been downloaded 4881 times
Attachment: A4oids.FPG (12kB) This file has been downloaded 5133 times
Attachment: m7settings.dat (16B) This file has been downloaded 4837 times
|
|
MikeDX
|
|
I keep meaning to test this, but since my dev setup of div doesnt include all the support stuff, I keep forgetting...
Looks very cool though!
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
Quote: Originally posted by MikeDX | I keep meaning to test this, but since my dev setup of div doesnt include all the support stuff, I keep forgetting...
Looks very cool though! |
Don't bother just yet. I just tried it on another computer and it doesn't work straight out of the box.. I'll fix it.
|
|
blostec
DIV Junior
Posts: 7
Registered: 20-4-2016
Location: Spain
Member Is Offline
|
|
I just tried and looks really nice, good work dom cook!
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
Thanks matey.
I was beginning to wonder.
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
Mode 7 cursor
I was browsing some files when I came across this prg that has a cursor that aligns to a mode 7 surface. Not sure it's particularly useful but I'm
posting it for posterity.
Use the mouse buttons for a couple of effects which demonstrate that the mouse is in the M7 world.
[Edited on 28-11-2016 by dom cook]
[Edited on 28-11-2016 by dom cook]
Attachment: m7_cursor.PRG (4kB) This file has been downloaded 3111 times
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
Here's an improved version which allows you to edit at any camera angle without the mouse directions getting messed up.
Attachment: m7_cursor01.PRG (4kB) This file has been downloaded 3012 times
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
mode 7 draw function
This snippet has a function which is meant todraw lines and points in mode 7 coordinates
The image shows an array of mode seven processes aligned with corresponding primitive lines,
These lines are drawn with the function:
draw_m7line(x1,y1,height1,x2,y2,height2)
Attachment: m7_draw.PRG (4kB) This file has been downloaded 2692 times
[Edited on 22-12-2016 by dom cook]
|
|
MikeDX
|
|
Dom are you using this to prove / disprove your theory that DIV's mode7 is broken?
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
No this is something else. It's meant to be useful.
I posted some code that shows the problem I was having in the other thread. The DLL tutorial one. I know it's not the ideal place but...
However!
This does prove itself to be broken, It only works when the camera is at 0,0. Darn it!
[Edited on 24-12-2016 by dom cook]
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
OK I've fixed that little problem I think.
Also, my original effort only worked for the given screen mode. This one is a bit better.
To explain what is going on:
The little squares around the perimeter of the grey area are mode 7 processes. The lines going through them are drawn using a function that uses the
same coordinates as each corresponding mode 7 process. So this basically enables drawing in the mode 7 coordinate system.
You can play with the view using arrow keys, pgup, pgdn, f1,f2,3,4... (I think that's it) to see what I mean.
Attachment: m7_draw03.PRG (5kB) This file has been downloaded 771 times
|
|