Qbasicnews.com

Full Version: FB Game Project
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello, as I have mentioned a few times, I have the awesome privlege to do an independant study in FB at my school. The only thing I have yet to do before I can get coding away is fill out some forms. For these , I have to write up an 18 week breakdown of what I am doing. I have done this, but I would like your opinion as to whether you think I gave enough time/too much, etc. to the different items. Just so you know ahead of time I have written several games, all 2D, and I have no network programming experience. However, I do have network knowledge as I am enrolled in the Cisco Academy at my school. I will have 4 hours a week in school to work on my game, and probably at least 10 hours a week outside of school to work on it, so keep that in mind while looking through the times I have set. The game I am going to make will be a 3D multiplayer space combat game. This simplifies the 3D coding a bit since I will only have to consider models and their movement with no constants (I.E. the ground). It also eliminated the need for any AI whatsoever. The following description is what I am going to turn in so you can skip through the irrelevant parts and just tell me what you think about my break down of time and development stages. Thank you very much. Big Grin

Oh, and if it matters, I am a junior in high school (year 11).

Quote:18 week Plan for Game Development

Initial Design and planning: Weeks 1 & 2

Week 1: This stage will be used to figure out non-specific game system and engine decisions, or basically designing the game and gameplay.

Week 2: Once the basic design is finished, time will be spent developing the basic ideas further into more specific and more detailed designs. This will include engine functions as well as systems for game interactions.

Network coding: Weeks 3-5

Week 3: This week will be spent learning the ins and outs of network coding, focusing specifically on using sockets to host/join a network game.

Weeks 4 & 5: This time will be used to apply the knowledge gained in the previous week to construct a usable game device which will be included in the game engine later on.

3D coding: Weeks 6-9

Week 6: This week will be spent learning the functions and features of the opengl 3D library.

Week 7-8: These weeks will be spent learning and implementing a system to load and display 3d models.

Week 9: This time will be used implementing special 3D effects to be used in the game engine. This will involve learning 3D formulas and working them into code where they can be used efficiently by the game core.

Code engine: Weeks 10-15

Weeks 10 & 11: The 10th and 11th weeks will be used to code the core engine functions which involve display, input, and movement. The display engine coded earlier will be integrated into the code at this time.

Week 12: This week will be devoted to collision detection which will involve learning 3D math and implementing it into the game to be used for ship to ship collision and missile to ship collision.

Week 13: At this point the basic game core will be functioning enough to implement the network code from weeks 3-5. This week will be spent integrating it with the main code and testing it and resolving any glitches and bugs.

Weeks 14-15: This time will be spent coding the non-core systems such as sound, graphical effects, the GUI, and tweaking game settings.

Complete Game: Weeks 16-18

Weeks 16-17: At this point, the game code will be "finished' and only require tweaks and debugging. This time will be used for media development such as sounds, music, and models.

Week 18: The final week will be spent testing, tweaking, and refining the game until its finished.
To Deleter:

SWEET!!! Big Grin=b ! I never knew you had it this good in school...... ever. That is, until now! I can honestly say congratulations on getting this far, man, and I sure hope you ace through the forms to make it through the doors and on your way to such a fascinating course that you are gonna do!! Cool

And, as for the privilege of independently studying in FB at your school, what an awesome one for anybody to have indeed, because to be honest from what I know over the years, not very many people have such an opportunity like that (if not at all!), and I and the whole QB45/QB71/FB community would be QUITE so delighted to see what you can come up with in your project over the next 18 weeks, Deleter!!! (^-^)v

You know, doing the whole project can really be painstakingly hard work at times, so I suggest that when you do get tired (like say, every once in a while!), just take a break and rest up for an hour or two before you get back to work. That is the way to avoid working too much, but also, even game projects require a whole lot of thought, careful planning, originality, time, and in a bunch of cases, even encouragement as well. Keep these in mind now!! Big Grin

