January 15, 2021, 06:14:47 PM

Author Topic: [bb] Old School Demo by CodeD [ 1+ years ago ]  (Read 860 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] Old School Demo by CodeD [ 1+ years ago ]
« on: June 29, 2017, 12:28:40 AM »
Title : Old School Demo
Author : CodeD
Posted : 1+ years ago

Description : This is a graphical demo I put together in the spirit of the old C64/Amiga demos.
I used code from the following people (I made modifications to all of it here and there) Jeppe Nielson (sin scroller function), Semar (bullet function),
and JFK (screen sin distortion)
The babe used in this demo was done by FrogDot and used with permission. All other graphics are by me.
Wedoe has graciously hosted the binaries here:
<a href="http://www.blitzbasic.no/div/AmigaTributeCoded.zip" target="_blank">http://www.blitzbasic.no/div/AmigaTributeCoded.zip[/url]


Code :
Code: BlitzBasic
  1. Global gfxBG, gfxflare
  2. Global screenbk=CreateImage(GraphicsWidth(),GraphicsHeight())
  3. Global underw_a
  4. Graphics3D 640, 480,32, 1
  5. SetBuffer BackBuffer()
  6. TFormFilter 1
  7. Color 0,0,0
  8. fntcms=LoadFont("Comic Sans MS", 16, False, False, False)
  9. SetFont fntcms
  10. n = 0
  11. grlx = 1
  12. grly = 1
  13. grly2 = 641
  14. grlxdir = 1
  15. grly = 1
  16. timex = 0
  17. speedtimex = 6
  18. run1 = 0
  19. currentsong = 1: song$ = "Tower of Flames": artist$ = "Frederic Hahn"
  20. Type t_bullet
  21. Field x,y
  22. Field speedx,speedy
  23. End Type
  24. Global bullet.t_bullet
  25. gfxBG=LoadImage("coolblue.png")
  26. gfxface = LoadImage("interface4.png")
  27. gfxgirl=LoadImage("amigagirl.png")
  28. gfxflare=LoadImage("ice.png")
  29. chnBackground=PlayMusic("z-tower.xm")
  30. While Not KeyHit(1)
  31. If KeyDown(203) Then timex = timex - 1
  32. If KeyDown(205) Then timex = timex + 1
  33. ;if currentsong = 1 then song$ = "" and artist$  = "" ;etc, etc. simple song chooser
  34. Cls
  35. DrawImage gfxBG, 1, 1
  36. WobbleView()
  37. DrawImage gfxface, 1, facey
  38. Text 100, 365, "NOW PLAYING"
  39. Text 15, 395, "TITLE: "+song$
  40. Text 15, 410, "ARTIST: "+artist$
  41. Text 65, 435, "UP/DOWN TO CHANGE SONG"
  42. Text 40, 450, "LEFT/RIGHT TO CHANGE TEXT SPEED"
  43. x=timex/10.0 Mod 7000
  44. bulletchance = Rnd(0,10): If bulletchance = 5 Then bullet.t_bullet = New t_bullet: bulletx = Rnd(0,200): bullety = Rnd(0,10): bulletspeedx = Rnd(1,3): bulletspeedy = Rnd(1,3)
  45. bulletchance2 = Rnd(0,100): If bulletchance = 10 Then bullet.t_bullet = New t_bullet: bulletx = Rnd(0,200): bullety = Rnd(0,10): bulletspeedx = Rnd(1,3): bulletspeedy = Rnd(1,3)
  46. updategame()
  47. rendergame()
  48. If grlxdir = 1 Then grlx = grlx + 1
  49. If grlxdir = 2 Then grlx = grlx - 1
  50. If grlx = 100 Then grlxdir = 2
  51. If grlx = 1 Then grlxdir = 1
  52. SinScroll (" ............... CodeD aka (DJ) Krazy K Presents Amiga Tribute Vol. 1 ... Press up/down to change songs ... Press left/right to change text speed/direction Code: CodeD, Jeppe Neilson (SinScroll), Semar (bullet code), JFK (distort) Gfx: FrogDot (thx for the babe!), CodeD ... Mods for Charity ... your donations help children!!! ... Visit http://sites.gwala.net/tormented/amiga for more info and to order the CD ... greetings to: Ckob, Lenn, Noel Cower, JFK, DJ SeeNSay, LizardKing, FutureCrew, Paradox, Mark Sibly & The Blitz Basic Crew, The Anonymous Modder ... Gotta have mod??  Amiga Tribute Vol. 2 coming soon!!  Cybernoid 3D coming soon!! Quality apps like this and more from CrapSoft and Evolved Dev Studios ............................ ", 100-x, 135, timex/10.0)
  53. SinScroll (" ............... CodeD aka (DJ) Krazy K Presents Amiga Tribute Vol. 1 ... Press up/down to change songs ... Press left/right to change text speed/direction Code: CodeD, Jeppe Neilson (SinScroll), Semar (bullet code), JFK (distort) Gfx: FrogDot (thx for the babe!), CodeD ... Mods for Charity ... your donations help children!!! ... Visit http://sites.gwala.net/tormented/amiga for more info and to order the CD ... greetings to: Ckob, Lenn, Noel Cower, JFK, DJ SeeNSay, LizardKing, FutureCrew, Paradox, Mark Sibly & The Blitz Basic Crew, The Anonymous Modder ... Gotta have mod??  Amiga Tribute Vol. 2 coming soon!!  Cybernoid 3D coming soon!! Quality apps like this and more from CrapSoft and Evolved Dev Studios ............................ ", 100-x-1, 135, timex/10.0)
  54. DrawImage gfxgirl, grlx, grly
  55. DrawImage gfxgirl, grlx, grly2
  56. Flip  
  57. If timex < 0 Then timex = 0
  58. timex = timex + speedtimex
  59. ;If KeyDown(200) Then currentsong = currentsong + 1: song$ = "Tower of Flames" And artist$ = "Frederic Hahn": FreeSound chnbackground: chnBackground=PlayMusic("z-tower.xm")
  60. ;If KeyDown(208) Then currentsong = currentsong - 1: song$ = "Tower of Flames" And artist$ = "Frederic Hahn": FreeSound chnBackground: chnBackground=PlayMusic("z-tower.xm")
  61. If KeyDown(203) Then speedtimex = speedtimex - 1
  62. If KeyDown(205) Then speedtimex = speedtimex + 1
  63. Wend
  64. ;===================================
  65. Function updategame()
  66. ;===================================
  67. For bullet.t_bullet = Each t_bullet
  68. bulletx = bulletx + bulletspeedx
  69. bullety = bullety + bulletspeedy
  70. Next
  71. End Function
  72. ;===================================
  73. Function rendergame()
  74. ;===================================
  75. For bullet.t_bullet = Each t_bullet
  76. DrawImage gfxflare,bulletx,bullety
  77. Next
  78. End Function
  79. Function SinScroll(txt$,x,y,am,amp=50,per=20,d=10)
  80. For n=1 To Len(txt$)
  81. Text x+xx,y+Sin(am+n*per)*amp,Mid$(txt$,n,1)
  82. xx=xx+d
  83. Next
  84. End Function
  85. Function WobbleView()
  86.  gw#=GraphicsWidth()
  87.  gh#=GraphicsHeight()
  88.  underw_a=(underw_a+4)
  89.  steph#=gh/32
  90.  mu8#=gh/60
  91.  If underw_a>359 Then underw_a=0
  92.   For iif#=0 To gh-4  Step .001
  93.    wsin#=(Sin((underw_a+iif)Mod 360.0)*mu8#)
  94.    CopyRect 0,  iif,         gw,steph+4, 0,iif+wsin#, ImageBuffer(screenbk),BackBuffer()
  95.    iif=iif+steph
  96.   Next
  97. End Function


