Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: [GM7] Mode7  (Read 3601 times)

0 Members and 1 Guest are viewing this topic.
[GM7] Mode7
« on: May 21, 2008, 02:43:55 am »
  • The king of Awesome
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 198
MODE 7
Code: [Select]
CODE
{
    // set the projection
    d3d_set_projection(x,y,10, x+cos(direction*pi/180),y-sin(direction*pi/180),10, 0,0,1);
    // set color and transparency
    draw_set_alpha(1);
    draw_set_color(c_white);
    // draw floor and ceiling
    d3d_draw_floor(0,0,0,room_width,room_height,0,
        background_get_texture(background2),10,10);
    d3d_draw_cylinder(room_width*3,room_height*3,833,-room_width*3,-room_height*3,-1000,
        background_get_texture(background4),4,2,true,8);
}

I'm basically trying to create mode7,and well I've had no luck I dunno if it can be fully done in Game Maker...


As you can see I failed... if anyone wants to help me that'd be great.
Logged

CrystalAngel04

Resident ZFGC female
Re: [GM7] Mode7
« Reply #1 on: May 21, 2008, 02:55:33 am »
  • \\*Caution*\\ The Internets: May contain Women
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Female
  • Posts: 1323
In order to fit in the "Works in Progress" section it needs to be the game itself with at least 4 screenshots. You seem you be asking for help more than posting  a WIP game so I'm moving it to "Discussion" for now. If you have any issues with the move PM me.
Logged
  • -= Crystal Angel Creations =-

mit

Re: [GM7] Mode7
« Reply #2 on: May 21, 2008, 10:35:37 am »
  • QBASIC programmer since age 4. Take that, world.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 1079
It can be done, it has been done quite a few times, although I haven't seen anything recently. There used to be a few examples in GM5 floating around. I'll have a look to see if I can find them.

Meanwhile, you might want to consider using basic 3D functions, as in gamemaker, they will actually probably be faster than a scripted, mode7 engine. Plus you can add proper objects and stuff.
Logged
Programmer / Spriter / Level designer / Game Director / Web Designer / Music Sequencer for
Random Highscore table:

Play the Kousou Arcade today!
  • Kousou Games
Re: [GM7] Mode7
« Reply #3 on: May 21, 2008, 08:53:45 pm »
  • The king of Awesome
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 198
I have the GM5 examples... but the mario kart one and the GM5 functions are outdated...

Code: [Select]
Track2 = sprite_duplicate(Track_Dirt);
sprite_shift(Track2,160-Mario.x,160-Mario.y);
sprite_resize(Track2,120,120,5);   
sprite_rotate(Track2,90-Mario.direction,1);

for (i=1;i<=60;i+=1) {
    a = 0.7854 + 0.62025*i/60;
    //a = 0.7854 + i/60;
    z = 10 * tan(a);
    d = floor(10 / cos(a));
    draw_sprite_part_ext(Track2,0,
                         60-d,75-z,     //left,top
                         2*d,1,         //width,height
                         0,120-i,       //x,y
                         160/(2*d),1,   //xscale,yscale
                         1);            //alpha
}
sprite_delete(Track2);
Logged

mit

Re: [GM7] Mode7
« Reply #4 on: May 21, 2008, 09:51:53 pm »
  • QBASIC programmer since age 4. Take that, world.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 1079
You could try using surfaces, it'd probably be faster...
Logged
Programmer / Spriter / Level designer / Game Director / Web Designer / Music Sequencer for
Random Highscore table:

Play the Kousou Arcade today!
  • Kousou Games
Re: [GM7] Mode7
« Reply #5 on: May 23, 2008, 12:48:18 am »
  • The king of Awesome
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 198
I've tried that, it'll rotate till yo see the greyish background.
Logged
Re: [GM7] Mode7
« Reply #6 on: May 23, 2008, 03:49:36 am »
  • The king of Awesome
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 198
Sorry for the bump but I found the other gm5 M7 demo and I think it's better, Ok here's my edit and the original file.
http://www.megaupload.com/?d=TD74FBHF
   
http://www.megaupload.com/?d=CH6TNT1I
   
I never finished ripping the world, but see the gray background in my edit? I can't seem to fix that at all... and in the original file theres functions where you could add rotating(never got those working)
Maybe you guys can get em working.

Also this does everything that I need if the gray background never showed up and if I could get the rotating functions to work.

My edit is a .gmk, the original is gm5.

Screenshot!
Logged

mit

Re: [GM7] Mode7
« Reply #7 on: May 23, 2008, 08:36:15 pm »
  • QBASIC programmer since age 4. Take that, world.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 1079
I didn't download those, but I don't think I made it clear just how easy it is to make it using 3D functions.


http://www.kousougames.com/data/downloads/counter.php?file=MarioKartEngine
Logged
Programmer / Spriter / Level designer / Game Director / Web Designer / Music Sequencer for
Random Highscore table:

Play the Kousou Arcade today!
  • Kousou Games
Re: [GM7] Mode7
« Reply #8 on: May 23, 2008, 11:49:12 pm »
  • Drop down and give me 9000!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 426
