10.03.2019 - Round 1 results of our "A Love Letter For FreeBASIC" game dev competition have been published. Please be sure to check the results thread: http://games.freebasic.net/forum/index.php?topic=629.0. Don't forget that the competition is continuing with a round 2, lasting till 29th of April, 300 USD first prize. Stay tuned!

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - neo

Pages: [1] 2
1
Work In Progress / GUI FREE Code
« on: March 20, 2021, 12:15:16 AM »
it taken me some time i fix the leak in it now only using 13.5mb ram i think i did a ok job ....


https://www.youtube.com/channel/UCvndZ9dI5UkoK_Tycv6i3tw

2
Programming / new gui all freebasic
« on: November 07, 2020, 02:32:57 PM »
i have worked out a lot of the new code in the Gui interface
__________file list
mouse.bi
win.bi
button.bi
Gui.bi
i still don't know what to call this gui im building

 i been watching "hail an catch fire" so ill think of a good name.
ps i will place upload a you-tube clip of the gui small but working.....

3
Work In Progress / "Adding software to Gui "
« on: July 26, 2014, 11:13:58 AM »
if any one wants to add there programs to my interface im building let me know here thx u
 :P

5
Work In Progress / can any one help me update this 3d code ?
« on: September 23, 2013, 03:39:10 PM »
Code: [Select]
Static
#INCLUDE "sdl/sdl.bi"
#INCLUDE "gl/gl.bi"
#INCLUDE "gl/glu.bi"
#INCLUDE "gl/glext.bi"
#INCLUDE "al/al.bi"
#INCLUDE "al/alut.bi"
#INCLUDE "3DTypes.bas"
#INCLUDE "3DMath.bas"


Type LightType
    Ambient(3) As Single
    Diffuse(3) As Single
    Specular(3) As Single
    Position(3) As Single
    Control As Single
End Type


Type Particles
    Position As Vector3DType
    DVector As Vector3DType
    RVector As Vector3DType
    UVector As Vector3DType
    glMatrix(15) As Single
    List_Id As Integer
    Life_Span As Integer
    AlphaVal(3) As Single
    RGBAlpha(3) As Single
    Emission(3) As Single
    Scale As Single
    i As Integer
    Z As Single
    Cull As Integer
    Active As Integer
    Explosion As Single
    Randimation As Single
End Type


Type PlayerType
    Cam As EntityType
    Radius As Single
    vVector As Vector3DType
    Gravity As Single
    ViewPoint As Vector3DType
    WalkSpd As Single
    StrafeSpd As Single
    BulletCnt As Integer
    Firing As Integer
    Shot_Delay As Integer
    Bullet(1 To 20) As Particles
    Weapon As Integer
    Health As Integer
End Type

Declare Sub LOAD_OBJ (FileName As String, Model As ModelType Ptr)
Declare Sub LoadTextures(FileName As String, Num_Txtr As GLUINT, AlphaVal As Integer)
Declare Sub CalcNormals(Model As ModelType Ptr)
Declare Sub Render_Scene(Entity As EntityType, Model As ModelType Ptr, mTextures() As Integer)  
Declare Sub Gen_Lights(Light As LightType)
Declare Sub Build_DLists(Model As ModelType Ptr, mTextures() As Integer, DList As Uinteger)
Declare Sub Build_Textures(mTextures() As GLUINT, Num_Textures As Integer)
Declare Sub Build_Sounds( Wav_Bff() As ALuint, Wav_Src() As ALuint, Num_Sounds As Uinteger)
Declare Sub BuildFont(Font_Texture() As GLUINT, FBase As GLUINT)
Declare Sub glPrint(Byval x As GLint, Byval  y As GLint, Byref xstring  As String , Byval xset As Integer, Font_Texture As GlUint, FBase As GlUint)
Declare Sub Init_Entity(Entity As EntityType)
Declare Function Check_Terrain_Collision(Cam As EntityType, vVector As Vector3DType, Gravity As Single, Radius As Single, Model As ModelType Ptr) As Integer
Declare Function Find_Angle(X1 As Single, Y1 As Single, X2 As Single, Y2 As Single) As Integer
Declare Sub Do_Particles(Model As ModelType Ptr, mTextures() As Integer, AlphaVal() As Single)

Const SCR_WIDTH = 800, MidX = SCR_WIDTH\2
Const SCR_HEIGHT= 600, MidY = SCR_HEIGHT\2
Const BPP = 32

Dim Num_Models As Integer, _
Num_Entities As Integer, _
Num_Sounds As Integer, _
Num_Textures As Integer, _
Player_Id As Integer, _
Num_Particles As Integer

