GPWiki.org
GPWiki.org
It is currently Thu May 23, 2013 8:49 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: 3D walls tutorial!
PostPosted: Sun Jan 29, 2012 6:51 am 
Level 1 Cleric

Joined: Sat Jan 28, 2012 7:14 am
Posts: 10
I made a tutorial how to make a room with 3D walls and how to make a player with front view!
http://content.gpwiki.org/index.php/GM_Tut:_3D_walls

Hope you like! :thumbs

PCFreak20


Top
 Profile  
 
 Post subject: Re: 3D walls tutorial!
PostPosted: Sun Jan 29, 2012 11:11 am 
Bibliotherapist
User avatar

Joined: Wed Nov 03, 2004 1:28 pm
Posts: 6716
Location: Oxford, Englandshire
Thanks for your contribution. It is much appreciated.

I'm not familiar with Gamemaker, is the output from it a standalone executable, or does it require the Gamemaker program to run?

_________________
10 PRINT "Bad Monkey ";
20 GOTO 10


Top
 Profile  
 
 Post subject: Re: 3D walls tutorial!
PostPosted: Sun Jan 29, 2012 5:12 pm 
Level 1 Cleric

Joined: Sat Jan 28, 2012 7:14 am
Posts: 10
Codehead wrote:
Thanks for your contribution. It is much appreciated.

I'm not familiar with Gamemaker, is the output from it a standalone executable, or does it require the Gamemaker program to run?


Standard. If saved as gmk file, needs GameMaker, if exe nothing.


Top
 Profile  
 
 Post subject: Re: 3D walls tutorial!
PostPosted: Fri Aug 03, 2012 5:08 am 
Lord of Cheesecakes

Joined: Sun Jun 24, 2012 12:49 am
Posts: 341
For wall collisions you shouldn't mess with velocity unless you handle it better than you are. I used Game Maker a lot a long time ago, so I'm very familiar with it. Here's some old code I have:

Code:
// Approximates object as a circle. Set 'radius' to half the size of object squared.

var px, py, dx, dy, t, l;
dx = x2-x1;
dy = y2-y1;

if (dx == 0 && dy == 0)
{
    px = x1;
    py = y1;
}
else
{
    t = min(max(((x-x1)*dx + (y-y1)*dy) / (dx*dx + dy*dy), 0), 1);
    px = x1 + dx*t;
    py = y1 + dy*t;
}

dx = px - x;
dy = py - y;
l = dx*dx + dy*dy;

if (l < radius)
{
    t = sqrt(radius / l);
    x = px - dx*t;
    y = py - dy*t;
}

_________________
What most people don't understand is what I like to explain as a thing that I understand.


Last edited by Pieman on Thu Aug 16, 2012 3:39 am, edited 3 times in total.

Top
 Profile  
 
 Post subject: Re: 3D walls tutorial!
PostPosted: Fri Aug 03, 2012 11:30 pm 
Lord of Cheesecakes

Joined: Sun Jun 24, 2012 12:49 am
Posts: 341
By the way, this is a horrible tutorial. You just copied Mark Overmars' original FPS example, and then... told us to type it!

@Modnote
It's a "humorous" (at least for me) tool I like to use to pick out the unbearably sensitive people... but I use it too often.

_________________
What most people don't understand is what I like to explain as a thing that I understand.


Last edited by Mugai on Sat Aug 04, 2012 2:02 am, edited 1 time in total.
No need for name-calling.


Top
 Profile  
 
 Post subject: Re: 3D walls tutorial!
PostPosted: Sat Aug 04, 2012 7:42 am 
Harmlessness does no harm
User avatar

Joined: Tue Sep 14, 2004 8:37 pm
Posts: 3808
Location: Ferriday, LA, US
Pieman wrote:
@Modnote
It's a "humorous" (at least for me) tool I like to use to pick out the unbearably sensitive people... but I use it too often.

That's fine. Just keep in mind that we like to keep it civil here. It's fine if you want to throw a little banter around, but we don't want any flame wars or ad hominem stuff. :)

_________________
What most people don't understand about "enlightenment" is that it is not an end-goal; but where you find yourself just before taking a new "first step."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group