gfxgfxFreeBASIC Games Directory Forumgfxgfx
gfx gfx
gfx
Welcome, Guest. Please login or register. May 24, 2013, 12:25:21 AM

Login with username, password and session length
11.5.2013 - Added a webpage for the latest FBGD competition.

13.3.2013 - Members registrations temporary disabled. For all membership requests, please email me: lachie13@yahoo.com

30.11.2012 - The ninth issue of BASIC Gaming is out! Read it here: http://games.freebasic.net/forum/index.php?topic=560.0

22.11.2012 - Be sure to check our currently running annual FBGD game making competition. This year's theme is SEASONS OF THE YEAR, 300 $ first place prize, and the competition runs till 18th of February. Link: http://games.freebasic.net/forum/index.php?topic=559.0
gfx
gfx
*
gfxgfx
gfxgfx gfxgfx
gfxgfx Home Help Search Login Register   gfxgfx
gfx gfx
gfx
Pages: 1 2 [3] 4
Print
Author Topic: how would i make a 3d interface for rpg S.o.S  (Read 3204 times)
Mitchell
Forum Howler
****
Gender: Male
Posts: 172


Rockin Geek


View Profile Email
« Reply #30 on: July 26, 2010, 09:52:47 AM »

Well, to convert a 3d coordinate pair (like a vertex of a polygon) to a screen coordinate is complex.

No it's not. To draw 3D shapes to the screen is complex. You can play copypasta with any number of formulas on the internet, but stuff like textured triangles takes time.

Does the said code happen to involve matrix transformations?
Logged

Never underestimate the destructive powers of somebody doing something new without having any clue of how to do it. Tongue
Brick Break
Forum Sage
*****
Gender: Male
Posts: 412



View Profile
« Reply #31 on: July 26, 2010, 12:46:35 PM »

Well, to convert a 3d coordinate pair (like a vertex of a polygon) to a screen coordinate is complex.

No it's not. To draw 3D shapes to the screen is complex. You can play copypasta with any number of formulas on the internet, but stuff like textured triangles takes time.

Does the said code happen to involve matrix transformations?
Matrix transformations are unnecessary. Full 3D can take the form of raycast vertices of triangles. Any transformations that occur can be calculated at the time of the transformation, and the main renderer can handle the per-vertex stuff. Hopefully, though, all this functionality will be buried under layers of subroutines.
Logged

Brick Break
Forum Sage
*****
Gender: Male
Posts: 412



View Profile
« Reply #32 on: July 26, 2010, 12:58:34 PM »

look what i found Smiley  Grin
i have my interface haaaaaa evil me i know there was one made some where for me Smiley  Tongue
...
That's OpenGL. Sorry, you're out of luck. Lithium's raycaster won't run on Wine, and Irrlicht has all the same problems as OpenGL.

So, what do you do? Check out that tutorial that those nice folks at petesqbsite gave you. It has all the 3D math you need. If you want, you can use the FB extended library to draw your triangles. I will be coming out with my own renderer soon, though, so I wouldn't jump the gun and use that DLL just yet.
Logged

Mitchell
Forum Howler
****
Gender: Male
Posts: 172


Rockin Geek


View Profile Email
« Reply #33 on: July 26, 2010, 01:55:10 PM »

Raycasting polygons? Unless you're referring to ray *tracing*, you cannot render true 3d polygons with raycasting. There is no concept of height in the processing, just hacks in the final rendering to the screen to give the illusion of height.

And yes, to build a normal, fully functional 3d graphics engine, you will have to be able to process matrix transformations. If you don't, you will run into many limitations. Many old raycasting games were usually set indoors to hide it. id's old raycasting engines were plagued with "i-cant-do-thats" because of these very same issues. Not to mention matrices are a very very efficient and effective way to manipulate structures. You want a swinging door? Multiply the door's coordinates by a rotation matrix, instead of having to write extra code for that door specifically.
Logged

Never underestimate the destructive powers of somebody doing something new without having any clue of how to do it. Tongue
Brick Break
Forum Sage
*****
Gender: Male
Posts: 412



View Profile
« Reply #34 on: July 26, 2010, 02:03:37 PM »

Rotations will come into effect, but it will be through a rotateobject() subroutine, and not matrix transformations. Also, using my method, I can have at least 2 axis of camera rotation without any "hacks".
Logged

Mitchell
Forum Howler
****
Gender: Male
Posts: 172


Rockin Geek


View Profile Email
« Reply #35 on: July 26, 2010, 03:40:22 PM »

Rotations will come into effect, but it will be through a rotateobject() subroutine, and not matrix transformations. Also, using my method, I can have at least 2 axis of camera rotation without any "hacks".

How do you look up and down without skewing? And why the extra code for rotateobject? With matrices, all you do is specify how to multiply them together. Then when you want to actually do something, you simply call a function that multiplies the matrices together. One function to handle rotation, translation, skew, and projections. You just have to make the matrices.

For example, how do you make the transformations of a 3d leg walking? Imagine having to code that. However, I can do it easily with matrices.

Draw_leg:
    Rotate thigh connected to hip
    render thigh
    Translate down to knee
    Push matrix to stack
        Rotate calf relative to knee
        render calf
        Translate to ankle
        Push matrix to stack
            rotate foot
            render foot
        pop matrix
    pop matrix
Logged

Never underestimate the destructive powers of somebody doing something new without having any clue of how to do it. Tongue
neo
Novice
***
Gender: Male
Posts: 57


View Profile Email
« Reply #36 on: July 26, 2010, 04:26:45 PM »

wait a min here ....... all we would have to put in to this code is a no clip so you dont walk past walks .
and from there you fix up the code to make a small editor.
so i have a lay out.....
opengl i dont like ps .........
but now i have code to understand how all working in so.
i will make a clip on youtube showing this interface off but tonight if i can find the time.
« Last Edit: July 26, 2010, 04:36:16 PM by neo » Logged

IF you can make a game that's cool and fun....
in time you may have a good job in time ......

its like at the end of doom 2 what do i have to kill next lol put code in my brain and i will think mmmm css rocks
Brick Break
Forum Sage
*****
Gender: Male
Posts: 412



View Profile
« Reply #37 on: July 26, 2010, 05:13:16 PM »

Rotations will come into effect, but it will be through a rotateobject() subroutine, and not matrix transformations. Also, using my method, I can have at least 2 axis of camera rotation without any "hacks".

How do you look up and down without skewing? And why the extra code for rotateobject? With matrices, all you do is specify how to multiply them together. Then when you want to actually do something, you simply call a function that multiplies the matrices together. One function to handle rotation, translation, skew, and projections. You just have to make the matrices.

For example, how do you make the transformations of a 3d leg walking? Imagine having to code that. However, I can do it easily with matrices.

Draw_leg:
    Rotate thigh connected to hip
    render thigh
    Translate down to knee
    Push matrix to stack
        Rotate calf relative to knee
        render calf
        Translate to ankle
        Push matrix to stack
            rotate foot
            render foot
        pop matrix
    pop matrix
Don't drag me down to your cheap math and your high-level memory addressing. I already had to sacrifice JavaScript compatibility with pixel drawing, now I'm not going to kill QBASIC compatibility with matrix transformations.

Unless you can do it without trigonometry, I see no reason to do this.

As for neo, congratulations on realizing the truth about hardware acceleration, now give me a few days and you'll have your rendering library.
Logged

neo
Novice
***
Gender: Male
Posts: 57


View Profile Email
« Reply #38 on: July 26, 2010, 05:53:31 PM »

kool thx you Smiley
Logged

IF you can make a game that's cool and fun....
in time you may have a good job in time ......

its like at the end of doom 2 what do i have to kill next lol put code in my brain and i will think mmmm css rocks
Brick Break
Forum Sage
*****
Gender: Male
Posts: 412



View Profile
« Reply #39 on: July 26, 2010, 08:14:55 PM »

kool thx you Smiley
You're welcome. Smiley

Within 2 days, my solid-shaded polygon renderer should be complete. Then, it will be a simple matter of applying some basic raycasting maths.
Logged

neo
Novice
***
Gender: Male
Posts: 57


View Profile Email
« Reply #40 on: July 31, 2010, 04:27:38 PM »

way kool
Logged

IF you can make a game that's cool and fun....
in time you may have a good job in time ......

its like at the end of doom 2 what do i have to kill next lol put code in my brain and i will think mmmm css rocks
Brick Break
Forum Sage
*****
Gender: Male
Posts: 412



View Profile
« Reply #41 on: July 31, 2010, 07:40:41 PM »

way kool
A little late on that comment there. I'm still waiting on someone to finish the function.

That someone hasn't yet made themself known.
Logged

neo
Novice
***
Gender: Male
Posts: 57


View Profile Email
« Reply #42 on: July 31, 2010, 08:29:25 PM »

 Angry  oh why god why nooooo lol
Logged

IF you can make a game that's cool and fun....
in time you may have a good job in time ......

its like at the end of doom 2 what do i have to kill next lol put code in my brain and i will think mmmm css rocks
Brick Break
Forum Sage
*****
Gender: Male
Posts: 412



View Profile
« Reply #43 on: August 01, 2010, 03:32:18 PM »

Angry  oh why god why nooooo lol
Lol? I don't think it's a lolzing matter. If we could get someone to finish that function, that would be great.
Logged

neo
Novice
***
Gender: Male
Posts: 57


View Profile Email
« Reply #44 on: August 04, 2010, 01:23:56 AM »

in time we will have it working Smiley
Logged

IF you can make a game that's cool and fun....
in time you may have a good job in time ......

its like at the end of doom 2 what do i have to kill next lol put code in my brain and i will think mmmm css rocks
Pages: 1 2 [3] 4
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
Cerberus design by Bloc
Valid XHTML 1.0! Valid CSS!
gfx
gfxgfx gfxgfx