Num_Models = 4
Num_Entities = 2
Num_Sounds = 5
Num_Textures = 11
Player_Id = 1
Num_Particles = 100

Dim Particle(Num_Particles) As Particles
Dim Plr As PlayerType
Dim i As Integer, i2 As Integer, F As Integer, V As Integer, S As Integer
Dim FOVy As Double, Aspect As Double, znear As Double, zfar As Double
Dim Result As Unsigned Integer, Tscreen As SDL_Surface Ptr
Dim Light As LightType
Dim Fogcolor(3) As Single
Dim SDL_flags As Integer, Event As SDL_Event
Dim Mouse_X As Integer, Mouse_Y As Integer
Dim Wav_Bff(Num_Sounds) As ALuint
Dim Wav_Src(Num_Sounds) As ALuint
Dim DLists( 1 To Num_Models ) As GLUINT
Dim Model(1 To Num_Models) As ModelType Ptr
Dim Entity(1 To Num_Entities) As EntityType
Dim mTextures(Num_Textures) As GLUINT

Dim ListenerPos(2) As ALFloat, SourcePos(2) As ALFloat, ListenerOri(5) As ALFloat


Dim Recoil As Vector3DType


Randomize Timer

SDL_flags = SDL_HWSURFACE Or _
SDL_DOUBLEBUF Or _
SDL_OPENGL Or _
SDL_OPENGLBLIT' OR _
'SDL_FULLSCREEN            
result = SDL_Init(SDL_INIT_EVERYTHING)
If result <> 0 Then End

SDL_GL_SetAttribute SDL_GL_DOUBLEBUFFER, GL_TRUE

Tscreen = SDL_SetVideoMode(SCR_WIDTH, SCR_HEIGHT, BPP, SDL_flags)
If Tscreen = 0 Then
    SDL_Quit
    End
Else
    SDL_WM_SetCaption "FPS Camera Demo", ""
    SDL_ShowCursor False
End If

glViewport 0, 0, SCR_WIDTH, SCR_HEIGHT
Glmatrixmode GL_PROJECTION        
Glloadidentity  
FOVy = 45.0
Aspect = SCR_WIDTH / SCR_HEIGHT
znear = .1
zfar = 100
gluPerspective FOVy, aspect, znear, zfar
Glpushmatrix

glShadeModel GL_Smooth
glClearColor 0.0, 0.0, 0.0, 0.0
glClearDepth 1.0
glEnable GL_DEPTH_TEST
glDepthFunc GL_LEQUAL  
glEnable GL_COLOR_MATERIAL  
glenable GL_DOUBLEBUFFER  
glHint GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST  
glHint GL_LINE_SMOOTH_HINT, GL_NICEST
glenable GL_LINE_SMOOTH
glHint GL_POINT_SMOOTH_HINT, GL_NICEST
glenable GL_POINT_SMOOTH  
glPolygonMode GL_FRONT, GL_FILL
glEnable GL_CULL_FACE

FogColor(0)=0.01
FogColor(1)=0.01
FogColor(2)=0.01
FogColor(3)=1.0

glFogi(GL_FOG_MODE, GL_EXP2)
glFogfv(GL_FOG_COLOR, @fogColor(0))
glFogf(GL_FOG_DENSITY, 0.05)
glHint(GL_FOG_HINT, GL_NICEST)
glFogf(GL_FOG_START, 9.0)
glFogf(GL_FOG_END, 10.0)
glEnable(GL_FOG)


glGenTextures Num_Textures, @mTextures(0)
Dim fBase As GLUINT
fBase = glGenLists(256)
LoadTextures "Textures/Font.Bmp", mTextures(1), 255
BuildFont mTextures(), FBase

Gen_Lights Light  
Glmatrixmode GL_TEXTURE
Glloadidentity()
glrotatef 180, 0.0, 1.0, 0.0
glrotatef 180, 0.0, 0.0, 1.0    
glPrint 0, 0, "Loading, Please Wait...", 1, MTextures(1), FBase
SDL_GL_SWAPBUFFERS      

Build_Sounds Wav_Bff(), Wav_Src(), Num_Sounds

Build_Textures mTextures(), Num_Textures

For i = 1 To Num_Models
    Model(i)= Allocate(Len(ModelType))
Next


Load_Obj "Models/Level_001.obj", Model(1)
CalcNormals Model(1)
Entity(1).Model_Id = 1
Entity(1).Active=True
Init_Entity Entity(1)


