Hello everyone my name is Scott and I've been programming in playbasic for 5-6 years now without shareing much
so I've decided to let a bunch of stuff go. The only thing I ask at this point is if you use any of this code that you
please show me what you've do with it. Over the course of this week I will be destributeing all kinds of stuff because I want
people to see how hard I've really been working behind the scenes. There is gooing to be mostly demo's and gfx but game will come also
when I figure how to send large files. Thanks and I hope you really have some fun with theses and mod them or use them in your own games.
Peace for now.
Rotozooming!
Remember this? Ol' School screensaver
Ah, The things I can make with my Spiralgraph hehheeheheh
2D Fractal subdivision done the right way.
Most of these you just have to change the path to match yours
these and more where had in a 3 month span over the summer a couple of years ago.
This is after watching scream 4 heheheheheeheh
Do you want to join my guild heheeheh This is for a demo I'm working on but right now it's very large heightmaps
great for terrain building.
Simple starfileld but fun to code
Now this texture looks funny but take a good look and it's a heightmap
of greeble star wars top of deathstar trench it just needs to be turned 3d
Another old school demo
Well, That's it for now but there is some much more to follow
If people like these then let me know and I upload a bunch more
I also have large file mostly games underdevelopement which I am going to upload also when I figure how to send large files
to this site if someone can help please let me know and remember to have fun
you don't owe me nothing these are all completely free all's I ask is if you use them or mod them
I like to see what peole have done to them Thanks and have phun.
ScottieB very nice codes. Please upload more. =)
My magic magnigfying mind. hehehehe
slow but it works
someone could write the speed up
Imagine scrolling without a buffer. Only a virtual one.
Imagine scrolling without a buffer.
Only a virtual one.
Ooops! Sorry for the double
Here's a game premise.
Watch it evolve.
Cells grow and die according to the rules.
Ice, Ice baby
Sort of like blood but not
This is not much but it shows the math for 2d primitives.
Scale,Translation and Rotation.
Core Stuff here
I will be releaseing large programs soon.
When someone can tell me an easy way to upload big stuff.
Again nice codes. I can tell you way to upload big staff.
Here's:
http://rghost.ru/
Hi all
scottieB ,
you have been busy over the last 6 years , lots of stuff here for me to go through as soon as i get a few mins , thanks for sharing and look forward to your other stuff no matter how big or small
keep up the good work , all this maths stuff is over my head
mick :)
Thanks for the comments guys and there's lots to follow in the near future.
I'm trying out a file shareing site now.
the link below should bring you to a asteroid game you can download and play and mod please do!
I'm starting to send larger files and we have to use other sites for large ones.
The link will be good for 30 days so get your free copy now!
And remember as always the code is opensrource from me.
please just show me what you can do with the stuff I'm sending.
Thanks
http://rghost.net/41100458
Ok, guys this seems to work so here's another one.
I't's a skeet shooting program. My friend likes it he says it's one of my best though I do'nt agree.
All code is free from me.
It'll be up for 30 days. So get your copies quick. and remeber with this one happy shooting.
http://rghost.net/41100568
nice gfx scottie but it lags a lot on my pc. very sluggish.
Sorry that one was made on my tri-core but this one and some of the other should be just fine.
Have phun and remember to pass on the good news please.
This one also is free for all includeing all source code. Only 30 days to get though so grab it while you can!
http://rghost.net/41100644
this is what i get scottie
I don't know why you get a blank weird screen i'm running windows xp I don't know what this stuff looks like on windows 7???
They all did'nt give you that problem did they?
Because they all work over here.
Sorry your experianceing problems. maybe others know the solution for you? Sorry again I can't help with that.
other people don't all have the problem I think because I'm getting good replies.
I working on getting some more up people seem to want more by the sounds of it.
But once again I'm sorry some are'nt working for you.
The skeet program is slow for number of reasons, the main one being it's fetching video memory when blending. Reducing the dead pixels count in the textures would also be beneficial as well removing inner loop redundancy.
Download,
http://rghost.net/41100568 (http://rghost.net/41100568)
Load project and replace the code with this.
[pbcode]
screenwidth = 800
screenheight = 600
nos = 18 ; number of skeets
g# = 25 ; gravity constant
scalefactor# = 10 ; size of skeets
inc1 = 1 ; step increment
nobs = 40 ; number of grass blades
u1# = 0
v1# = 0
u2# = 511
v2# = 0
u3# = 511
v3# = 511
u4# = 0
v4# = 511
; Array dimensions
dim xvel#(nos)
dim yvel#(nos)
dim zvel#(nos)
dim x3d#(nos)
dim y3d#(nos)
dim z3d#(nos)
dim x2d#(nos)
dim y2d#(nos)
dim scale#(nos)
dim angle1#(nos)
dim angle2#(nos)
dim speed#(nos)
dim gravity#(nos)
dim scale#(nos)
dim st#(nos)
dim t#(nos)
dim pull(nos)
dim hit(nos)
dim x3d7#(nobs)
dim y3d7#(nobs)
dim z3d7#(nobs)
dim x3d8#(nobs)
dim y3d8#(nobs)
dim z3d8#(nobs)
dim x3d9#(nobs)
dim y3d9#(nobs)
dim z3d9#(nobs)
dim x3d10#(nobs)
dim y3d10#(nobs)
dim z3d10#(nobs)
dim x2d7#(nobs)
dim y2d7#(nobs)
dim x2d8#(nobs)
dim y2d8#(nobs)
dim x2d9#(nobs)
dim y2d9#(nobs)
dim x2d10#(nobs)
dim y2d10#(nobs)
dim sway#(nobs)
fontsize = 32
loadfont "timesnewroman",1,fontsize,0
setfont 1
; load in sound effects
loadsound "sfx\shotgunblast01.mp3",1
loadsound "sfx\explosion01.mp3",2
; load in shotgun images
loadfximage "bitmaps\shotgun01.bmp",1
loadfximage "bitmaps\shotgun02.bmp",2
loadfximage "bitmaps\shotgun01leftmid.bmp",3
loadfximage "bitmaps\shotgun02leftmid.bmp",4
loadfximage "bitmaps\shotgun01left.bmp",5
loadfximage "bitmaps\shotgun02left.bmp",6
loadfximage "bitmaps\shotgun01rightmid.bmp",7
loadfximage "bitmaps\shotgun02rightmid.bmp",8
loadfximage "bitmaps\shotgun01right.bmp",9
loadfximage "bitmaps\shotgun02right.bmp",10
loadfximage "bitmaps\shotgun02flash.bmp",50
loadfximage "bitmaps\shotgun02leftmidflash.bmp",51
loadfximage "bitmaps\shotgun02leftflash.bmp",52
loadfximage "bitmaps\shotgun02rightmidflash.bmp",53
loadfximage "bitmaps\shotgun02rightflash.bmp",54
loadfximage "bitmaps\skeet01.bmp",11 ; required fx format for scaleing and transparentcy
imagemaskcolour 11,rgb(0,0,255)
loadfximage "bitmaps\crosshair01.bmp",12
imagemaskcolour 12,rgb(0,0,0)
loadfximage "bitmaps\grass01.bmp",13
loadfximage "bitmaps\sky02.jpg",14
loadfximage "bitmaps\blades01.bmp",15
loadfximage "bitmaps\glow01.bmp",16
imagemaskcolour 15,rgb(0,128,0)
; create skeet sprites
for skeets = 1 to nos
createsprite skeets
spriteimage skeets,11
spritedrawmode skeets,2 ; rotatetion mode for scaling
spritecollisionmode skeets,6 ; pixel perfect
next skeets
; set transparentcy
for frame = 1 to 10
imagemaskcolour frame,rgb(0,0,255)
next frame
; transparentcy for muzzle flash
for frame = 50 to 54
imagemaskcolour frame,rgb(0,0,0)
createsprite frame
spriteimage frame,frame
spritedrawmode frame,2+16 ; alpha-addition used in conjuction with rotation mode
next frame
; prepare sun
imagemaskcolour 16,rgb(0,0,0)
createsprite 55
spriteimage 55,16
spritetransparent 55,1
spritedrawmode 55,2+16 ; alpha-addition used in conjuction with rotation mode
; define ground plain
x3d1# = -400
y3d1# = -65
z3d1# = 0
x3d2# = 400
y3d2# = -65
z3d2# = 0
x3d3# = 400
y3d3# = -65
z3d3# = 200
x3d4# = -400
y3d4# = -65
z3d4# = 200
; skyline
x3d5# = -400
y3d5# = 300
z3d5# = 0
x3d6# = 400
y3d6# = 300
z3d6# = 0
x2d1# = ((x3d1# * 256) / (256 - z3d1#)) + (screenwidth / 2)
y2d1# = (((screenheight/2)-y3d1# * 256) / (256 - z3d1#)) + (screenheight / 2)
x2d2# = ((x3d2# * 256) / (256 - z3d2#)) + (screenwidth / 2)
y2d2# = (((screenheight/2)-y3d2# * 256) / (256 - z3d2#)) + (screenheight / 2)
x2d3# = ((x3d3# * 256) / (256 - z3d3#)) + (screenwidth / 2)
y2d3# = (((screenheight/2)-y3d3# * 256) / (256 - z3d3#)) + (screenheight / 2)
x2d4# = ((x3d4# * 256) / (256 - z3d4#)) + (screenwidth / 2)
y2d4# = (((screenheight/2)-y3d4# * 256) / (256 - z3d4#)) + (screenheight / 2)
x2d5# = ((x3d5# * 256) / (256 - z3d5#)) + (screenwidth / 2)
y2d5# = (((screenheight/2)-y3d5# * 256) / (256 - z3d5#)) + (screenheight / 2)
x2d6# = ((x3d6# * 256) / (256 - z3d6#)) + (screenwidth / 2)
y2d6# = (((screenheight/2)-y3d6# * 256) / (256 - z3d6#)) + (screenheight / 2)
; blades of grass
for blades = 1 to nobs
x3d7#(blades) = -400 + rnd(600)
y3d7#(blades) = rnd(100)
z3d7#(blades) = z3d7#(blades-1) + rnd(10)
x3d8#(blades) = x3d7#(blades) + rnd(150) + 50
y3d8#(blades) = y3d7#(blades)
z3d8#(blades) = z3d7#(blades)
x3d9#(blades) = X3d8#(blades)
y3d9#(blades) = -65
z3d9#(blades) = z3d7#(blades)
x3d10#(blades) = x3d7#(blades)
y3d10#(blades) = -65
z3d10#(blades) = z3d7#(blades)
x2d7#(blades) = ((x3d7#(blades) * 256) / (256 - z3d7#(blades))) + (screenwidth / 2)
y2d7#(blades) = (((screenheight/2)-y3d7#(blades) * 256) / (256 - z3d7#(blades))) + (screenheight / 2)
x2d8#(blades) = ((x3d8#(blades) * 256) / (256 - z3d8#(blades))) + (screenwidth / 2)
y2d8#(blades) = (((screenheight/2)-y3d8#(blades) * 256) / (256 - z3d8#(blades))) + (screenheight / 2)
x2d9#(blades) = ((x3d9#(blades) * 256) / (256 - z3d9#(blades))) + (screenwidth / 2)
y2d9#(blades) = (((screenheight/2)-y3d9#(blades) * 256) / (256 - z3d9#(blades))) + (screenheight / 2)
x2d10#(blades) = ((x3d10#(blades) * 256) / (256 - z3d10#(blades))) + (screenwidth / 2)
y2d10#(blades) = (((screenheight/2)-y3d10#(blades) * 256) / (256 - z3d10#(blades))) + (screenheight / 2)
sway#(blades) = rnd(2)
next blades
nos = 3
gosub initialize ; set up starting variables
image1 = 1 ; starting frame of gun
image2 = 50 ; starting frame for gun flash
currenttime# = timer() ; get start time
mouse 0 ; turn off mouse
ScreenBUffer=NewFxImage(screenwidth,screenHeight,2)
do
; Render to off screen FX formated buffer
rendertoimage ScreenBUffer
; Clear the buffer to black
cls rgb(0,0,0)
; Draw scrolling clouds
texturequad 14,x2d5#,y2d5#,u1#,v1#,x2d6#,y2d6#,u2#,v2#,x2d2#,y2d2#,u3#,v3#,x2d1#,y2d1#,u4#,v4#,0
scrollimage 14,4 * elapsedtime#,0 ; animate clouds
; Draw sun
positionsprite 55,400-384/2,370-384/2
drawsprite 55
; Draw ground plain
texturequad 13,x2d1#,y2d1#,0,0,x2d2#,y2d2#,511,0,x2d3#,y2d3#,511,5111,x2d4#,y2d4#,0,511,0
; Draw blades of grass
for blades = 1 to nobs
texturequad 15,x2d7#(blades),y2d7#(blades),0,0,x2d8#(blades),y2d8#(blades),511,0,x2d9#(blades),y2d9#(blades),511,511,x2d10#(blades),y2d10#(blades),0,511,1
if once2 = 0
x2d7#(blades) = x2d7#(blades) + sway#(blades)
x2d8#(blades) = x2d8#(blades) + sway#(blades)
endif
if once2 = 1
x2d7#(blades) = x2d7#(blades) - sway#(blades)
x2d8#(blades) = x2d8#(blades) - sway#(blades)
endif
t2# = t2# + 1 * elapsedtime#
if once2 = 0 and t2# > 60 then t2# = 0:once2 = 1
if once2 = 1 and t2# > 60 then t2# = 0:once2 = 0
next blades
MX=mouseX()
MY=mouseY()
MB=MouseButton()
; Draw skeets
for skeets = 1 to nos
; pull the skeet if on
; if pull(skeets) = 1 then box x2d#(skeets)-scale#(skeets),y2d#(skeets)-scale#(skeets),x2d#(skeets)+scale#(skeets),y2d#(skeets)+scale#(skeets)
if hit(skeets) = 0 and pull(skeets) = 1 then scalesprite skeets,scale#(skeets):positionsprite skeets,x2d#(skeets),y2d#(skeets):drawsprite skeets
; pixel perfect collision detection between mouse and sprites
if shots > 0 and hit(skeets) = 0 and MB = 1 then hit(skeets) = pointhitsprite(MX,MY,skeets)
; fire gun and keep track of shells
if shots > 0 and once1 = 0 and MB = 1 then once1 = 1:playsound 1:shots = shots - 1:if shots < 0 then shots = 0
if MB = 0 then once1 = 0
; scoreing
if hit(skeets) = 1 then dis# = 256 - z3d#(skeets):score = score + (dis# / 256) * 1000:hit(skeets) = 2:stopsound 1:playsound 2
next skeets
if MB=0
if MX > 350 and MX < 450 then image1 = 1
if MX > 250 and MX < 350 then image1 = 3
if MX > 0 and MX < 250 then image1 = 5
if MX > 450 and MX < 550 then image1 = 7
if MX > 550 and MX < 800 then image1 = 9
endif
if once1 = 1 and MB = 1
if MX > 350 and MX < 450 then image1 = 2
if MX > 250 and MX < 350 then image1 = 4
if MX > 0 and MX < 250 then image1 = 6
if MX > 450 and MX < 550 then image1 = 8
if MX > 550 and MX < 800 then image1 = 10
if MX > 350 and MX < 450 then image2 = 50
if MX > 250 and MX < 350 then image2 = 51
if MX > 0 and MX < 250 then image2 = 52
if MX > 450 and MX < 550 then image2 = 53
if MX > 550 and MX < 800 then image2 = 54
endif
if once1 = 1 then drawsprite image2
drawimage image1,0,0,1
drawimage 12,MX-16,MY-16,1
text 0,0,"Score: " + str$(score)
; keep track of how many skeets have been shot
num1 = 0
for skeets = 1 to nos
if pull(skeets) = 1 then num1 = num1 + 1
next skeets
; display how many skeets have been shot out of how many
text 800-fontsize*3,0,str$(num1) + " / " + str$(nos)
; display number of shells in chamber
text 0,600-fontsize,str$(shots) + " / 6 "
; draw the screen buffer to the Pb screen
rendertoscreen
drawimage ScreenBUffer,0,0,false
sync
pervioustime# = currenttime# ; record old time
currenttime# = timer() ; get new time
elapsedtime# = (currenttime# - pervioustime#) / 1000 ; calculate difference for timing perposes
for skeets = 1 to nos
if pull(skeets) = 0 then goto skip1
; velocity vectors direction and speeds
xvel#(skeets) = xvel#(skeets) + cos(angle1#(skeets) + 270) * (speed#(skeets) * elapsedtime#)
yvel#(skeets) = yvel#(skeets) + cos(90-angle2#(skeets)) * (speed#(skeets) * elapsedtime#)
zvel#(skeets) = zvel#(skeets) + sin(angle1#(skeets) + 270) * (speed#(skeets) * elapsedtime#)
; apply vectors to 3D positions
x3d#(skeets) = x3d#(skeets) + xvel#(skeets) * elapsedtime#
y3d#(skeets) = y3d#(skeets) + yvel#(skeets) * elapsedtime#
z3d#(skeets) = z3d#(skeets) + zvel#(skeets) * elapsedtime#
; 3D to 2D converting formulas
x2d#(skeets) = ((x3d#(skeets) * 256) / (256 - z3d#(skeets))) + (screenwidth / 2)
y2d#(skeets) = (((screenheight/2)-y3d#(skeets) * 256) / (256 - z3d#(skeets))) + (screenheight / 2)
gravity#(skeets) = gravity#(skeets) + (g# * elapsedtime#) ; increment gravity constant
y2d#(skeets) = y2d#(skeets) + gravity#(skeets) ; apply gravity to all skeets
scale#(skeets) = z3d#(skeets) / 256 ; * scalefactor# ; scale all skeets based on distance away from shooter
if scale#(skeets) < 0 then scale#(skeets) = 0 ; cut off so it does'nt go into the negative value range
skip1:
t#(skeets) = t#(skeets) + (1 * elapsedtime#) ; timing counter keeps track of seconds gone by
if t#(skeets) > st#(skeets) then pull(skeets) = 1 ; launch skeets when time greater than starttime
next skeets
if t#(nos) > 10 * (nos + 1) and nos = 18 then nos = 0:inc1 = 0:gosub reset ; reset game
if t#(nos) > 10 * (nos + 1) then gosub reset ; reset level
loop
initialize:
shots = 6
for skeets = 1 to nos
; starting position of skeets in 3D space.
x3d#(skeets) = 0
y3d#(skeets) = 0
z3d#(skeets) = 255
sign = rnd(1)
if sign = 0 then angle1#(skeets) = rnd(45) ; right angles of skeets
if sign = 1 then angle1#(skeets) = rnd(45):angle1#(skeets) = -angle1#(skeets) ; left angles of skeets
angle2#(skeets) = 45 + rnd(45) ; up and down (0-90)
speed#(skeets) = 5 + rnd(5) ; speed of skeets (5-10)
next skeets
; create starttime(s)
for skeets = 1 to nos step inc1
; plugin same times for a series of numbers
for i = 1 to inc1
plugin = skeets + i - 1
st#(plugin) = 10 * skeets ; 10 second intervals
next i
next skeets
return
reset:
for skeets = 1 to nos
pull(skeets) = 0
t#(skeets) = 0
xvel#(skeets) = 0
yvel#(skeets) = 0
zvel#(skeets) = 0
gravity#(skeets) = 0
hit(skeets) = 0
next skeets
nos = nos + 3
inc1 = inc1 + 1
gosub initialize
return
[/pbcode]
thanks for the speed up kevin
ok guys here's a new one for the day
remember all source code here is free to use as you wish the only thing I'm asking is you show me what you
do this all this stuff such like kevin did to skeet any mods or upgrades for maybe even expand on the programs thiemselves.
Thanks for all the good comments too.
there will be more to follow
Peace and happy codeing!
Hello guys it's me again.
Ok with this one make sure per-pixel tile engine folder is on the desktop and run the playbasic file in it.
Remember to get your free copy within 30 days and as usual all code is free and do with it what you want just
please show me any changes you might do to it. All the software in this post was created by me and it is a compliation of
what I've done with playbasic so far not all programs are complete but there is alot of work in progress
if anyone what to continue or take over any of there projects feel free as I will donate them to the cause
there for beginnners or anyone who likes playbasic like I do. They can teach alot of things. plus they can be used for makeing
new kinds of gsmes as most good games start with basic ideas and I would love to see someone or some people take these programs to new
heights. Some of these programs might not look like too much but most games begin with simple ideas.
I know from what I see I have posted that even some of the little ones here could make whole new games just use your imagination.
This is my contribution to the site and some of the things playbasic can be used for. I'm not a professional but with time theses thing can grow into really nifty progs. As for begginners I was there too so don't give up you will see if you stick to it your programs with get bettter over time exspecially when people help you out.
Bye for nw
Peace, Love and out!
ttp://rghost.net/41107264
Hello Scottie!
Thank you for sharing your programs. :)
I hope I find time to take a look on them soon.
Bye
Sigtrygg
Thanks
I had to remove rally-x it was the wrong one and the right one is too big
I ran out of room on the site. I will now have to wait 30 days.
In one month I will re-upload rally-x remake the right one. right now it's over 70 megs compressed so I will have to see what I can do
because I only get 50 megs to work with at a time.
So sorry about that one but I will get back to posting more later I have a couple of other surprizes too.
later for now people will just have to check this stuff out for the time being.
Thanks and hope you enjoy the free programs.
The examples are generally pretty good, many could be tweaked further by brushing up on some PlayBASIC fundamentals here and there. One that comes to mind is buffer locking (lockBuffer (https://playbasic.com/help.php?page=GRAPHICS.LOCKBUFFER) / Unlockbuffer (https://playbasic.com/help.php?page=GRAPHICS.UNLOCKBUFFER) ) when attempting to brute force stuff.
After looking over some the bigger examples, they seem to be full of materials not in use Could probably halved (at least) the sizes with a little cleaning up of the project media folders There's something like 8 meg of music included in the Lunar archive just bloating out the archive.
thanks for sharing scottiib.
i never used texturequad or texturetri before. clever way of getting the grass to sway.
this is whats great about sharing programs. you learn something new.
stevmjon