I am only saying what I can to help you kick-start this project in a better way, so I wish you the *rather* best of good success on your project, my man!! Peace, and thank you!!! Wink !



GIVING YOU MY SERIOUS WORDS OF ENCOURAGEMENT TONIGHT,

[Image: file.php?id=32]
Adigun Azikiwe Polack
One of the Founders of “Aura Flow” ::: Continuing Developer of “Frantic Journey”
Current Developer of “Star Angelic Slugger” ::: Webmaster of the “AAP Official Projects Squad”
Original Creator of the “The New FreeBASIC 8-Bit Palette Machine”



P.S. Deleter, the description of the 18-week game programming course plan is truly so interesting to look at and gives such a great inspiration for us FreeBASIC game programmers to consider in making great games, I believe!! :wtnod: It is great of you to place that up there, man, so way to go! Wink=b


P.P.S. About the stuff that you have on the forms so far, I believe a lot of good time was put into that department there, in my humble opinion, and it is an excellent start for you, especially as to what you said in there, too! Such honesty counts, you know? Big Grin
hmm, I might as well post an update. I am currently mastering opengl, at this point I've managed to code some wacky polygons. My next step is to make a model loader and then go from there. I have some of the code for this completed. I have also been toying with sdl_net, but I have nothing substantial completed with that. So far much thanks to z!re for help with sdl_net, and syn9 for his life saving help with opengl. And of course thanks to everyone who has said a positive word considering my project, it helps. Smile
you're welcome man, any time >D
Here is a rotating sphere (stretched) that I finally figured out thanks to syn9. In the game i will use these rotations for speed vectors and the like.

Code:
DECLARE SUB rotpt (x1!, y1!, z1!, rotx!, roty!, rotz!, nx!, ny!, nz!)
CONST pi = 3.14159 / 180
DIM AS SINGLE x,y,z,thetax,thetay,thetaz, c
SCREENRES 640,480,32,2
SCREENSET 1,0
DO
    FOR thetax = 0 TO 180 STEP 6
        FOR thetay = 0 TO 360 STEP 6
            rotpt (0,0,125,thetay,thetax+90,thetaz+90,x,z,y)
            c = (y+128) shl 16 + (y+128) shl 8 + y+128            
            PSET (320-x-y,200-z-y),c
        NEXT
    NEXT
    SCREENCOPY 1,0
    CLS
    thetaz +=2
LOOP UNTIL MULTIKEY(1)
END
SUB rotpt (x1!, y1!, z1!, rotx!, roty!, rotz!, nx!, ny!, nz!)
    DIM AS SINGLE rx,ry,rz
    rx = rotx!
    ry = roty!
    rz = rotz!
    'xrot
    nx1! = x1!
    ny1! = z1! * SIN(pi * rx) + y1! * COS(pi * rx)
    nz1! = z1! * COS(pi * rx) - y1! * SIN(pi * rx)
   'yrot
    nx2! = nx1! * COS(pi * ry) - nz1! * SIN(pi * ry)
    ny2! = ny1!
    nz2! = nx1! * SIN(pi * ry) + nz1! * COS(pi * ry)
    'zrot
    nx! = nx2! * COS(pi * rz) - ny2! * SIN(pi * rz)
    ny! = nx2! * SIN(pi * rz) + ny2! * COS(pi * rz)
    nz! = nz2!    
END SUB
update: progress has been slow, but i finally have started messing around with opengl! This is simply a rotating space like thing with stars.

If you experience any type of motion sickness, I would not suggest running this program. Smile

Code:
'$include: "\gl\gl.bi"                  'OpenGL stuff
'$include: "\gl\glu.bi"  
#DEFINE tri 0
RANDOMIZE TIMER
TYPE vectortype
    x AS SINGLE
    y AS SINGLE
    Z AS SINGLE
END TYPE

TYPE cameratype
    p AS vectortype
    r AS vectortype
END TYPE