Load_Obj "Models/Gun.obj", Model(2)
CalcNormals Model(2)
Entity(2).Model_Id = 2
Entity(2).Active=True
Entity(2).Position.X=0
Entity(2).Position.Y=-4.65
Entity(2).Position.Z=-27
Entity(2).Angle.Y = .1
Init_Entity Entity(2)

Load_Obj "Models/Missle.obj", Model(3)
CalcNormals Model(3)

Load_Obj "Models/Explosion_Sphere.obj", Model(4)
CalcNormals Model(4)



For i2 = 1 To Num_Models
    For S = 0 To Model(i2)->Num_Surfaces - 1
        For i= 0 To 3
            Model(i2)->Surf[S].Ambient(i)= 0.15
            Model(i2)->Surf[S].RGBAlpha(i) = 1.0
            Model(i2)->Surf[S].Specular(i)= 0.75
            Model(i2)->Surf[S].Diffuse(i)= 0.2
            Model(i2)->Surf[S].Emission(i)= 0.0        
        Next
        Model(i2)->Surf[S].Shininess = 5
        Model(i2)->Surf[S].Emission(3)= 1.0
        Model(i2)->Surf[S].TransParent = False
    Next
Next


Dim k As Ubyte Ptr, wTime As Integer, FPS As Integer, FPSTimer As Integer, FramesPerSecond As String
Dim tDist As Single
Dim Collided As Integer

For i = 1 To Num_Models
    Build_DLists Model(i), mTextures(), DLists(i)
Next



Plr.Radius = .5
Plr.Health=100
Plr.Weapon=2
Init_Entity Plr.Cam
Plr.Cam.Position.Y = 6
Plr.Cam.Position.Z = 4
Recoil.Y = 1


For i= 1 To Num_Particles
    Particle(i).Life_Span = i
    Particle(i).List_Id = 3
    For i2 = 0 To 2
        Particle(i).AlphaVal(i2) = .25
    Next
Next



Dim tLine(1 To 2) As Vector3DType, _
vTriangle(1 To 3) As Vector3DType, _
tVector As Vector3DType, _
i3 As Integer

