SyntaxBomb - Indie Coders

General Category => General Discussion => Topic started by: Qube on July 01, 2017, 11:36:34 PM

Title: New theme
Post by: Qube on July 01, 2017, 11:36:34 PM
I've changed the theme to a more darker one and spent some time tweaking the colours to be hopefully nice and relaxing :P

Hopefully most of you like it and if not, well, tough  ;D - There's probably a few CSS elements that I've missed so if you spot any super small / big text or barely readable text due to colouring etc, let me know.

Syntax highlighting for Blitz is now improved too :

If you are having issues with how it looks, i.e. crap, then browse a few entries in the code archives which magically fixes the bizarre dynamic cache system of GeSHi.

BlitzMax firepaint sample :

Code: BlitzMax
  1. Rem
  2.  
  3. Firepaint demo:
  4.  
  5. Hold down mouse button to emit *FIRE*!
  6.  
  7. EndRem
  8.  
  9. Strict
  10.  
  11. 'For minimal build...
  12. Rem
  13. Framework BRL.D3D7Max2D
  14. Import BRL.Basic
  15. Import BRL.System
  16. Import BRL.PNGLoader
  17. Import BRL.FreeAudioAudio
  18. Import BRL.WAVLoader
  19. End Rem
  20.  
  21. Import "color.bmx"
  22.  
  23. Incbin "stars.png"
  24. Incbin "player.png"
  25. Incbin "bullet.png"
  26. Incbin "shoot.wav"
  27.  
  28. Const WIDTH=640,HEIGHT=480
  29. Const DEPTH=32,HERTZ=60
  30.  
  31. Const GRAVITY#=.15,SPARKS_PER_FRAME=55
  32.  
  33. Global sparks:TList=New TList
  34. Global bullets:TList=New TList
  35.  
  36. Type TEntity
  37.  
  38.         Field link:TLink
  39.  
  40.         Method remove()
  41.                 link.remove
  42.         End Method
  43.  
  44.         Method AddLast( list:TList )
  45.                 link=list.AddLast( Self )
  46.         End Method
  47.  
  48.         Method Update() Abstract
  49.  
  50. End Type
  51.  
  52. Type TSpark Extends TEntity
  53.  
  54.         Field x#,y#,xs#,ys#
  55.         Field color[3],rot#,rots#
  56.  
  57.         Method Update()
  58.  
  59.                 ys:+GRAVITY
  60.                 x:+xs
  61.                 y:+ys
  62.  
  63.                 If x<0 Or x>=WIDTH Or y>=HEIGHT
  64.                         remove
  65.                         Return
  66.                 EndIf
  67.  
  68.                 rot=rot+rots
  69.                 SetHandle 8,8
  70.                 SetRotation rot#
  71.                 SetAlpha 1-y/HEIGHT
  72.                 SetColor color[0],color[1],color[2]
  73.                 DrawRect x,y,17,17
  74.                 SetHandle 0,0
  75.  
  76.         End Method
  77.  
  78.         Function CreateSpark:TSpark( x#,y#,color[] )
  79.                 Local spark:TSpark=New TSpark
  80.                 Local an#=Rnd(360),sp#=Rnd(3,5)
  81.                 spark.x=x
  82.                 spark.y=y
  83.                 spark.xs=Cos(an)*sp
  84.                 spark.ys=Sin(an)*sp
  85.                 spark.rots=Rnd(-15,15)
  86.                 spark.color=color
  87.                 spark.AddLast sparks
  88.                 Return spark
  89.         End Function
  90.  
  91. End Type
  92.  
  93. Type TBullet Extends TEntity
  94.  
  95.         Field x#,y#,ys#
  96.         Field rot#,img:TImage
  97.  
  98.         Method Update()
  99.                 ys:-.01
  100.                 y:+ys
  101.                 If y<0
  102.                         remove
  103.                         Return
  104.                 EndIf
  105.                 rot:+3
  106.                 SetRotation rot
  107.                 DrawImage img,x,y
  108.         End Method
  109.  
  110.         Function CreateBullet:TBullet( x#,y#,img:TImage )
  111.                 Local bullet:TBullet=New TBullet
  112.                 bullet.x=x
  113.                 bullet.y=y
  114.                 bullet.ys=-1
  115.                 bullet.img=img
  116.                 bullet.AddLast bullets
  117.                 Return bullet
  118.         End Function
  119.  
  120. End Type
  121.  
  122. Function UpdateEntities( list:TList )
  123.         For Local entity:TEntity=EachIn list
  124.                 entity.Update
  125.         Next
  126. End Function
  127.  
  128. Graphics WIDTH,HEIGHT,DEPTH,HERTZ
  129.  
  130. AutoMidHandle True
  131.  
  132. Local fire:TSound=LoadSound( "incbin::shoot.wav" )
  133. Local dude:TImage=LoadImage( "incbin::player.png" ),dude_x=WIDTH/2,dude_y=HEIGHT-30
  134. Local bull:TImage=LoadImage( "incbin::bullet.png" ),bull_x,bull_y
  135. Local stars:TImage=LoadImage( "incbin::stars.png" ),stars_x,stars_y
  136.  
  137. Local show_debug,color_rot#
  138.  
  139. While Not KeyHit( KEY_ESCAPE )
  140.  
  141.         Cls
  142.        
  143.         stars_y:+1
  144.         SetBlend MASKBLEND
  145.         TileImage stars,stars_x,stars_y
  146.         TileImage stars,stars_x+7,stars_y*2
  147.         TileImage stars,stars_x+7,stars_y*3
  148.        
  149.         If KeyDown( KEY_LEFT )
  150.                 dude_x:-5
  151.         Else If  KeyDown( KEY_RIGHT )
  152.                 dude_x:+5
  153.         EndIf
  154.  
  155.         SetBlend MASKBLEND
  156.         DrawImage dude,dude_x,dude_y
  157.  
  158.         If KeyHit( KEY_SPACE )
  159.                 PlaySound fire
  160.                 TBullet.CreateBullet dude_x,dude_y-16,bull
  161.         EndIf
  162.  
  163.         If MouseDown(1)
  164.                 color_rot:+1.5
  165.                 color_rot:Mod 360
  166.                 Local color:TRGBColor=HSVColor( color_rot,1,1 ).RGBColor()
  167.                 Local rgb[]=[Int(color.Red()*255),Int(color.Green()*255),Int(color.Blue()*255)]
  168.                 For Local k=1 To SPARKS_PER_FRAME
  169.                         TSpark.CreateSpark MouseX(),MouseY(),rgb
  170.                 Next
  171.         EndIf
  172.  
  173.         SetBlend MASKBLEND
  174.         UpdateEntities bullets
  175.         SetRotation 0
  176.  
  177.         SetBlend LIGHTBLEND
  178.         UpdateEntities sparks
  179.         SetAlpha 1
  180.         SetRotation 0
  181.         SetColor 255,255,255
  182.        
  183.         If KeyHit( Asc("D") ) show_debug=1-show_debug
  184.        
  185.         If show_debug
  186.                 DrawText "MemAlloced="+GCMemAlloced(),0,0
  187.         EndIf
  188.  
  189.         Flip
  190.        
  191. Wend
  192.  


Blitz3D firepaint 3D sample :

Code: BlitzBasic
  1. ;EnableDirectInput False
  2.  
  3. Global info1$="Firepaint3D Demo"
  4. Global info2$="Features dynamically colored sprites"
  5.  
  6. Include "../start.bb"
  7.  
  8. AmbientLight 0,0,0
  9.  
  10. Const grav#=-.02,intensity=5
  11.  
  12. Type Frag
  13.         Field ys#,alpha#,entity
  14. End Type
  15.  
  16. pivot=CreatePivot()
  17.  
  18. camera=CreateCamera( pivot )
  19. CameraClsMode camera,False,True
  20.  
  21. ;create blitzlogo 'cursor'
  22. cursor=CreateSphere( 8,camera )
  23. EntityTexture cursor,LoadTexture( "blitzlogo.bmp",3 )
  24. MoveEntity cursor,0,0,25
  25. EntityBlend cursor,3
  26. EntityFX cursor,1
  27.  
  28. ;create sky sphere
  29. sky=CreateSphere()
  30. tex=LoadTexture( "stars.bmp" )
  31. ScaleTexture tex,.125,.25
  32. EntityTexture sky,tex
  33. ScaleEntity sky,500,500,500
  34. EntityFX sky,1
  35. FlipMesh sky
  36.  
  37. spark=LoadSprite( "bluspark.bmp" )
  38.  
  39. time=MilliSecs()
  40.  
  41. MoveMouse 0,0
  42.  
  43. While Not KeyDown(1)
  44.  
  45.         Repeat
  46.                 elapsed=MilliSecs()-time
  47.         Until elapsed>0
  48.        
  49.         time=time+elapsed
  50.         dt#=elapsed*60.0/1000.0
  51.        
  52.         Local x_speed#,y_speed#
  53.        
  54.         x_speed=(MouseXSpeed()-x_speed)/4+x_speed
  55.         y_speed=(MouseYSpeed()-y_speed)/4+y_speed
  56.         MoveMouse 320,240
  57.  
  58.         TurnEntity pivot,0,-x_speed,0   ;turn player left/right
  59.         TurnEntity camera,-y_speed,0,0  ;tilt camera
  60.         TurnEntity cursor,0,dt*5,0
  61.        
  62.         If MouseDown(1)
  63.                 For t=1 To intensity
  64.                         f.Frag=New Frag
  65.                         f\ys=0
  66.                         f\alpha=Rnd(2,3)
  67.                         f\entity=CopyEntity( spark,cursor )
  68.                         EntityColor f\entity,Rnd(255),Rnd(255),Rnd(255)
  69.                         EntityParent f\entity,0
  70.                         RotateEntity f\entity,Rnd(360),Rnd(360),Rnd(360)
  71.                         num=num+1
  72.                 Next
  73.         EndIf
  74.        
  75.         For f.Frag=Each Frag
  76.                 f\alpha=f\alpha-dt*.02
  77.                 If f\alpha>0
  78.                         al#=f\alpha
  79.                         If al>1 Then al=1
  80.                         EntityAlpha f\entity,al
  81.                         MoveEntity f\entity,0,0,dt*.4
  82.                         ys#=f\ys+grav*dt
  83.                         dy#=f\ys*dt
  84.                         f\ys=ys
  85.                         TranslateEntity f\entity,0,dy,0
  86.                 Else
  87.                         FreeEntity f\entity
  88.                         Delete f
  89.                         num=num-1
  90.                 EndIf
  91.         Next
  92.  
  93.         UpdateWorld
  94.         RenderWorld
  95. ;       GetColor 0,0
  96. ;       Color 255,0,255
  97. ;       Rect 0,ScanLine(),640,1
  98.         Flip
  99. Wend
  100.  
  101. End
  102.  
Title: New theme
Post by: Mikey on July 01, 2017, 11:51:29 PM
Looks Good
Title: Re: New theme
Post by: markcwm on July 01, 2017, 11:59:20 PM
Wow. Nice one Qube. It definitely looks better.

The only problem I think, the text font size is just a bit too small now, us half-blind people will struggle with it. The code font seems to be a size bigger but the syntax highlighted code seems to be smaller as well.
Title: Re: New theme
Post by: GW on July 02, 2017, 12:26:17 AM
I'm gonna vote for keeping the font size as-is. 
Title: Re: New theme
Post by: Qube on July 02, 2017, 12:32:45 AM
I've made the font a tiny tiny bit bigger. Looks like a good compromise between us blind bats and super vision people :)
Title: Re: New theme
Post by: markcwm on July 02, 2017, 01:35:29 AM
Yay, that's perfect. I'm not a blind bat, I don't wear glasses but I still like a fairly large type.
Title: Re: New theme
Post by: Qube on July 02, 2017, 01:53:57 AM
Quote
I'm not a blind bat, I don't wear glasses but I still like a fairly large type.
I am. I need distance and reading glasses. Well, except for super close up whereby my eyesight is still good ( like a few inches from my face ).
Title: Re: New theme
Post by: LineOf7s on July 02, 2017, 02:10:21 AM
This is nice.
Title: Re: New theme
Post by: Rooster on July 02, 2017, 02:46:51 AM
Looks good, although I do miss the galaxy background.
Title: Re: New theme
Post by: Steve Elliott on July 02, 2017, 09:07:19 AM
Looks good!  :D
Title: Re: New theme
Post by: MikeHart on July 02, 2017, 10:14:44 AM
theme looks good on my Samsung A5 too.
Title: Re: New theme
Post by: MikeHart on July 02, 2017, 10:16:33 AM
Ok, found something not working right. When I open the gallery on my entry, I can only see 2.5 comments out of 4 and the comments can't be scrolled.
Title: Re: New theme
Post by: MikeHart on July 02, 2017, 10:25:38 AM
Request: Is is possible to get notifactions on comments in your gallery entries?
Title: Re: New theme
Post by: RonTek on July 02, 2017, 10:51:54 AM
Nice theme and contrast!
Title: Re: New theme
Post by: Qube on July 02, 2017, 03:03:00 PM
Quote
Ok, found something not working right. When I open the gallery on my entry, I can only see 2.5 comments out of 4 and the comments can't be scrolled.
I see 4 comments. Can you post a pic of what you see?. Perhaps it's easy to miss a comment as there is no avatar to flesh it out.

(http://www.syntaxbomb.com/images/comments01.png)

Quote
Request: Is is possible to get notifactions on comments in your gallery entries?
I think that's a feature of the pro version of the gallery plugin which is $49. If it becomes an important feature request then I'll grab hold of the pro version.
Title: Re: New theme
Post by: MikeHart on July 02, 2017, 07:00:26 PM
Quote
I see 4 comments. Can you post a pic of what you see?. Perhaps it's easy to miss a comment as there is no avatar to flesh it out.




Dooo, now I see them too. You know what tricked me here? That there are just 2 avatars of mine. Counting the avatars it is only 3. That is how I made the assumption. Sorry, my bad.
Title: Re: New theme
Post by: Xaron on July 02, 2017, 07:28:45 PM
Love that new theme! Nice one!
Title: Re: New theme
Post by: Steve Elliott on July 02, 2017, 08:24:52 PM
Sorry for a lack of avatar Mike  ;)
Title: Re: New theme
Post by: MikeHart on July 02, 2017, 08:28:26 PM
Sorry for a lack of avatar Mike  ;)


Yaahh right. I demand that you will get one  :P
Title: Re: New theme
Post by: Steve Elliott on July 03, 2017, 10:02:28 AM
 ;D
Title: Re: New theme
Post by: MikeHart on July 03, 2017, 10:58:45 AM
Ok that is better now  :D
Title: Re: New theme
Post by: Rick Nasher on July 03, 2017, 06:05:27 PM
Simply wauw. Thanks Qube. 8)