DECLARE SUB Init_GLWindow()
DECLARE SUB draw_pts(c AS cameratype PTR)', v AS vectortype PTR)
DECLARE SUB rotpt (x1!, y1!, z1!, rotx!, roty!, rotz!, nx!, ny!, nz!)

CONST FULLSCREEN = 0
CONST SCRWIDTH = 640
CONST SCRHEIGHT = 480
CONST SCRDEPTH = 32
CONST pi = 3.141593/180
CONST maxstars = 19999
CONST maxcdst = 4000

DIM SHARED AS vectortype s(maxstars)
DIM SHARED AS INTEGER CurPage

DIM AS cameratype c
DIM AS vectortype temp,spd
DIM AS INTEGER tempc,tempfps,fps,sec
DIM AS SINGLE tr,afps
DIM AS DOUBLE etime, lu

FOR tempc = 0 TO maxstars  
    tr = INT(RND * 4)
    if tr <> 0 THEN tr = INT(RND * 8001)+4000 ELSE tr = INT(RND * 8001)
    'rotpt (0,0,tr,INT(RND*360),INT(RND*360),INT(RND*360),s(tempc).x,s(tempc).z,s(tempc).y)
    s(tempc).x=INT(RND * 8000)-4000
    s(tempc).y=INT(RND * 8000)-4000
    s(tempc).z=INT(RND * 8000)-4000
NEXT

Init_GLWindow
c.p.z = -1000
'c.r.y = 135
tr = 1000
rotpt(0,0,tr,INT(RND*360),INT(RND*360),INT(RND*360),spd.x,spd.z,spd.y)
etime=TIMER+1
lu = TIMER
DO
    IF TIMER > etime THEN
        fps=tempfps
        PRINT fps
        tempfps=0
        etime=TIMER+1
        sec+=1
        afps=(afps*(sec-1)/sec)+(fps/sec)        
    END IF
    lu=TIMER-lu
    c.r.y +=abs(tr/20)*lu
    c.r.z +=-abs(tr/15)*lu
    c.r.x +=abs(tr/40)*lu
    
    c.p.x +=(spd.x/2)*lu
    c.p.y +=(spd.y/2)*lu
    c.p.z +=(spd.z/2)*lu
    
    lu = TIMER
    
    if abs(c.p.x) > 2500 then spd.x=-spd.x
    if abs(c.p.y) > 2500 then spd.y=-spd.y
    if abs(c.p.z) > 2500 then spd.z=-spd.z
    
    draw_pts(@c)
    tempfps+=1
LOOP UNTIL MULTIKEY(1)
SCREEN 0
PRINT "Average FPS:";afps
sleep


END

SUB Init_GLWindow()
    DIM FOVy AS DOUBLE            'Feild of view angle in Y
    DIM Aspect AS DOUBLE          'Aspect of screen
    DIM znear AS DOUBLE           'z-near clip distance
    DIM zfar AS DOUBLE            'z-far clip distance
    DIM AS INTEGER w, h, d
  
    SCREENRES SCRWIDTH,SCRHEIGHT,SCRDEPTH,,FULLSCREEN OR 2
    SCREENINFO w, h, d
    SCREENSET CurPage, -(CurPage - 1)
    CurPage = -(CurPage - 1)
  
    IF w <> SCRWIDTH OR h <> SCRHEIGHT OR d <> SCRDEPTH THEN
        END 'There was an error initilizing the window
    END IF
      
    glViewport 0, 0, SCRWIDTH, SCRHEIGHT
    glMatrixMode GL_PROJECTION
    glLoadIdentity
    FOVy = 80/2                                     '45 deg fovy
    Aspect = SCRWIDTH / SCRHEIGHT                   'aspect = x/y
    znear = 1                                       'Near clip
    zfar = maxcdst                                  'far clip
    gluPerspective FOVy, aspect, znear, zfar
  
    glMatrixMode GL_MODELVIEW
    glLoadIdentity
  
    glShadeModel GL_SMOOTH                 'set shading to smooth(try GL_FLAT)
    glClearColor 0.0, 0.0, 0.0, 0.0         'set Clear color to purple
    glClearDepth 1.0                       'Set Depth buffer to 1(z-Buffer)
    glEnable GL_DEPTH_TEST                 'Enable Depth Testing so that our z-buffer works
    glDepthFunc GL_LEQUAL
    'glEnable GL_COLOR_MATERIAL
    glEnable GL_TEXTURE_2D
    glHint GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST
END SUB

SUB draw_pts(c AS cameratype PTR)', v AS vectortype PTR)
    DIM AS INTEGER t
    'opengl stuff
    glClear  GL_COLOR_BUFFER_BIT OR GL_DEPTH_BUFFER_BIT
    glPushMatrix
    glLoadIdentity
  
    'glTranslatef (c-> p.x,c->p.y,c->p.z)'move by camera pos
    'camera rotation
    glRotatef( c->r.x, 1.0, 0.0, 0.0)
    glRotatef( c->r.y, 0.0, 1.0, 0.0)
    glRotatef( c->r.z, 1.0, 0.0, 1.0)
    glTranslatef (c-> p.x,c->p.y,c->p.z)'move by camera pos
  
    'point placing
    FOR t = 0 TO maxstars
        ''glTranslatef (c->p.x-s(t).x,c->p.y-s(t).y,c->p.z-s(t).z)'move by object pts
      
        'object rotation if any goes here
      
        'draw the pt
        #IF (tri=0)
            glBegin GL_POINTS
                glColor3f  1.0, 1.0, 1.0
                glVertex3f s(t).x,s(t).y,s(t).z
            glEnd
        #ELSE
            glBegin GL_TRIANGLES
                glColor3f  1.0, 0.0, 0.0
                glVertex3f s(t).x+2,s(t).y,s(t).z
              
                glColor3f  1.0, 1.0, 0.0
                glVertex3f s(t).x-2,s(t).y,s(t).z
              
                glColor3f  1.0, 0.0, 1.0
                glVertex3f s(t).x,s(t).y+1.5,s(t).z
            glEnd
        #ENDIF            
    NEXT
  
    'opengl stuff
    glPopMatrix
    glFlush
    FLIP
END SUB

SUB rotpt (x1!, y1!, z1!, rotx!, roty!, rotz!, nx!, ny!, nz!)
    DIM AS SINGLE rx,ry,rz
    rx = rotx!
    ry = roty!+90
    rz = rotz!+90
    'xrot
    nx1! = x1!
    ny1! = z1! * SIN(pi * rx) + y1! * COS(pi * rx)
    nz1! = z1! * COS(pi * rx) - y1! * SIN(pi * rx)
   'yrot
    nx2! = nx1! * COS(pi * ry) - nz1! * SIN(pi * ry)
    ny2! = ny1!
    nz2! = nx1! * SIN(pi * ry) + nz1! * COS(pi * ry)
    'zrot
    nx! = nx2! * COS(pi * rz) - ny2! * SIN(pi * rz)
    nz! = nx2! * SIN(pi * rz) + ny2! * COS(pi * rz)
    ny! = nz2!    
END SUB
Quote:update: progress has been slow, but i finally have started messing around with opengl! This is simply a rotating space like thing with stars.

If you experience any type of motion sickness, I would not suggest running this program. Smile

I see what you mean: :barf: :barf: :barf: I have a headache now...
yo i can be a modeller i use blender and i might be a graphic modeller
So how are you going with that plan?

>anarky
@ anarky Well the plan is completely out the window, that was just to appease the people in charge. The game itself is going alright, though it could be faster.

@hardeep, if you are interested in helping, make a space ship model. I have another modeler (rattrap) who made one for me, but the more the merrier. Also, if you have aim/msnim, add me to your contacts list so we can talk.
Pages: 1 2