SDL_WarpMouse(MidX, MidY)
Do  
    
    wTime = SDL_GetTicks() + 20
    
    Glclear GL_COLOR_BUFFER_BIT Or GL_DEPTH_BUFFER_BIT
    SDL_PumpEvents
    k = SDL_GetKeyState(0)
    Result = Peek(K + SDLK_ESCAPE)
    
    
    Do While SDL_Pollevent(@Event)
        Select Case Event.Type        
        Case SDL_MouseMotion
            Mouse_X = Event.Motion.X
            Mouse_Y = Event.Motion.Y
        Case SDL_MouseButtonDown
            Plr.Firing = Event.Button.Button
        Case SDL_MouseButtonUp
            Plr.Firing = False
        End Select
    Loop
    
    Plr.Cam.Angle.X = ( MidY - Mouse_Y )/750
    Plr.Cam.Angle.Y = ( MidX - Mouse_X )/750
    Plr.Cam.Angle.Z= 0
    If Plr.Firing=1 Then Recoil.X=0
    
    SDL_WarpMouse(MidX, MidY)
    
    If Plr.Cam.RVector.Y<>0 Then
        Plr.Cam.Angle.Z = -Plr.Cam.RVector.Y*.5
    End If
    
    Plr.WalkSpd*=.95
    If Abs(Plr.WalkSpd)<1 Then Plr.WalkSpd=0
    Plr.StrafeSpd*=.95
    If Abs(Plr.StrafeSpd)<1 Then Plr.StrafeSpd=0
    
    If Peek(K + SDLK_W) Then
        Plr.vVector.X+= Plr.Cam.DVector.X*.02
        Plr.vVector.Z+= Plr.Cam.DVector.Z*.02
    End If
    
    If Peek(K + SDLK_S) Then
        Plr.vVector.X-= Plr.Cam.DVector.X*.02
        Plr.vVector.Z-= Plr.Cam.DVector.Z*.02
    End If
    
    If Peek(K + SDLK_D) Then
        Plr.vVector.X+= Plr.Cam.RVector.X*.02
        Plr.vVector.Z+= Plr.Cam.RVector.Z*.02
    End If
    
    If Peek(K + SDLK_A) Then
        Plr.vVector.X-= Plr.Cam.RVector.X*.02
        Plr.vVector.Z-= Plr.Cam.RVector.Z*.02
    End If
    
    If Peek(K + SDLK_SPACE) Then
        If Collided Then
            Plr.Gravity=.4
            alSourcefv Wav_Src(5), AL_POSITION, @ListenerPos(0)
            alSourcePlay Wav_Src(5)
        End If
    End If
    
    
    Plr.vVector.X*=.9
    If Abs(Plr.vVector.X)<.001 Then Plr.vVector.X=0
    Plr.vVector.Y*=.9
    If Abs(Plr.vVector.Y)<.001 Then Plr.vVector.Y=0
    Plr.vVector.Z*=.9
    If Abs(Plr.vVector.Z)<.001 Then Plr.vVector.Z=0
    
    Plr.Cam.oPosition.X = Plr.Cam.Position.X
    Plr.Cam.oPosition.Y = Plr.Cam.Position.Y
    Plr.Cam.oPosition.Z = Plr.Cam.Position.Z
    
    Plr.Cam.Position.X += Plr.vVector.X
    Plr.Cam.Position.Z += Plr.vVector.Z
    
    Plr.Gravity -=.03
    If Plr.Gravity<-1 Then Plr.Gravity=-1
    Plr.Cam.Position.Y += Plr.vVector.Y +Plr.Gravity
    
    Rot_X Plr.Cam, Plr.Cam.Angle.X
    Rot_Y Plr.Cam, Plr.Cam.Angle.Y
    Rot_Z Plr.Cam, Plr.Cam.Angle.Z
    
    
    
    Collided = Check_Terrain_Collision(Plr.Cam, Plr.vVector, Plr.Gravity, Plr.Radius, Model(Entity(1).Model_Id))
    
    
    ListenerPos(0) = Plr.Cam.Position.X
    ListenerPos(1) = Plr.Cam.Position.Y
    ListenerPos(2) = Plr.Cam.Position.Z
    ListenerOri(0) = Plr.Cam.DVector.X
    ListenerOri(1) = Plr.Cam.DVector.Y
    ListenerOri(2) = Plr.Cam.DVector.Z
    ListenerOri(3) = Plr.Cam.UVector.X
    ListenerOri(4) = Plr.Cam.UVector.Y
    ListenerOri(5) = Plr.Cam.UVector.Z
    
    alListenerfv AL_POSITION, @ListenerPos(0)
    alListenerfv AL_ORIENTATION, @ListenerOri(0)
    alListener3f AL_VELOCITY, 0,0,0
    
    
    If Not Plr.Weapon Then
        If Distance(Plr.Cam.Position, Entity(2).Position)<= Plr.Radius Then
            Plr.Weapon=2
            'Entity(2).Active=False
            'Entity(2).Angle.X = 1
        End If    
    End If
    
    
    
    For i=1 To Ubound(Plr.Bullet)
        If Plr.Bullet(i).Active>0 Then
            If Plr.Bullet(i).Explosion = 0 Then
                Plr.Bullet(i).Active+=1
                If Plr.Bullet(i).Active>=500 Then Plr.Bullet(i).Active=False
                If Plr.Bullet(i).DVector.Y>-1 Then Plr.Bullet(i).DVector.Y-=.005
                tLine(2).X=Plr.Bullet(i).Position.X + Plr.Bullet(i).DVector.X*.4
                tLine(2).Y=Plr.Bullet(i).Position.Y + Plr.Bullet(i).DVector.Y*.4
                tLine(2).Z=Plr.Bullet(i).Position.Z + Plr.Bullet(i).DVector.Z*.4
                tLine(1).X=Plr.Bullet(i).Position.X
                tLine(1).Y=Plr.Bullet(i).Position.Y
                tLine(1).Z=Plr.Bullet(i).Position.Z
                
                For i3 = 0 To Model(1)->FaceCnt - 1
                    For i2 = 1 To 3
                        vTriangle(i2).X = Model(1)->Vec[Model(1)->Face[i3].P(i2)].X
                        vTriangle(i2).Y = Model(1)->Vec[Model(1)->Face[i3].P(i2)].Y
                        vTriangle(i2).Z = Model(1)->Vec[Model(1)->Face[i3].P(i2)].Z
                    Next
                    
                    If Is_Polygon_Intersected(vTriangle() , tLine(), tVector) Then
                        tLine(2).X=tVector.X
                        tLine(2).Y=tVector.Y
                        tLine(2).z=tVector.Z
                        Plr.Bullet(i).Explosion=.01
                        SourcePos(0) = Plr.Bullet(i).Position.X
                        SourcePos(1) = Plr.Bullet(i).Position.Y
                        SourcePos(2) = Plr.Bullet(i).Position.Z
                        alSourcefv Wav_Src(2), AL_POSITION, @SourcePos(0)
                        alSource3f Wav_Src(2), AL_VELOCITY, Plr.Bullet(i).DVector.X, Plr.Bullet(i).DVector.Y, Plr.Bullet(i).DVector.Z
                        alSourcePlay Wav_Src(2)
                        Plr.Bullet(i).Emission(0) = 1                    
                        Plr.Bullet(i).Emission(3) = 1
                        Plr.Bullet(i).RGBAlpha(0) = 1
                        Plr.Bullet(i).RGBAlpha(1) = .5
                        Plr.Bullet(i).RGBAlpha(2) = .05
                        Plr.Bullet(i).RGBAlpha(3) = 1
                        'Bullet(i).DVector.X+=Model(1)->Face[i3].Normal.X
                        'Bullet(i).DVector.Y+=Model(1)->Face[i3].Normal.Y
                        'Bullet(i).DVector.z+=Model(1)->Face[i3].Normal.Z
                        'Vector_Normalize Bullet(i).DVector
                    End If
                Next
                Plr.Bullet(i).Position.X = tLine(2).X
                Plr.Bullet(i).Position.Y = tLine(2).Y
                Plr.Bullet(i).Position.Z = tLine(2).Z
            End If
            
            If Plr.Bullet(i).Explosion>0 Then
                Plr.Bullet(i).Explosion+=.1
                If Plr.Bullet(i).Explosion>=1 Then
                    Plr.Bullet(i).Explosion=0
                    Plr.Bullet(i).Active=0
                End If
                
                tDist=Distance(Plr.Cam.Position, Plr.Bullet(i).Position)
                If tDist<= (Plr.Radius+Plr.Bullet(i).Explosion) Then
                    Plr.Gravity=0
                    Plr.vVector.X=((Plr.Cam.Position.X-Plr.Bullet(i).Position.X)/tDist*.4)
                    Plr.vVector.Y=((Plr.Cam.Position.Y-Plr.Bullet(i).Position.Y)/tDist*.4)
                    Plr.vVector.Z=((Plr.Cam.Position.Z-Plr.Bullet(i).Position.Z)/tDist*.4)
                    Plr.Health-=(((Plr.Radius+1+Plr.Bullet(i).Explosion)*1.5)-tDist)
                    SourcePos(0) = Plr.Cam.Position.X
                    SourcePos(1) = Plr.Cam.Position.Y
                    SourcePos(2) = Plr.Cam.Position.Z
                    alSourcefv Wav_Src(4), AL_POSITION, @SourcePos(0)
                    alSourcePlay Wav_Src(4)
                End If
            End If
        End If
    Next
    
    
    
    
    If Plr.Weapon Then
        Entity(Plr.Weapon).RVector.X = Plr.Cam.RVector.X
        Entity(Plr.Weapon).RVector.Y = Plr.Cam.RVector.Y
        Entity(Plr.Weapon).RVector.Z = Plr.Cam.RVector.Z
        
        Entity(Plr.Weapon).UVector.X = Plr.Cam.UVector.X
        Entity(Plr.Weapon).UVector.Y = Plr.Cam.UVector.Y
        Entity(Plr.Weapon).UVector.Z = Plr.Cam.UVector.Z  
        
        Entity(Plr.Weapon).DVector.X = Plr.Cam.DVector.X
        Entity(Plr.Weapon).DVector.Y = Plr.Cam.DVector.Y
        Entity(Plr.Weapon).DVector.Z = Plr.Cam.DVector.Z
        
        Entity(Plr.Weapon).Position.X = Plr.Cam.Position.X+(Plr.Cam.DVector.X*.2)+(Plr.Cam.RVector.X*.1)+(Plr.Cam.UVector.X*-.05)
        Entity(Plr.Weapon).Position.Y = Plr.Cam.Position.Y+(Plr.Cam.DVector.Y*.2)+(Plr.Cam.RVector.Y*.1)+(Plr.Cam.UVector.Y*-.05)
        Entity(Plr.Weapon).Position.Z = Plr.Cam.Position.Z+(Plr.Cam.DVector.Z*.2)+(Plr.Cam.RVector.Z*.1)+(Plr.Cam.UVector.Z*-.05)
        
        Rot_X Entity(Plr.Weapon), Recoil.X/10
    End If
    
    Entity(Plr.Weapon).Angle.X *= .95
    Recoil.X *= .95
    If Plr.Firing =1 And Plr.Weapon Then
        Plr.BulletCnt+=1        
        If Plr.BulletCnt>=Ubound(Plr.Bullet) Then Plr.BulletCnt = 1
        If Plr.Bullet(Plr.BulletCnt).Active=0 Then
            If SDL_GetTicks()>=Plr.Shot_Delay Then
                Entity(2).Angle.X = .1
                Recoil.X = 0
                Plr.Shot_Delay = SDL_GetTicks() + 50
                Plr.Bullet(Plr.BulletCnt).Active=1
                Plr.Bullet(Plr.BulletCnt).Explosion=0
                Plr.Bullet(Plr.BulletCnt).Randimation = (Plr.BulletCnt Mod 2) '* 2
                Plr.Bullet(Plr.BulletCnt).Position.X=Entity(Plr.Weapon).Position.X '+ (Entity(Plr.Weapon).DVector.X)
                Plr.Bullet(Plr.BulletCnt).Position.Y=Entity(Plr.Weapon).Position.Y '+ (Entity(Plr.Weapon).DVector.Y)
                Plr.Bullet(Plr.BulletCnt).Position.Z=Entity(Plr.Weapon).Position.Z '+ (Entity(Plr.Weapon).DVector.Z)
                Plr.Bullet(Plr.BulletCnt).DVector.X=Entity(Plr.Weapon).DVector.X
                Plr.Bullet(Plr.BulletCnt).DVector.Y=Entity(Plr.Weapon).DVector.Y
                Plr.Bullet(Plr.BulletCnt).DVector.Z=Entity(Plr.Weapon).DVector.Z
                Plr.Bullet(Plr.BulletCnt).UVector.X=Entity(Plr.Weapon).UVector.X
                Plr.Bullet(Plr.BulletCnt).UVector.Y=Entity(Plr.Weapon).UVector.Y
                Plr.Bullet(Plr.BulletCnt).UVector.Z=Entity(Plr.Weapon).UVector.Z
                Plr.Bullet(Plr.BulletCnt).RVector.X=Entity(Plr.Weapon).RVector.X
                Plr.Bullet(Plr.BulletCnt).RVector.Y=Entity(Plr.Weapon).RVector.Y
                Plr.Bullet(Plr.BulletCnt).RVector.Z=Entity(Plr.Weapon).RVector.Z
                
                Plr.Bullet(Plr.Bulletcnt).RGBAlpha(0)=1
                Plr.Bullet(Plr.Bulletcnt).RGBAlpha(1)=1
                Plr.Bullet(Plr.Bulletcnt).RGBAlpha(2)=1
                Plr.Bullet(Plr.Bulletcnt).RGBAlpha(3)=1
                alSourcefv Wav_Src(1), AL_POSITION, @ListenerPos(0)
                alSourcePlay Wav_Src(1)
            End If
        End If
    End If
    
    
    

