CodeBase Entries
Welcome to our CodeBase where you can search through DarkBASIC, DarkBASIC Professional and AppGameKit source code covering a wide range of topics from full games to demo effects to object loaders.
All registered users can submit their own code from their account page, so why not contribute?
CodeBase Description | Category | |
---|---|---|
A very very useful program which can load and position (in realtime) images onto the screen, and stores click coordinates into a text file. very easy to use, and very flexible. Use this for finding the coordinates of buttons, or where to place a picture onto the screen, or where to draw an object, ect. just load images onto the screen, and get clicking! please credit if used! www.freewebs.com/aralox Version: 1.0
Created: 13th Jul 2007 08:27
|
Complete Applications | |
This shows a rocket taking off and exploding in the air. I would only run this program on a fast computer(it takes up a lot of processing time and internal memory). Version: 1.0
Created: 10th Jul 2007 06:36
|
Particles | |
THIS CODE MAKES A SIMPLE MATRIX YOU CAN WALK ON. NO MEDIA NECESARY! Version: 1.0
Created: 7th Jul 2007 13:15
|
Matrix | |
You're a cube and must run into the sphere to win all the while observing the nice ambient lighting. Version: 1.0
Created: 7th Jul 2007 00:10
|
Basic 3D | |
Ok it's not done but I think it's pretty cool. It is the first game I have ever made that is animated, so the guy runs kind of funny. If you have any comments to tell me make it better I welcome suggestions. Thank you. Version: 1.0
Created: 6th Jul 2007 18:56
|
Complete Applications | |
Same as the Combination control aircraft except it is fo the Attack Throttle Version: 1.13
Created: 1st Jul 2007 11:27
|
3D | |
Similiar to the Combination control flight control aircraft I put up except this is ground based you can with this make racing hovercraft , hovercraft tanks, hover tanks, hover bikes, speeeders and if you take the hovercraft jumping away and the straffing away, cars, trucks or even articulated tanks Version: 1.13
Created: 1st Jul 2007 11:18
|
3D | |
Basically this is a combination flight control program you can use the mouse ,keyboards and joystick controls to fly your VTOL fighter,or bomber aircraft, might need a bit of work to make it into a commercial jet airliner (although I would just take out the VTOL Commands and make the aircraft not be able to take off unless it reached 150 miles an hour) not too much for a private plane though there you go Version: 1.13
Created: 1st Jul 2007 11:06
|
3D | |
A 2D arena game I am working on. Version: 1.0
Created: 30th Jun 2007 23:42
|
Games | |
simple way to start and finish a game or program Version: 1.0
Created: 30th Jun 2007 21:58
|
Input / Output | |
REM Make_Memblock_Grid REM Created by Mike Shihrer aka Visigoth REM 06/28/2007 REM Free to use and modify, have fun! REM Demonstrates creating memblock meshes set display mode 1024,768,32 autocam off sync on sync rate 0 Global mem_pos position camera 0,20,0 rem return value is size of memblock in bytes, params are object ID,x width, z width, x units, z units mem_pos = make_memblock_grid(1,100,100,4,4) do display_memblock_data() move_camera1() sync loop function make_memblock_grid(id, x_width#, z_width#, x_segments, z_segments) unitwidth# = x_width# / x_segments unitheight# = z_width# / z_segments xpos# = 0 ypos# = 0 zpos# = 0 J = 1 d_color as dword d_color = RGB(255,255,255) rem calculate the size of the memblock we are going to need total_polys = (x_segments * z_segments) * 2 total_verts = total_polys * 3 memsize = (total_verts * 36) + 12 rem make a memblock of a size = memsize make memblock 1,memsize rem create the memblock header, which defines the FVF being used, in this case 338(mesh data,normals data, diffuse color, uv coords) last_mem_pos = make_memblock_meshheader(1,total_verts) rem call the make_memblock_triangle function and place the triangles rem first, it creates one triangle with the verts drawn from lower left, upper left, and lower right rem second, it creates the next triangle with the verts from upper left, upper right, and lower right rem then it just loops through drawing triangles until it reachs the x unit count, resets the I incrementer to startover rem and increments the zpos to start a new row of triangles rem change the RGB values above for different colors rem I assumed creating a horizontal matrix, and set the normals as such for I = 1 to x_segments last_mem_pos = make_memblock_triangle(1,last_mem_pos,xpos#,ypos#,zpos#,xpos#,ypos#,zpos# + unitheight#,xpos# + unitwidth#,ypos#,zpos#,0,1,0,0,1,1,d_color) last_mem_pos = make_memblock_triangle(1,last_mem_pos,xpos#,ypos#,zpos# + unitheight#,xpos# + unitwidth#,0,zpos# + unitheight#,xpos# + unitwidth#,ypos#,zpos#,0,0,1,0,1,1,d_color) inc xpos#, unitwidth# If J < z_segments If I = x_segments Inc J,1 inc zpos#,unitheight# xpos# = 0 I = 0 endif endif next I make mesh from memblock 1,1 delete memblock 1 make object id,1,0 rem uncomment this is you want to save the mesh, but beware, there seems to be a limit to how big a mesh you can save. Keep it under 80k polys rem save mesh "grid_" + str$(id) + ".x",1 delete mesh 1 endfunction last_mem_pos function make_memblock_triangle(id,mem_start,xpos1#,ypos1#,zpos1#,xpos2#,ypos2#,zpos2#,xpos3#,ypos3#,zpos3#,u1,v1,u2,v2,u3,v3,dif_clr as dword) a = mem_start rem mesh data format, each block is one vertice, three blocks is a triangle rem we could probably get fancy here and do some loops, but I think this is more readable rem we are just writing the values needed for each vertice in a triangle, into the memblock rem location. Every memblock position for this format takes up 4 bytes, so after every write, we just rem increment the memblock position by 4 rem vertice 1 write memblock float id,a,xpos1# : inc a,4 rem x pos of triangle write memblock float id,a,ypos1# : inc a,4 rem y pos of triangle write memblock float id,a,zpos1# : inc a,4 rem z pos of triangle write memblock float id,a,0 : inc a,4 rem x normals write memblock float id,a,1 : inc a,4 rem y normals write memblock float id,a,0 : inc a,4 rem z normals write memblock dword id,a,dif_clr : inc a,4 rem diffuse color write memblock float id,a,u1 : inc a,4 rem u write memblock float id,a,v1 : inc a,4 rem v rem vertice 2 write memblock float id,a,xpos2# : inc a,4 rem x pos of triangle write memblock float id,a,ypos2# : inc a,4 rem y pos of triangle write memblock float id,a,zpos2# : inc a,4 rem z pos of triangle write memblock float id,a,0 : inc a,4 rem x normals write memblock float id,a,1 : inc a,4 rem y normals write memblock float id,a,0 : inc a,4 rem z normals write memblock dword id,a,dif_clr : inc a,4 rem diffuse color write memblock float id,a,u2 : inc a,4 rem u write memblock float id,a,v2 : inc a,4 rem v rem vertice 3 write memblock float id,a,xpos3# : inc a,4 rem x pos of triangle write memblock float id,a,ypos3# : inc a,4 rem y pos of triangle write memblock float id,a,zpos3# : inc a,4 rem z pos of triangle write memblock float id,a,0 : inc a,4 rem x normals write memblock float id,a,1 : inc a,4 rem y normals write memblock float id,a,0 : inc a,4 rem z normals write memblock dword id,a,dif_clr : inc a,4 rem diffuse color write memblock float id,a,u3 : inc a,4 rem u write memblock float id,a,v3 : inc a,4 rem v rem a just returns the last memblock position, which we can use to get the overall size in bytes of the mesh endfunction a function make_memblock_meshheader(id,numVerts) rem header for mesh format rem sets up header for standard FVF mesh 338 rem we would change this to write a different FVF format if we wanted to write memblock dword id,0,338 write memblock dword id,4,36 write memblock dword id,8,numVerts endfunction 12 function move_camera1() if upkey() then move camera 1 if downkey()then move camera -1 if leftkey() then turn camera left 1 if rightkey() then turn camera right 1 endfunction function display_memblock_data() text 0,0,"Use Arrow Keys to Move" text 0,10,"Total Polys on screen: " + str$(statistic(1)) text 0,20,"Grid Size : " + str$(mem_pos) + " bytes" text 0,30,"FPS: " + str$(screen fps()) text 0,40,"Cam X Pos: " + str$(camera position x()) text 0,50,"Cam Y Pos: " + str$(camera position y()) text 0,60,"Cam Z Pos: " + str$(camera position z()) endfunction Version: 1.0
Created: 29th Jun 2007 03:46
|
Mesh | |
this code loads some dice and ya roll different numbers by re-texturing the sides of the objects. (get tha ZIP File) Version: 1.0
Created: 28th Jun 2007 04:34
|
Complete Applications | |
A demo of the negotiation system that I may used in my strategy game "The Godfather". The mouse controls your hand, move closer to increase your opponent's percentage and lower your own (enticing the opponent) and vice versa. TIP: Offer a good deal to get your opponent's interest, then when he starts to move closer you can edge away and lead him onto your side, for a short while he will be drawn into your trap before he realises his poor position. enjoy :) Version: 1.0
Created: 24th Jun 2007 22:09
|
Complete Applications | |
The Towers of Hanoi Problem: the computer completes the puzzle using an example of recursive function calling. [EDIT] The program will now set itself a new challenge each time it completes the puzzle! Version: 1.1
Created: 24th Jun 2007 21:29
|
Complete Applications | |
makeing a window app using bulegui Version: 1.0
Created: 23rd Jun 2007 08:25
|
Text | |
first version of a function to create your own matrixs. Version: 1.0
Created: 22nd Jun 2007 02:32
|
Mesh | |
Simple buttons that are easy to code. Version: 1.0
Created: 22nd Jun 2007 00:32
|
Complete Applications | |
This function will take a DBPro primitive, and probably any other object you want, as long as they are static, no animations, and weld the vertices. Creates a before an after .x file of the mesh so you can see the difference. Just delete the save mesh lines if you don't want the files. EDITED: Improved weld time, added stretch UV coordinates. Version: 1.1
Created: 22nd Jun 2007 00:07
|
Basic 3D | |
This is a basic login I made Version: 1.0
Created: 21st Jun 2007 21:35
|
Miscellaneous | |
Makes a pyramid out of a sentence Version: 1.0
Created: 21st Jun 2007 17:03
|
Text | |
A static screen. Nice for static video playbacks. Version: 1.0
Created: 19th Jun 2007 12:09
|
2D Effects | |
This will test the key board and type the number of the key to the screen that has ether been pressed or is being pressed. for the variable (scan) you can chose any thing not just the one i have chosen. Press the space key to clear the screen if it gets crowded! Version: 1.0
Created: 19th Jun 2007 10:47
|
Complete Applications | |
Framerate independent code. An ultra simple method for making games run the same speed no matter what the frame rate is. Even if the framerate jumps around. Version: 1.0
Created: 6th Jun 2007 15:39
|
Core | |
watch the samurai do different things Version: 1.0
Created: 1st Jun 2007 12:46
|
3D Effects | |
Program to move a sprite to the location of the mouse and to select other sprites and move them around the map. It uses collision detection to find which sprite is currently under the mouse. Version: 1.0
Created: 1st Jun 2007 10:21
|
Complete Applications | |
Makes some upgrades to Version 1.1 Version: 2.0
Created: 31st May 2007 18:13
|
Text | |
A Small function that will return the next availa ble object # Version: 1.0
Created: 31st May 2007 09:57
|
Miscellaneous | |
the animation of circles with the help of two straight lines of mathematical examples Version: 1.0
Created: 29th May 2007 04:26
|
Basic 2D | |
Gets the angle in degrees from point x1#,y1# to point x2#,y2# Version: 1.0
Created: 28th May 2007 12:04
|
Core | |
Search a sentence for a given word. Version: 1.1
Created: 27th May 2007 13:22
|
Text |