Comments :


wedoe(Posted 1+ years ago)

 How about a download on the binaries ?


wedoe(Posted 1+ years ago)

 I got the binaries in the mail but can you send the compilation of it all because I get a "image does not exist" erreor message running the source......


CodeD(Posted 1+ years ago)

 hmmm, yeah i'll send it again.


Clyde(Posted 1+ years ago)

 Looks Awesome!Please send the media dude :)


wedoe(Posted 1+ years ago)

 Cool !Looks sweet and oldskool to me :)


wedoe(Posted 1+ years ago)

 /////////////////////////////////////// Zipped binaries <a href="http://www.blitzbasic.no/div/AmigaTributeCoded.zip" target="_blank"> HERE [/url]///////////////////////////////////////


Rob Farley(Posted 1+ years ago)

 Not downloaded it, however...Just scanning through you could replace
Code: [Select]
If grlxdir = 1 Then grlx = grlx + 1
If grlxdir = 2 Then grlx = grlx - 1
If grlx = 100 Then grlxdir = 2
If grlx = 1 Then grlxdir = 1
With
Code: [Select]
grlx = grlx + grlxdir
if grlx = 100 or grlx = 1 then grlxdir = - grlxdir
Also
Code: [Select]
bulletchance = Rnd(0,10): If bulletchance = 5 Then bullet...With
Code: [Select]
If rand(0,10) = 5 then ....Just a couple of little optimisations.