I've always wanted to know how to do Mode 7 style in GM, but I stopped using it ages ago. Wouldn't using 3d functions use up a lot of memory and lower the FPS dramatically if you used a massive world map?

Anyways, I'd love to see if I could remember anything back from when I used GML, but since it's GM7 pro I'm afraid I can't really do much to help  :-\. I still have GM6, but it had a fair few changes from 5, so that didn't work either.
« Last Edit: May 24, 2008, 12:08:38 am by HyperKnight32 »
Logged
I like potato.
  • My Myspace

mit

Re: [GM7] Mode7
« Reply #9 on: May 24, 2008, 10:02:36 am »
  • QBASIC programmer since age 4. Take that, world.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 1079
I've always wanted to know how to do Mode 7 style in GM, but I stopped using it ages ago. Wouldn't using 3d functions use up a lot of memory and lower the FPS dramatically if you used a massive world map?

Anyways, I'd love to see if I could remember anything back from when I used GML, but since it's GM7 pro I'm afraid I can't really do much to help  :-\. I still have GM6, but it had a fair few changes from 5, so that didn't work either.

Not in game maker. Mode 7 has to be scripted, and that's what uses lots of memory. Manually stretching sprites and whatnot. The 3D functions call DirectX functions, which are compiled, and are faster. What would slow it down is if you actually added lots of objects and lots of polygons and so on. You don't need to use any of the main 3D functions for it - as in the example I posted - just position the camera over the room to look at the background at an angle. Stretches it perfectly for you. Very little memory used, and almost no code.

Another advantage is that you can actually add 3D items to it too, such as making the walls 3D instead of having them flat. GM can handle this kind of thing quite I easily, with very little loss in frame rate until things get very complicated.

Me and Atrius are actually working on a couple of 3D games at the moment. He even managed create our own 3D animation program, and managed to load standard model files, such as scenes from OoT: http://img.photobucket.com/albums/v698/AtriusV/Random%20Screens/OoTSceneTest.png

Logged
Programmer / Spriter / Level designer / Game Director / Web Designer / Music Sequencer for
Random Highscore table:

Play the Kousou Arcade today!
  • Kousou Games
Re: [GM7] Mode7
« Reply #10 on: May 30, 2008, 05:18:00 am »
  • The king of Awesome
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 198
Thank you very much, this is exactly what I was trying to do!
Logged
Re: [GM7] Mode7
« Reply #11 on: May 30, 2008, 07:42:03 am »
  • Drop down and give me 9000!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 426
That 3d animation program looks very impressive mit ;).

Also the basic mariokart engine, this may prove useful for a Mode 7 styled world map, I've been thinking about making an original console styled rpg for a long time, I shall study GM's 3d functions to gain better understanding.

Do you have any idea if it's possible to have a 3d floor based on tiles places in the room? Or can it only be a background?

I'm glad you posted this topic Shiku, I tried searching for a mode 7 style engine for gm a long time ago with no success, thanks to this topic I now know it's possible :).
Logged
I like potato.
  • My Myspace
Re: [GM7] Mode7
« Reply #12 on: May 30, 2008, 02:22:20 pm »
  • The king of Awesome
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 198
Actually it's missing 1 important feature, map looping. I don't know how to do it but it just makes an infinite loop of your game map basically it's like you copy and paste in pant and the end.

If you were at the top you'd see allot of water if you kept going straight that way you'd eventually reach the bottom of the map(I dunno if it's a teleport feature) but in Rpg-Maker you can do an infinite loop of your map even if you did a 20X15 map.

Oh yea, I'm trying to get this projection in the newmode7 gm file.


And here's what I have(in the newmode7 gm file)
« Last Edit: May 30, 2008, 02:33:03 pm by Shiku »
Logged

mit

Re: [GM7] Mode7
« Reply #13 on: May 30, 2008, 03:10:43 pm »
  • QBASIC programmer since age 4. Take that, world.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 1079
Hmm, first, you can try experimenting with the camera position to get the projection the same as the first pic.

For map looping, the easiest way I can think of is to make it draw the map a couple of times more on each side, and loop your X and Y coordinates.


About the tiles, it's quite possible you could get it to draw them correctly in real time, but it might just be easier to make the background texture by taking a screenshot of the room before the game starts / before the camera is positioned.
Logged
Programmer / Spriter / Level designer / Game Director / Web Designer / Music Sequencer for
Random Highscore table:

Play the Kousou Arcade today!
  • Kousou Games
Re: [GM7] Mode7
« Reply #14 on: May 30, 2008, 08:35:07 pm »
  • The king of Awesome
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 198
I've messed with the background settings, it never seems to loop... As for the projection I can't get it like the first screen I showed you.
Logged
Re: [GM7] Mode7
« Reply #15 on: July 04, 2008, 10:09:57 am »
  • The king of Awesome
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 198
Hey, my friend coded mode7 for me, but we're still having problems making it so the background will draw seamlessly and we won't see the background color at all.

You see the gray background? well on the right is the drawn background, it does draw seamlessly but I don't want it to move over so many spaces, I just want it to draw infinity like it does but without seeing that gray background in games.

You can download it here.
http://www.ion-gamemaker.com/downloads/mode7.gmk
Logged
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.218 seconds with 69 queries.