6
Work In Progress / have start bar working in gui an add a game .
« on: September 19, 2013, 11:50:50 AM »
have start bar working in gui an add a game .
if any wants me to add any programs they made for my interface email me
extreme_black_ops@hotmail.com

7
Work In Progress / how would i make a window from scratch in FB
« on: March 29, 2013, 04:14:51 PM »
how would i make a window from scratch in FB  ?

8
Programming / comand line what does it need it runs ?
« on: August 05, 2010, 06:43:13 PM »
ps do not run gui it will crash .... just a note



Quote

declare sub main
declare sub helpcom
declare sub time1
declare sub com
declare sub cls1
declare sub gui
declare sub file
         
main '' call this top of the code of main
Screen 18, 32, 4, 1
If ScreenPtr = 0 Then
    Print "Error setting video mode!"
    End
End If

sub main


dim comand as string

input "(Oz beta v00.10)", comand
if comand = "help" then  '' I THINK IFS FOR HELP
helpcom

elseif comand = "quit" then
com '' com is for quiting the shell

elseif comand = "time" then time1 '' gose to time if it has too

elseif comand = "cls" then cls1 '' cls what do you think ?
elseif comand = "gui" then gui

elseif comand = "file" then file '' if you need to know what files this programs is in. 

else print "bad input" '' if there is no input print out bad onput
main



end if  '' NEED BOTH OF THEM HERE DO NOT MOVE think there end of sub
end sub


sub helpcom
color 9
print"*******************COMANDS********************** "
print"*  Made by DAVID SCHUEPPEL 2008,APR,20         * "
print"* updated 2009 nov ,24,2009                    * "
print"* new updated      june 29 2010                * "
print"*______________________________________________* "
print"*                 COMANDS                      * "
print"************************************************ "
print"*(help) ___ YOU ARE AT HELP.                   * "
print"*(time) ___ CALLS THE DATE & TIME.             * "
print"*(quit)__ QUITING THE PROGRAME.                * "
print"*(cls)___ Clears what is on srceen.            * "
print"*                                              * "
print"*(gui)_____ for interface calls mouse too.     * "
print"*                                              * "
print"*(file)____ if you need to know what files an  * "
print"* opens your c: drive show you whats on it     * "
print"* this programs is in.                         * "
print"*                                              * "
print"*                                              * "
print"*                                              * "
print"*                                              * "
print"*                                              * "
print"*______________________________________________* "
print"*  I hoped I helped you thx you for use        * "
print"*   David schueppel shell & gui interface      * "
print"************************************************ "
color 15
main ''BACK TO MAIN
end sub

sub file
print "letting you know where dir the shell or gui is in windows.. "

Print CurDir
Dim As String drive,s
'
drive="c"
s=dir(drive & ":\*.*",63)
While s<>""       'should list files on drive..
        Print s
        s=dir()
Wend
'
Print:print "Sleeping to Exit"
Sleep

'
Print:print "Sleeping to Exit"
main

end sub




sub time1  '' the time sub to get the time :)
t$ = TIME$
PRINT DATE '' the date an time is here
PRINT "THE TIME IS -"; TIME$
main '' BACK TO MAIN
end sub

sub cls1 '' cls sub of cls lol
    cls
 
sleep 1
main
end sub


com  '' com is for quiting the program
sub com
end
end sub


gui ''for gui interface
sub gui
Dim result As Integer = Run("interface.exe")
end
end sub




9
Programming / how would i make a 3d interface for rpg S.o.S
« 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 ....

10
Programming / update code for starting rpg just a starting point
« on: July 16, 2010, 03:01:49 AM »
just asking what may need to be updated if any one think of any thing to add
time to work on 

Code: [Select]
' Create a string and fill it.
DIM buffer AS STRING

dim namee as string
dim lastname as string
dim age as string
dim sex as string 
dim race as string
dim linee as string

buffer = "-Game Char file-"

' Find the first free file handle.
f = FREEFILE

input "(What is your Name ?)", namee
print namee

input "(What is your Lastname ?)", lastname
print lastname


input "(What is your age ?)", age
print age
cls


100
print "( If pick your sex (M) For Male or (F) for Female. )"
input "( Pick your sex ?)" , sex
if sex = "m" then
    print "(You are Male)"
    sleep

elseif sex = "f" then
    print "(You are Female)"
    sleep

else
    print "bad input"
    cls
    goto 100
   
end if

200
print ""
print"________(List of race's)__________"
print "(H-for Human.)"
print"________________"
print "(E-for Elf.  )"
print"________________"
print "(O-for Org.  )"

input"(What rase will you be ?) " , race

if race = "h" then
    print "(You have pick being a HUMAN.)"

elseif race = "e" then
print "(You have pick being a Elf.)"

elseif race = "o" then
    print "(You have pick being a ORC.)"

else
    print "bad input"
    cls
    goto 200
   
end if

' Open the file "file.ext" for binary usage, using the handle "f".
OPEN "file.ext" FOR BINARY AS #f

' Place our string inside the file, using handle "f".
PUT #f, , buffer

put #f, , namee

put #f, , lastname

put #f, , age


put #f, , sex

put #f, , race
' Close all open files. 
CLOSE

' End the program. (Check the file "file.ext" upon running to see the output.)
END


11
Programming / S.O.S help with if and goto odd
« on: July 14, 2010, 08:58:03 PM »
if any one help me find out why this not working it would be a big help... :o thx



Quote

dim sex as string


100
print "( If pick your sex (M) For Male or (F) for Female. )"
input "( Pick your sex ?)" , sex
if sex = "m" then print "(You are Male)",sex

elseif sex = "f" then print "(You are Female)", sex

else print "bad input" then goto 100


12
Programming / RPG I am starting good for (Newbe)
« on: July 14, 2010, 11:40:39 AM »

Code: [Select]
dim lastname as string
dim namee as string
dim age as single
dim sex as string 
dim race as string

input "(what is your name ?)", namee
print namee

input "(What is your lastname ?)", lastname
print lastname

input "(What is your age ?)", age
print age
 
print "( If pick your sex (m) for male or (f) for female. )"
input "( pick your sex ?)" , sex
if sex = "m" then print "(you are male)",sex

if  sex = "f" then print "(you are female)", sex



print"________(List of race's)__________"
print "(H-for Human.)"
print"________________"
print "(E-for Elf.  )"
print"________________"
print "(O-for Org.  )"
input"(What race will you be ?) " , race


if race = "h" then print "(You have pick being a HUMAN.)"

if race = "e" then print "(You have pick being a Elf.)"

if race = "o" then print "(You have pick being a ORG.)"


sleep 5000




13
Programming / making a window in freebasic .....
« on: July 13, 2010, 05:02:02 PM »
Well, it seems to be time to work on putting my interface in a window. All I need it to do is run console commands. Grin It is going to take a bit of time to get working. Right now I have a sprite in the window that you can move around with the keyboard, so I know the GUI will work OK.

If there as anyone who can help me with this I would appreciate it. I'm trying to adjust and populate a window, then down down the road I'll need to do stuff like text fields and mouse drawing. Big thanks to the guy who helped me so far. Smiley

This is for the gamers who love playing all night long. Wink

14
Programming / I'M back
« on: June 27, 2010, 05:13:54 PM »
i just am getting a new place where i live and a new PC.
any way got my new youtube up and going too so take a look ...
http://www.youtube.com/watch?v=nBsuAKvamSQ
taken a year off from programing for a bit to think abit but getting back in to it hard mad........

here is my youtube soon going to make a clip of all the work i have done so far .......
i have to fix up the new desk top i am making ........

ps lost my pc to some weed head named Len lol oh well get a new one up and going......

ps i was the one guy who wanted a freebasic inface......
i am looking for programer who work in opengl and freebasic
to make new software for the new interface ... so if you want a job down the road i may keep you on bord but i have to get moved in to my new place very small but it will work for now :)
sub to my youtube if you wish to find a job down the road taking programing to a new level :)thx you all for the help

i hate C# and evil java and the evil math man lol   ..............



15
Programming / gui like dos but made by me and help free thx
« on: November 30, 2009, 10:53:39 AM »
ps it runs my interface exe so dont run it in the interface it all works  and have fun coding :) we are in this togegher .
declare sub main
declare sub helpcom
declare sub time1
declare sub com
declare sub cls1
declare sub gui
declare sub file
         
main '' call this top of the code of main
Screen 18, 32, 4, 1
If ScreenPtr = 0 Then
    Print "Error setting video mode!"
    End
End If

sub main


dim comand as string

input "(Oz beta v00.10)", comand
if comand = "help" then  '' I THINK IFS FOR HELP
helpcom

elseif comand = "quit" then
com '' com is for quiting the shell

elseif comand = "time" then time1 '' gose to time if it has too

elseif comand = "cls" then cls1 '' cls what do you think ?
elseif comand = "gui" then gui

elseif comand = "file" then file '' if you need to know what files this programs is in. 

else print "bad input" '' if there is no input print out bad onput
main



end if  '' NEED BOTH OF THEM HERE DO NOT MOVE think there end of sub
end sub


sub helpcom
color 9
print"*******************COMANDS********************** "
print"*  Made by DAVID SCHUEPPEL 2008,APR,20         * "
print"* updated 2009 nov ,24,2009                    * "
print"*______________________________________________* "
print"*                 COMANDS                      * "
print"************************************************ "
print"*(help) ___ YOU ARE AT HELP.                   * "
print"*(time) ___ CALLS THE DATE & TIME.             * "
print"*(quit)__ QUITING THE PROGRAME.                * "
print"*(cls)___ Clears what is on srceen.            * "
print"*                                              * "
print"*(gui)_____ for interface calls mouse too.     * "
print"*(file)____ if you need to know what files     * "
print"* this programs is in.                         * "
print"*                                              * "
print"*                                              * "
print"*                                              * "
print"*                                              * "
print"*                                              * "
print"*______________________________________________* "
print"*  I hoped I helped you thx you for use        * "
print"*   David schueppel shell & gui interface      * "
print"************************************************ "
color 15
main ''BACK TO MAIN
end sub

sub file
print "letting you know where dir the shell or gui is in windows.. "

Print CurDir

main

end sub




sub time1  '' the time sub to get the time :)
t$ = TIME$
PRINT DATE '' the date an time is here
PRINT "THE TIME IS -"; TIME$
main '' BACK TO MAIN
end sub

sub cls1 '' cls sub of cls lol
    cls
 
sleep 1
main
end sub


com  '' com is for quiting the program
sub com
end
end sub


gui ''for gui interface
sub gui
Dim result As Integer = Run("interface.exe")
end
end sub

Pages: [1] 2