gfxgfxFreeBASIC Games Directory Forumgfxgfx
gfx gfx
gfx
Welcome, Guest. Please login or register. May 18, 2013, 08:43:19 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 3179 times)
neo
Novice
***
Gender: Male
Posts: 57


View Profile Email
« on: July 18, 2010, 11:11:51 PM »

i have most of the rpg started but how would i start building a 3d engine in free basic ? 
mmmmm or should i build a editor.

just getting to know how to making a 3d game ....
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 #1 on: July 19, 2010, 01:18:51 AM »

This is a very interesting subject.

Now, there are 4 ways you can do this:

1) Irrlicht for FreeBASIC - quick and easy to get started with, but won't work on a lot of machines and is kind of slow.

2) OpenGL - same problems as Irrlicht but harder to learn

3) My 3D game engine - It's not near finished (or 3D) yet but you can monitor the progress at freegdk.googlecode.com

4) Use 2.5D graphics - It's not "true" 3D, but it's easy to learn and should work with everything

Here's an example of 2.5D graphics (part of a game demo I'm making):
dim shared as string*2 closeTriggerString=chr$(255)+"k"

dim shared as integer screenwidth=640,screenheight=480

screenres screenwidth,screenheight,32,2,&h00
screenset 1,0
width screenwidth/8,screenheight/14

do
    static as integer posz
    static as integer speed
    static as uinteger tempvar
   
    if multikey(&h48) then
        if speed<301 then speed+=5
    else
        if multikey(&h50) then
            speed=-100
        else
            if speed>0 then
                speed-=4
            else
                speed=0
            end if
        end if
    end if
    posz+=speed/100
    if posz>5000 then
        posz=5000
        speed=0
    end if
   
    if speed>300 then
        line (320,240)-(rnd(5)*600+20,rnd(4)*400+40),rgb(rnd(1)*255,rnd(2)*255,rnd(3)*255)
        line (320,240)-(rnd(7)*600+20,rnd(5)*400+40),&hFFFFFF
    end if
   
    line (320,241)-(160,480),&hCCCCCC
    line (320,241)-(161,480),&hCCCCCC
    line (320,241)-(162,480),&hCCCCCC
    line (320,241)-(163,480),&hCCCCCC
   
    line (321,241)-(477,480),&hCCCCCC
    line (321,241)-(478,480),&hCCCCCC
    line (321,241)-(479,480),&hCCCCCC
    line (321,241)-(480,480),&hCCCCCC
   
    circle (320,240),int(240/(241-(posz*.048))),&hFFFFFF,,,,f
    circle (320,240),int(240/(10-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(10.5-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(20-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(30-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(40-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(40.5-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(50-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(60-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(70-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(70.5-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(80-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(90-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(100-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(100.5-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(110-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(120-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(130-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(130.5-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(140-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(150-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(160-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(160.5-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(170-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(180-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(190-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(190.5-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(200-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(210-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(220-(posz*.048))),&hFFFFFF
    circle (320,240),int(240/(220.5-(posz*.048))),&hFFFFFF
   
    draw string (0,0),"ESC to quit | Up and Down to move"
    draw string (0,15),"Speed: "+str$(speed)
   
    pcopy
    cls 0
    if multikey(&h38) and multikey(&h3E) or multikey(&h01) or inkey$()=closeTriggerString then end
loop
Logged

neo
Novice
***
Gender: Male
Posts: 57


View Profile Email
« Reply #2 on: July 19, 2010, 12:20:44 PM »

well the code did not work.
and i dont think thats what you would all a interface for a rpg .
but what should i work on the 3d engine or the editor ?
thinking ?
and how would i start making a engine too in code.?
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 #3 on: July 19, 2010, 01:05:29 PM »

I don't see how the code didn't work. It runs just fine for me.

I know it's not an RPG, I was just giving you an example of 2.5D graphics.

How would you make a 3D engine yourself? The same way I am. Here's a site that tells you the very basic 3D math. Actually drawing to the screen might be a problem if you don't know what you're doing, but if you stick to wireframe graphics you should be able to make something.
Logged

neo
Novice
***
Gender: Male
Posts: 57


View Profile Email
ok
« Reply #4 on: July 19, 2010, 01:52:32 PM »

thx 4 for the help   Tongue
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
neo
Novice
***
Gender: Male
Posts: 57


View Profile Email
« Reply #5 on: July 19, 2010, 01:54:59 PM »

it there any help with free basic working with 3d stuff  ?
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 #6 on: July 19, 2010, 05:28:03 PM »

Well, everything that works with QBASIC should work with FreeBASIC, so anything on that site should work, as long as you explicitly declare your variables.

At the top of your code, put this
dim shared as integer myfirstvariablename,othervariable,blahblah,etc
Logged

neo
Novice
***
Gender: Male
Posts: 57


View Profile Email
« Reply #7 on: July 19, 2010, 09:52:37 PM »

dim space as integer ,x,y,z

SCREEN 20
x= 2000
y= 2000
z= 2000

print x
print y
print z

sleep 5000

end
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 #8 on: July 20, 2010, 01:16:07 AM »

I think you mean:
screenres 800,600,32

dim as integer x=2000,y=2000,z=2000

print x
print y
print z
print "Press any key..."

sleep

end
Logged

neo
Novice
***
Gender: Male
Posts: 57


View Profile Email
« Reply #9 on: July 20, 2010, 12:03:35 PM »

screenres 800,600,32

dim as integer x=2000,y=2000,z=2000
dim speed as integer




speed = 5

print speed
print x
print y
print z

print "Press any key..."

sleep

end
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 #10 on: July 20, 2010, 12:37:55 PM »

I think it would be more efficient if:
screenres 800,600,32

dim as integer x=2000,y=2000,z=2000,speed=5

print speed
print x
print y
print z

print "Press any key..."

sleep

end
See? Since x, y, z, and speed are all integers, you can declare them all in the same place.
Logged

neo
Novice
***
Gender: Male
Posts: 57


View Profile Email
« Reply #11 on: July 20, 2010, 02:29:59 PM »

oh i see
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 #12 on: July 20, 2010, 03:35:55 PM »

oh i see
Smiley

Where would you like to go next with the engine? I could probably help.
Logged

neo
Novice
***
Gender: Male
Posts: 57


View Profile Email
« Reply #13 on: July 23, 2010, 12:59:19 AM »

give me some time been working on some of the variable
i will get back as soon as i can 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 #14 on: July 23, 2010, 04:07:05 PM »

Alright. I'll be waiting.
Logged

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