CodeD(Posted 1+ years ago)

 Thanks for the tips Rob.  I'm still a little stuck in the old ways of basic.


Gogs(Posted 1+ years ago)

 just a note, since there is no 3d code it works in blitzplus with a few tweaks something like so:Global gfxBG, gfxflareGlobal screenbk=CreateImage(GraphicsWidth(),GraphicsHeight())Global underw_aGraphics 640, 480,32, 0SetBuffer BackBuffer() TFormFilter 1Color 0,0,0fntcms=LoadFont("Comic Sans MS", 16, False, False, False)SetFont fntcmsn = 0grlx = 1grly = 1grly2 = 641grlxdir = 1grly = 1timex = 0speedtimex = 6run1 = 0currentsong = 1: song$ = "Tower of Flames": artist$ = "Frederic Hahn"Type t_bulletField x,yField speedx,speedyEnd TypeGlobal bullet.t_bulletgfxBG=LoadImage("coolblue.png")gfxface = LoadImage("interface4.png");MaskImage(gfxface,255,0,255)gfxgirl=LoadImage("amigagirl.png");MaskImage(gfxgirl,255,0,255)gfxflare=LoadImage("ice.png");MaskImage(gfxflare,255,0,255)chnBackground=PlayMusic("z-tower.xm")While Not KeyHit(1) If KeyDown(203) Then timex = timex - 1If KeyDown(205) Then timex = timex + 1;if currentsong = 1 then song$ = "" and artist$  = "" ;etc, etc. simple song chooserClsDrawImage gfxBG, 1, 1WobbleView()DrawImage gfxface, 1, faceyText 100, 365, "NOW PLAYING"Text 15, 395, "TITLE: "+song$ Text 15, 410, "ARTIST: "+artist$;Text 65, 435, "UP/DOWN TO CHANGE SONG"Text 40, 450, "LEFT/RIGHT TO CHANGE TEXT SPEED"x=timex/10.0 Mod 7000bulletchance = Rnd(0,10): If bulletchance = 5 Then bullet.t_bullet = New t_bullet: bulletx = Rnd(0,200): bullety = Rnd(0,10): bulletspeedx = Rnd(1,3): bulletspeedy = Rnd(1,3)bulletchance2 = Rnd(0,100): If bulletchance = 10 Then bullet.t_bullet = New t_bullet: bulletx = Rnd(0,200): bullety = Rnd(0,10): bulletspeedx = Rnd(1,3): bulletspeedy = Rnd(1,3)updategame()rendergame()If grlxdir = 1 Then grlx = grlx + 1If grlxdir = 2 Then grlx = grlx - 1If grlx = 100 Then grlxdir = 2If grlx = 1 Then grlxdir = 1SinScroll (" ............... CodeD aka (DJ) Krazy K Presents Amiga Tribute Vol. 1 ... Press up/down to change songs ... Press left/right to change text speed/direction Code: CodeD, Jeppe Neilson (SinScroll), Semar (bullet code), JFK (distort) Gfx: FrogDot (thx for the babe!), CodeD ... Mods for Charity ... your donations help children!!! ... Visit <a href="http://sites.gwala.net/tormented/amiga" target="_blank">http://sites.gwala.net/tormented/amiga[/url] for more info and to order the CD ... greetings to: Ckob, Lenn, Noel Cower, JFK, DJ SeeNSay, LizardKing, FutureCrew, Paradox, Mark Sibly & The Blitz Basic Crew, The Anonymous Modder ... Gotta have mod??  Amiga Tribute Vol. 2 coming soon!!  Cybernoid 3D coming soon!! Quality apps like this and more from CrapSoft and Evolved Dev Studios ............................ ", 100-x, 135, timex/10.0)SinScroll (" ............... CodeD aka (DJ) Krazy K Presents Amiga Tribute Vol. 1 ... Press up/down to change songs ... Press left/right to change text speed/direction Code: CodeD, Jeppe Neilson (SinScroll), Semar (bullet code), JFK (distort) Gfx: FrogDot (thx for the babe!), CodeD ... Mods for Charity ... your donations help children!!! ... Visit <a href="http://sites.gwala.net/tormented/amiga" target="_blank">http://sites.gwala.net/tormented/amiga[/url] for more info and to order the CD ... greetings to: Ckob, Lenn, Noel Cower, JFK, DJ SeeNSay, LizardKing, FutureCrew, Paradox, Mark Sibly & The Blitz Basic Crew, The Anonymous Modder ... Gotta have mod??  Amiga Tribute Vol. 2 coming soon!!  Cybernoid 3D coming soon!! Quality apps like this and more from CrapSoft and Evolved Dev Studios ............................ ", 100-x-1, 135, timex/10.0)DrawImage gfxgirl, grlx, grlyDrawImage gfxgirl, grlx, grly2Flip  If timex < 0 Then timex = 0timex = timex + speedtimex;If KeyDown(200) Then currentsong = currentsong + 1: song$ = "Tower of Flames" And artist$ = "Frederic Hahn": FreeSound chnbackground: chnBackground=PlayMusic("z-tower.xm");If KeyDown(208) Then currentsong = currentsong - 1: song$ = "Tower of Flames" And artist$ = "Frederic Hahn": FreeSound chnBackground: chnBackground=PlayMusic("z-tower.xm")If KeyDown(203) Then speedtimex = speedtimex - 1If KeyDown(205) Then speedtimex = speedtimex + 1Wend ;===================================Function updategame();===================================For bullet.t_bullet = Each t_bulletbulletx = bulletx + bulletspeedxbullety = bullety + bulletspeedyNextEnd Function;===================================Function rendergame();===================================For bullet.t_bullet = Each t_bulletDrawImage gfxflare,bulletx,bulletyNextEnd FunctionFunction SinScroll(txt$,x,y,am,amp=50,per=20,d=10)For n=1 To Len(txt$)Text x+xx,y+Sin(am+n*per)*amp,Mid$(txt$,n,1)xx=xx+dNextEnd FunctionFunction WobbleView() gw#=GraphicsWidth() gh#=GraphicsHeight() underw_a=(underw_a+4) steph#=gh/64 mu8#=gh/60 If underw_a>359 Then underw_a=0  For iif#=0 To gh-4  Step .001   wsin#=(Sin((underw_a+iif)Mod 360.0)*mu8#)CopyRect 0,  iif,         gw,steph+4, 0,iif+wsin#   iif=iif+steph  NextEnd Function


CodeD(Posted 1+ years ago)

 Oh, WOW!!! Cool Gogs!! Thanks!  People sifting through old code and making it new!  Amazing! ;)Seriously, though.That's a good job.  I'm sure your code is a lot cleaner than mine.As I posted it as PD have fun with it.  Just bear in mind, I did borrow code from some other guys with permission.JFK thought it was cool I used his sin screen distortion ;) [/i]

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal