GridWars (1.4)

Miscellaneous Forums/Blitz Showcase/GridWars (1.4)

Wish we could edit the title....mods?

GW2 - GridWars 2 (A 360 Geometry Wars Spinoff)

Version 4.1 is available.

www.incitti.com/Blitz

Win32 exe & BLitzMax source files included

More feedback still welcome.

Thanks & enjoy,
Mark

Hi Mark.

This is absolutely excellent - I'm finding that it's stealing time from me during the work day... bad for me, but a sign that it's an excellent version of a great game.

Just one suggestion if I may... playing with a mouse can be a bit tough, as the sensitivity is too low. Any chance of a mouse sensitivity option?

Thanks for your great work.

Thanks!
I will add that in! (look for 1.6 later today)

Yeah, i like it :) It's pretty tough

Once I switched from the mouse to the keyboard I started to like this game. Nice work! :D

1.6 is available
many changes

http://www.yakyak.org/viewtopic.php?t=47632

1.7 is available

www.yakyak.org/viewtopic.php?t=47632

- mouse sensitivity, inertia, etc.

Fantastic update!

Now I'll never get any work done.

:o)

More time killing ahead...

Version 1.8 (The OpenGL build)

http://www.yakyak.org/viewtopic.php?t=47632

This game alone is making me want to buy a Dual Analog controller.

Hi,

great update! One thing: How about scrolling the grid a bit? It looks a bit boring and static when nothing is happening above. Also changing the colour of it would be more mesmerizing...well, or just add some lsd... ;O)

By the way is the the 1.7 source file the right one for 1.8?


Greetings,

taumel

see first post

Aw, I really wanted to play this. The retro feel is good. But the I only have one joystick so it just fires into the top left corner! Am I being dumb, is there a way do play it without two controllers?

2.1 suffers from a great deal of slowdown on my computer. So much so that I was able to easily rack up 2 million points and quit the game with 10 extra men. My highscores were about 500,000 with 1.8.

1.6GHz, .5GB RAM, GForce4 MX 440

P.S. Please make the mouse cursor more visible for hybrid mode! Consider having it flicker between white and black - when the action gets intense, white-on-white is particularly impossible to see!

-) Hmm, i liked the grid graphics in 1.8 much more. If you wanna stay with the lines i suggest making them wider as they are just too small. But i prefer the solid grid more...

-) The area is too large. I enjoyed the fixed area more.

-) All the menu entries are aligned to?

+) Nice sound effects!


Greetings,

taumel

Top stuff.

Once I editted the config.txt file to change the key controls to WASD (using ascii key codes, if you wanna change it yourself), it was suweeeeeet.

taumel I am not sure if you are aware but you can change grid type by pressing F3 to cycle between several modes while playing :)

LineOf7s: select "keyboard" as your control type and you can change the keys in-game, then set the control type back to "hybrid".

Mark1nc: consider setting the default key config to WASD?

@joncom2000

No thanks i haven't noticed it. I just downloaded and instantly played it. But as you've mentioned it i also looked at the config file...


Greetings,

taumel

octo: Coulda sworn there was a big "see keyboard config *cannot be congiured" bit in-game when I looked, but I could very well have been in hybrid mode at the time. I'll check it out as soon as I get home from work.

Thanks anyway. :o)

great game! i got a scor of 1.8 million, though i hope to break it tommorrow ;)

another idea for an enemy would be one that gets bigger whenever it hits another enemy of its kind (one of them would be deleted)

see first post

Mark-

This is absolute quality. Great gfx and sound, and you've really improved the gameplay since the first release. I imagine it's hard to tune this sort of game to give the feeling of 'surviving against overwhelming odds', but you managed to achieve that without making the game too frustrating.

Hi Marc1nc,

o Good that the solid grid is default again.
o Submenus are still not aligned.
o Meanwhile i enjoy the bigger playground.
o Sometimes parts of the grid are not displayed when there are black holes at the edge of the screen.

I added (gridparttail.bmx) some colours to the grid...if you uncomment colA the grid also colourcycles a bit...

Strict 

Import BRL.Random
Import "colordefs.bmx"
Import "Utils.bmx"

Local t:Int,a:Int,b:Int

Global colA:Float=0.0,colAkt:Float=0.0,colB:Float=0.0

Global g_red:Int = COL_GRID_R
Global g_green:Int = COL_GRID_G
Global g_blue:Int = COL_GRID_B
Global g_opacity# = 0.85
Global showstars:Int = 1

Global slotcount:Int '0 to 2047
Global partarray:part[]
partarray = New part[2048]

Global starx:Int[1000]
Global stary:Int[1000]
Global stard#[1000]

Global part_LIST:TList = New TList
Global trail_LIST:TList = New TList

Global gwlow:Int
Global gwhi:Int
Global ghlow:Int
Global ghhi:Int
Global gxoff:Int
Global gyoff:Int

Global PLAYFIELDW:Int = 1280  '2^8*5
Global PLAYFIELDH:Int = 1024  '2^8*2*2
Global GRIDWIDTH:Int = 16   '4,5,8,10,16,20,32,40,64
Global GRIDHEIGHT:Int = 16  '4,8,16,32,64,128,256

Const GRIDHILIGHT:Int = 4

Global NUMGPOINTSW:Int = PLAYFIELDW/GRIDWIDTH
Global NUMGPOINTSH:Int = PLAYFIELDH/GRIDHEIGHT

Global grid:gridpoint[,]
grid = New gridpoint[NUMGPOINTSW+1,NUMGPOINTSH+1]

For a = 0 To NUMGPOINTSW
	For b = 0 To NUMGPOINTSH
		grid[a,b] = New gridpoint
		grid[a,b].ox = a*GRIDWIDTH
		grid[a,b].oy = b*GRIDHEIGHT
		grid[a,b].x = a*GRIDWIDTH
		grid[a,b].y = b*GRIDHEIGHT
	Next
Next




'the background dots
Type gridpoint

	Field ox#,oy#
	Field x#
	Field y#	
	Field dx#,dy#
'	Field fx#,fy#
	
	Method Update(xx#,yy#)
	
		If Abs(xx-x) > 2 Then dx:+ Sgn(xx-x) 
		If Abs(yy-y) > 2 Then dy:+ Sgn(yy-y) 
					
		If Abs(ox-x) > 1
			x = x + Sgn(ox-x)
			dx:+ Sgn(ox-x)/2 	
		Else
			x = ox
		EndIf
		If Abs(oy-y) > 1
			y = y + Sgn(oy-y)
			dy:+ Sgn(oy-y)/2 
		Else
			y = oy
		EndIf

		dx = dx *.89
		dy = dy *.89

		x = x + dx
		y = y + dy
			
	End Method
	
	
	Function ResetAll()
		Local a:Int,b:Int
		
		For a = 0 To NUMGPOINTSW
			For b = 0 To NUMGPOINTSH
				grid[a,b].ox = a*GRIDWIDTH
				grid[a,b].oy = b*GRIDHEIGHT
				grid[a,b].x = a*GRIDWIDTH
				grid[a,b].y = b*GRIDHEIGHT
			Next
		Next
	End Function	

	Method disrupt(xx#,yy#)
			If Abs(xx) > 8 Then xx = xx/16
			If Abs(yy) > 8 Then yy = yy/16
			dx = dx + xx
			dy = dy + yy
			Local speed# = dx*dx+dy*dy
			If speed > 160 ' 128
				dx = dx/speed*128
				dy = dy/speed*128
			EndIf
'		EndIf
	End Method
	
	Function Pull(x1#,y1#, sz:Int = 4,amnt#=4)

		Local a:Int = x1/GRIDWIDTH
		Local b:Int = y1/GRIDHEIGHT
		For Local xx:Int = -sz To sz
			For Local yy:Int = -sz To sz
				If a+xx > 0
					If a+xx < NUMGPOINTSW-2
						If b+yy > 0
							If b+yy < NUMGPOINTSH-2
								If xx*xx + yy*yy < sz*sz							
									Local diffx# = grid[a+xx,b+yy].x-x1
									Local diffy# = grid[a+xx,b+yy].y-y1
									Local dist# = Sqr(diffx*diffx+diffy*diffy)
									If dist > 0
'									grid[a+xx,b+yy].fx:- diffx*(1-(dist)/(sz*sz*4*256))
'									grid[a+xx,b+yy].fy:- diffy*(1-(dist)/(sz*sz*4*256))
									grid[a+xx,b+yy].dx:- diffx/dist*amnt  '*(1-(dist*dist)/(sz*sz*4*256))
									grid[a+xx,b+yy].dy:- diffy/dist*amnt  '*(1-(dist*dist)/(sz*sz*4*256))
'									grid[a+xx,b+yy].fx = - diffx/dist*(1-(dist*dist)/(sz*sz*4*256))
'									grid[a+xx,b+yy].fy = - diffy/dist*(1-(dist*dist)/(sz*sz*4*256))
									EndIf
								EndIf
							EndIf
						EndIf
					EndIf
				EndIf
			Next
		Next	
	
	End Function


	Function Push(x1#,y1#, sz:Int = 4,amnt#=1)
	
		Local a:Int = (x1/GRIDWIDTH)
		Local b:Int = (y1/GRIDHEIGHT)
		For Local xx:Int = -sz To sz
			For Local yy:Int = -sz To sz
			'	If (xx*xx + yy*yy) < sz*sz
				If a+xx > 0
					If a+xx < NUMGPOINTSW-2
						If b+yy > 0
							If b+yy < NUMGPOINTSH-2
								Local diffx# = grid[a+xx,b+yy].ox-x1
								Local diffy# = grid[a+xx,b+yy].oy-y1
								Local diffxo# = grid[a+xx,b+yy].ox-grid[a+xx,b+yy].x
								Local diffyo# = grid[a+xx,b+yy].oy-grid[a+xx,b+yy].y								
								Local dist# = diffy*diffy+diffx*diffx
								Local disto# = diffyo*diffyo+diffxo*diffxo
								If dist > 1 And disto < 400
									If dist < 50*50
										grid[a+xx,b+yy].dx:+ diffx*amnt '/dist*amnt
										grid[a+xx,b+yy].dy:+ diffy*amnt '/dist*amnt
									EndIf										
								EndIf
							EndIf
						EndIf
					EndIf
				'EndIf
				EndIf
			Next
		Next	
	
	End Function

		
	Function UpdateGrid()
	
		For Local a:Int = 1 To NUMGPOINTSW-2
			For Local b:Int = 1 To NUMGPOINTSH-2
				Local xx# = 0
				xx:+ grid[a-1,b].x
				xx:+ grid[a,b-1].x
				xx:+ grid[a,b+1].x
				xx:+ grid[a+1,b].x
				xx = xx / 4
	
				Local yy# = 0
				yy:+ grid[a-1,b].y
				yy:+ grid[a,b-1].y
				yy:+ grid[a,b+1].y
				yy:+ grid[a+1,b].y
				yy = yy / 4
				
				grid[a,b].update(xx,yy)
				
			Next
		Next
	End Function
	
	Function Shockwave(x:Int,y:Int)
		Local a:Int = x/GRIDWIDTH
		Local b:Int = y/GRIDHEIGHT
		For Local xx:Int = -3 To 3
			For Local yy:Int = -3 To 3
				If xx*xx + yy*yy < 10
				If a+xx > 0
					If a+xx < NUMGPOINTSW-1
						If b+yy > 0
							If b+yy < NUMGPOINTSH-1
								grid[a+xx,b+yy].disrupt(4*(grid[a+xx,b+yy].x-x),4*(grid[a+xx,b+yy].y-y))								
							EndIf
						EndIf
					EndIf
				EndIf
				EndIf
			Next
		Next	
	End Function
	
	Function DrawGrid(style:Int)
	
		gwlow = Max(gxoff/GRIDWIDTH,0)
		gwhi = Min(gwlow+(1024/GRIDWIDTH)+GRIDHILIGHT,NUMGPOINTSW)
		ghlow = Max(gyoff/GRIDHEIGHT,0)
		ghhi = Min(ghlow+(768/GRIDHEIGHT)+GRIDHILIGHT,NUMGPOINTSH)
			
		Select style
			Case 0
				' draw grid points, 1 colour
				SetAlpha Abs(g_opacity)
				SetColor g_red,g_green,g_blue			
				SetBlend LIGHTBLEND
				DrawGridPoints()
			Case 1
				' draw grid points, rainbow colours
				SetAlpha Abs(g_opacity)
				SetColor rcol,gcol,bcol  'cycled colours
				SetBlend LIGHTBLEND
				DrawGridPoints()
			Case 2
				' draw grid Lines, 1 colour
				SetAlpha Abs(g_opacity)
				SetColor g_red,g_green,g_blue			
				SetBlend LIGHTBLEND
				DrawGridLines()
			Case 3
				' draw grid Lines, rainbow colours
				SetAlpha Abs(g_opacity)
				SetColor rcol,gcol,bcol  'cycled colours
				SetBlend LIGHTBLEND
				DrawGridLines()
			Case 4
				' draw grid line quads, 1 colour
				SetAlpha Abs(g_opacity)
				SetColor g_red,g_green,g_blue			
				GlEnable GL_LINE_SMOOTH
'				GlEnable GL_BLEND
'				glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA
'				glHint GL_LINE_SMOOTH_HINT, GL_NICEST
				SetBlend LIGHTBLEND
				DrawGridLines3()
			Case 5
				' draw grid line quads, rainbow colours
				SetAlpha Abs(g_opacity)
				SetColor rcol,gcol,bcol  'cycled colours
				GlEnable GL_LINE_SMOOTH
				'GlEnable GL_BLEND
				SetBlend LIGHTBLEND				
				DrawGridLines3()
			Case 6
				' draw grid solid quads, 1 colour
				SetAlpha Abs(g_opacity)
				SetColor g_red,g_green,g_blue			
				SetBlend LIGHTBLEND
				DrawGridLines2()
			Case 7
				' draw grid solid quads, rainbow colours
				SetAlpha Abs(g_opacity)
				SetColor rcol,gcol,bcol  'cycled colours
				SetBlend LIGHTBLEND				
				DrawGridLines2()
'			Case 8
		End Select			
	
	End Function	
	
	Function DrawGridPoints()
		Local a:Int,b:Int
		Local boldw:Int
		Local boldh:Int

		boldw = GRIDHILIGHT-(gwlow Mod GRIDHILIGHT)
		boldh = GRIDHILIGHT-(ghlow Mod GRIDHILIGHT)
		
		SetScale 1,1
		SetAlpha 1
		SetLineWidth 2		

		For a = gwlow To gwhi-1
			For b = ghlow To ghhi-1 			
				DrawRect grid[a,b].x-gxoff, grid[a,b].y-gyoff,2,2
			Next
		Next
		For a = gwlow+boldw To gwhi-1 Step GRIDHILIGHT
			For b = ghlow To ghhi-1 			
				DrawRect grid[a,b].x-gxoff, grid[a,b].y-gyoff,3,3
			Next
		Next	
		For a = gwlow To gwhi-1
			For b = ghlow+boldh To ghhi-1 Step GRIDHILIGHT
				DrawRect grid[a,b].x-gxoff, grid[a,b].y-gyoff,3,3
			Next
		Next	
	
	End Function	
	
	
	Function DrawGridLines()
		Local a:Int,b:Int
		Local boldw:Int
		Local boldh:Int

		boldw = GRIDHILIGHT-(gwlow Mod GRIDHILIGHT)
		boldh = GRIDHILIGHT-(ghlow Mod GRIDHILIGHT)
		
		SetScale 1,1
		SetLineWidth 2
		SetAlpha .9		
		For a = gwlow+boldw To gwhi-GRIDHILIGHT Step GRIDHILIGHT 
			'DrawLine grid[a,b].x-gxoff, grid[a,b].y-gyoff, grid[a,b+GRIDHILIGHT].x-gxoff, grid[a,b+GRIDHILIGHT].y-gyoff			
			glBegin GL_LINE_STRIP
			For b = ghlow+boldh-GRIDHILIGHT To ghhi-GRIDHILIGHT Step GRIDHILIGHT 			
				glVertex3f(grid[a,b].x-gxoff, grid[a,b].y-gyoff,     0)
				glVertex3f(grid[a,b+GRIDHILIGHT].x-gxoff,   grid[a,b+GRIDHILIGHT].y-gyoff,   0)
			Next
			glEnd				
		Next	
		For b = ghlow+boldh To ghhi-GRIDHILIGHT Step GRIDHILIGHT 			
			'	DrawLine grid[a,b].x-gxoff, grid[a,b].y-gyoff, grid[a+GRIDHILIGHT,b].x-gxoff, grid[a+GRIDHILIGHT,b].y-gyoff
			glBegin GL_LINE_STRIP
			For a = gwlow+boldw-GRIDHILIGHT To gwhi-GRIDHILIGHT Step GRIDHILIGHT
				glVertex3f(grid[a,b].x-gxoff,     grid[a,b].y-gyoff,     0)
				glVertex3f(grid[a+GRIDHILIGHT,b].x-gxoff,   grid[a+GRIDHILIGHT,b].y-gyoff,   0)
			Next
			glEnd				
		Next	
	End Function	
	
	
	Function DrawGridLines2()
		Local a:Int,b:Int
		' draw grid
		SetScale 1,1
		SetLineWidth 1
		Local boldw:Int
		Local boldh:Int

		boldw = 2-(gwlow Mod 2)
		boldh = 2-(ghlow Mod 2)
		
		Local i:Int=0,delX:Float=0.0,delY:Float=0.0
		'colAkt=(colAkt+.05) Mod 360.0
		
		For a = gwlow+boldw-2 To gwhi-1 Step 1
			For b = ghlow+boldh-2+(a Mod 2) To ghhi-1 Step 2			
				Local xy#[8]
				xy[0] = grid[a,b].x-gxoff
				xy[1] = grid[a,b].y-gyoff
				
				xy[2] = grid[a+1,b].x-gxoff
				xy[3] = grid[a+1,b].y-gyoff
				
				xy[4] = grid[a+1,b+1].x-gxoff
				xy[5] = grid[a+1,b+1].y-gyoff
				
				xy[6] = grid[a,b+1].x-gxoff
				xy[7] = grid[a,b+1].y-gyoff
				
				'colA=50+50*Sin((colAkt*360*a/gwhi*b/ghhi) Mod 360.0)

				delX=xy[4]-xy[0]-16;delY=xy[5]-xy[1]-16
				If delX<delY Then delX=delY
				If delX<0.0 Then delX=0.0
				If delX>90.0 Then delX=90.0
				colB=Sin(delX)
				SetColor(20+235*colB,20+100*colB,180-140*colB)
				SetAlpha((1-colB)*.7+0.3)
				'SetAlpha((1-colB)*.7+0.3-colA/360.0)
				
				DrawPoly(xy)	
			Next
		Next

	End Function	
	
	Function DrawGridLines3()
		Local a:Int,b:Int
		Local boldw:Int
		Local boldh:Int

		boldw = GRIDHILIGHT-(gwlow Mod GRIDHILIGHT)
		boldh = GRIDHILIGHT-(ghlow Mod GRIDHILIGHT)
		
		' draw grid
		SetScale 1,1
		SetLineWidth 1
		'glLoadIdentity		'Reset The ModelView Matrix
'		For a = gwlow To gwhi-1 Step 1
'			For b = ghlow+(a Mod 2) To ghhi-1 Step 2			
'				glBegin GL_LINE_LOOP			
'				glVertex3f(grid[a,b].x-gxoff,     grid[a,b].y-gyoff,     0)
'				glVertex3f(grid[a+1,b].x-gxoff,   grid[a+1,b].y-gyoff,   0)
'				glVertex3f(grid[a+1,b+1].x-gxoff, grid[a+1,b+1].y-gyoff, 0)
'				glVertex3f(grid[a,b+1].x-gxoff,   grid[a,b+1].y-gyoff,   0)
'				glEnd				
'			Next
'		Next
		For a = gwlow To gwhi-1
			glBegin GL_LINE_STRIP
			For b = ghlow To ghhi-1
				glVertex3f(grid[a,b].x-gxoff,     grid[a,b].y-gyoff,     0)
				glVertex3f(grid[a,b+1].x-gxoff,   grid[a,b+1].y-gyoff,   0)
			Next
			glEnd
		Next	
		For b = ghlow To ghhi-1
			glBegin GL_LINE_STRIP
			For a = gwlow To gwhi-1
				glVertex3f(grid[a,b].x-gxoff,     grid[a,b].y-gyoff,     0)
				glVertex3f(grid[a+1,b].x-gxoff,   grid[a+1,b].y-gyoff,   0)
			Next
			glEnd
		Next	
		For a = gwlow+boldw To gwhi-1 Step GRIDHILIGHT
			glBegin GL_LINE_STRIP
			For b = ghlow To ghhi-1-1
				glVertex3f(grid[a,b].x-gxoff,     grid[a,b].y-gyoff,     0)
				glVertex3f(grid[a,b+1].x-gxoff,   grid[a,b+1].y-gyoff,   0)
			Next
			glEnd
		Next	
		For b = ghlow+boldh To ghhi-1 Step GRIDHILIGHT 			
			glBegin GL_LINE_STRIP
			For a = gwlow To gwhi-1
				glVertex3f(grid[a,b].x-gxoff,     grid[a,b].y-gyoff,     0)
				glVertex3f(grid[a+1,b].x-gxoff,   grid[a+1,b].y-gyoff,   0)
			Next
			glEnd
		Next	

	End Function	
	
EndType







'particles
Type part

	Field x#,y#,dx#,dy#,r:Int,g:Int,b:Int
	Field active:Int
	
	Function CreateAll()
		Local t:Int
		For t = 0 To 2047
			partarray[t] = New part
			partarray[t].x = 0
			partarray[t].y = 0
			partarray[t].r = 0
			partarray[t].g = 0
			partarray[t].b = 0
			partarray[t].active = 0
			partarray[t].dx = 0
			partarray[t].dy = 0
			Part_list.addlast( partarray[t] )				
		Next
		slotcount = 0
	End Function	

	
	Function Create( x#, y# ,typ:Int, r:Int,g:Int,b:Int, rot:Int = 0, sz:Int = 1)
			Local p:Part
			Local flag:Int
			Local dir:Int, mag#
		
			p:Part = partarray[slotcount]
			p.x = x
			p.y = y
			p.r = r
			p.g = g
			p.b = b
			p.active = Rand(20,40)
			Select typ
				Case 0
					' random
					dir = Rand(0,359)
					mag# = Rnd(3,10)
					p.dx = Cos(dir)*mag
					p.dy = Sin(dir)*mag
				Case 1
					' any dir speed 12
					mag# = 16
					p.dx = Cos(rot)*mag
					p.dy = Sin(rot)*mag					
				Case 2
					' any dir speed 8
					dir = rot
					mag# = 8
					p.dx = Cos(dir)*mag
					p.dy = Sin(dir)*mag
				Case 8
					' 3 dirs
					dir = 120*Rand(0,2)+rot
					mag# = Rnd(3,10)			
					p.dx = Cos(dir)*mag
					p.dy = Sin(dir)*mag
				Case 3
					' 4 dirs
					dir = 90*Rand(0,3)+rot
					mag# = Rnd(3,10)
					p.dx = Cos(dir)*mag
					p.dy = Sin(dir)*mag
				Case 6
					' 8 dirs
					dir = 45*Rand(0,7)+rot
					mag# = Rnd(3,10)
					p.dx = Cos(dir)*mag
					p.dy = Sin(dir)*mag
				Case 7
					' any dir and speed
					mag# = Rnd(3,10)			
					p.dx = Cos(rot)*mag
					p.dy = Sin(rot)*mag
			End Select
			p.dx = p.dx*2
			p.dy = p.dy*2			
			p.x:+ p.dx*sz
			p.y:+ p.dy*sz		
			slotcount:+1
			If slotcount > 2047 Then slotcount = 0
	EndFunction
	
	
	Method Update()
		If active > 0
			x = x + dx
			y = y + dy
			If x < dx Or x > PLAYFIELDW-1-dx
				dx = -dx
				x = x + dx*2
			EndIf
			If y < dy Or y > PLAYFIELDH-1-dy
				dy = -dy
				y = y + dy*2			
			EndIf
			dx = dx *.95
			dy = dy *.95		
			active:-1
			If active < 20		
				If active < 10
					r:*.8';If r < 0 Then r = 0
					g:*.8';If g < 0 Then g = 0
					b:*.8';If b < 0 Then b = 0
				Else
					r:*.97';If r < 0 Then r = 0
					g:*.97';If g < 0 Then g = 0
					b:*.97';If b < 0 Then b = 0				
				EndIf				
			EndIf
		EndIf
	End Method

		
	Function DrawParticles()
		Local p:part
		Local t:Int
		
		SetBlend lightblend		
		SetScale 3,3
		SetAlpha .9
		SetLineWidth 2
		
		SetViewport -gxoff,-gyoff,PLAYFIELDW-1,PLAYFIELDH-1
		For t = 0 To 2047
			p:part = partarray[t]
			If p.active > 0
				Local rr%,gg%,bb%
				rr = p.r*1.25;If rr>255 Then rr = 255
				gg = p.g*1.25;If gg>255 Then gg = 255
				bb = p.b*1.25;If bb>255 Then bb = 255
				SetColor rr,gg,bb
				'SetColor p.r,p.g,p.b
				DrawLine p.x-gxoff,p.y-gyoff,p.x-gxoff+p.dx,p.y-gyoff+p.dy
			EndIf
		Next	
		SetAlpha 1
		SetLineWidth 2.0
		SetScale 1,1
		SetViewport 0,0,1024,768
					
	End Function
	
	
	Function UpdateParticles()	
		Local p:part,t:Int
		For t = 0 To 2047
			p:part = partarray[t]
			If p.active > 0
				p.Update()
			EndIf
		Next	
	End Function
	
		
	Function CreateFireWorks(style:Int)
		Local t:Int,x:Int,y:Int,r:Int,g:Int,b:Int
		r = Rand(0,3)*64
		g = Rand(0,3)*64
		b = Rand(0,3)*64	
		If style = 1
			If Rand(0,1) 
				x = Rand(100,1024-100)
				y = 16
				If Rand(0,1) Then y = 768-16
			Else
				y = Rand(50,768-50)
				x = 16
				If Rand(0,1) Then x = 1024-16				
			EndIf
		ElseIf style = 2
			x = 1024/2
			y = 768/2
		Else
			x = Rand(100,1024-100)
			y = Rand(50,768-50)		
		EndIf
		For t = 0 To 63
			part.Create(x,y,0,r,g,b)
		Next			
	End Function	
	
	Function ResetAll()
		Local p:Part
		Local t:Int
		
		For t = 0 To 2047
			p:Part = partarray[t]
			p.x = 0
			p.y = 0
			p.r = 0
			p.g = 0
			p.b = 0
			p.active = 0
			p.dx = 0
			p.dy = 0
		Next
		slotcount = 0
	End Function

End Type






'trail
Type trail

	Field x#,y#,r:Int,g:Int,b:Int
	Field active:Int
	
	Function Create( x#, y# ,r:Int,g:Int,b:Int)
		Local p:trail
			p:trail = New trail
			p.x = x
			p.y = y
			p.r = r
			p.g = g
			p.b = b
			p.active = 40
			trail_list.addfirst( p )	
	EndFunction
	
	Method Update()
		active:-1
		
		If active < 25		
			r:*.91
			g:*.88
			b:*.86
		EndIf
		If active <= 0 Then trail_LIST.Remove(Self)
				
	End Method

		
	Function DrawTrail()
	
		Local p:trail
		
		SetBlend lightblend		
		SetScale 2,2
		SetAlpha .8
		SetLineWidth 2.0
		For p:trail = EachIn trail_list
			SetColor p.r,p.g,p.b
			DrawRect p.x-gxoff,p.y-gyoff,1,1
		Next	
		SetAlpha 1
		SetScale 1,1
			
	End Function
	
	Function UpdateTrail()	
		Local p:trail
		For p:trail= EachIn trail_list
			p.Update()
		Next
	End Function
	
End Type


Function CreateStars()
	Local t:Int
	For t = 0 To 299
		starx[t] = Rand(-100,PLAYFIELDW+100)
		stary[t] = Rand(-100,PLAYFIELDH+100)
		stard[t] = 2+(t Mod 6)/4
	Next
EndFunction
			
Function DrawStars()

	If showstars
		SetBlend lightblend		
		SetScale 2,2
		SetAlpha .8
		SetLineWidth 2.0
		SetColor 200,200,200
		Local t:Int
		For t = 0 To 299
			DrawRect starx[t]-gxoff/stard[t],stary[t]-gyoff/stard[t],1,1
		Next	
		SetAlpha 1
		SetScale 1,1
	EndIf
				
End Function

Greetings,

taumel

For images.bmx better use AutoImageFlags(FILTEREDIMAGE|MIPMAPPEDIMAGE) otherwise the graphics are not filtered when rotated...

Greetings,

taumel

Thanks taumel
I'll try to incorporate your suggestions.


2.5 is available!

*deleted*

Hey, i improved: 1.6m :O)

New version 2.6

- Feb 12 2.6
- fixes to size stuff
- easy/med/hard fixes (xtra lives, bombs, shot#)
- (menu work still todo)
- added tamuel's groovy grid stuff
- #, letter key entry for high scores
- particle gravity (F5 on/off)
- particle count (100-10000)
- particle life (20-200)
- game reset confirm

Now that is a GREAT game! One of the best I've seen...

Keep up the good work and MANY MANY thanks for supplying the source too.

I hope you every success with this - it really is the business - love the grid and the gameplay is great - very addictive!

WELL DONE!!!

wow... impressive...


--Mike

Not quite enough interesting swear words to describe just how very cool this is. Congrats to Mr Incitti and all who've contibuted.

3.0 is up

Mark,

Terrific stuff!

Found a bug - start the game and whilst playing hit the Tab Key - the program exits without warning.

Matt -
That's not a bug - it's an office "Shut it down quick!" feature.
I should probably make it pop up a spreadsheet or something.

it's an office "Shut it down quick!" feature.

OMG! It's been a while since I've seen that feature in a game! Nice one! Brings back memories...

Mark.

For some reason, the earlier versions of GridWars didn't grab me. However, I decided to give v3.1 a try and all I can say is... Superb! What a transformation. Playability is now spot on (and it's fast and smooth) and visually it's near perfect.

Boy am I glad I decided to give it another whirl... I'm looking forward to delving into the code to see how you managed it.

AWESOME STUFF

Hi



three gfx-sets now:

o HIGH nice bloom effect http://www.marune.de/taumel/test/_max/gridwars/src/gfxHIGH.rar
o MED small bloom effect http://www.marune.de/taumel/test/_max/gridwars/src/gfxMED.rar
o LOW mostly no bloom effect http://www.marune.de/taumel/test/_max/gridwars/src/gfxLOW.rar


Beware that you'll have to adjust the sizes of the animations in "images.bmx" correctly and change the name of "snaketail.png" to "snaketailOLD.png".


Greetings,

taumel

Just tried V2.8 and may I add my applause for an outstanding effort.

Reminiscent of Robotron 2084 (Arcade) and a touch of Crossfire (Apple ][) with the dual control requirement. Mind altering.

Now I'll have to look at what goodies await in V3.1.

Thanks

Please try 3.2 and let me know if the Screensaver problem is gone (kicking in while playing with only joystick input)

Thanks,
Mark

I guess the screensaver issue is solved.

Try latest version 3.3 FHMC

My monitor powersave is still kicking in, meaning a frantic swipe for the keyboard and almost certain death lol

Mind you its almost worth turning off the powersave from within XP just to play this uninterrupted.

Hmm - 2 separate things Screensaver & powersaver.
I will try the previous code skid suggested again and give it a thorough thrashing. It crashed for someone - I assumed it was that bit of code - could have been something else.

3.4 is available - adds mouse support in the menus and another Hybrid mode: move with mouse, fire with keys.

Hi,

o) New, reworked and optimised grids
o) Updated the graphics sets

links:

o gridparttrail.bmx(v3.4) http://www.marune.de/taumel/test/_max/gridwars/src/gridparttrail.bmx
o for the gfx see the links above...

hints:

o Beware to adjust the style counter in grid.bmx.


Greetings,

taumel

:( wouldnt compile for me and I couldnt run the included exe either.

Hi ckob,

i dunno which version you are talking about so i keep it general:

As for the script:

The script i've posted works fine for 3.4. If you're using 3.5 you'll best have to cut&paste the relevant stuff in there, same for older versions.

a) Copy the line Global moiAkt:Float=0.0
b) Copy and replace all from " Function DrawGrid(style:Int) " to " 'particles " (excluding this comment).

As for the gfx:

I've provided the full gfx-sets.

a) For versions below 3.2 you'll have to use "snaketailOLD.png" and rename it to "snaketail.png" as till 3.2 i haven't seperated these.
b) Then you'll have to copy the set(s) you wish into the corresponding folder(s).
c) And again if you're using a version below 3.2 you'll have to edit the sizes for the animations in "images.bmx" (icons, powerups, snaketail).
d) And last step would be to set the right style maximum in the file "grid.bmx" where it's written: "If g_style > 12 Then g_style = 0" to "If g_style > 7 Then g_style = 0"


Hope that helps,

taumel

Fresh install of 3.5 fails to load.

Brief DOS window opens and displayes "unhandles memory <something>".

computer spec is linked to in my sig.

If this problem shows up with the script i've posted then you should read the message i've posted before. If it shows up when only using 3.5 better ask Mark...but i suspect that you've only got problems with the textures so for a start just alter the script without the graphics...


Greetings,

taumel

sorry, im using the latest version on your site and I get a dos window that sats Unhandled Memory exception error

Hmmm...ahh! The unused particle is missing...

Okay here we go now. Same links as before or just download the whole thing...hope that's okay Mark?

http://www.marune.de/taumel/test/_max/gridwars/src/GridWars35.zip


Greetings,

taumel

now the grid.exe just doesnt do anyting I double click it and it doesnt do a thing.

The new version crashed twice on me with Graphics Quality = Low. It also still suffers slowdown, making the game too easy.

I still play 1.8 regularly.

Hey guys, i just wanted to share some effects, not to maintain it! :O)

ckob&octothorpe
There seemed to be some changes in "images.bmx" for sizes of the animations. Fixed now please redownload again...


Greetings,

taumel

Version 3.7 should get rid of the UMAV on startup.
I think there is a problem with GraphicsMode() on some PCs.

thanks, that fixed it.

Noticing slowdown now though. A side effect of improved graphics, I'm sure :)

Is it just me, or has some delta-timing made an appearance yet? I haven't checked the source on this latest version (previous versions having provided me a good tutorial, many thanks!).

wow this is by far the best game ive ever played in blitzmax, 10 out of 10 good job

vinylpusher (Posted 4 hours ago)
Noticing slowdown now though. A side effect of improved graphics, I'm sure :)

> you might want to check the settings:
gfx set, resolution, playfield size, grid style will all impact the performance

This is absolutely fantastic !

3.8 is available - see first post

Mark not sure if you read this but wondering if you had seen any reports like these:

Posted February 18, 2006 @ 9:02PM by Kanin
If you're getting an "Unhandled Memory Exception", try running the game in Windows 95 compatability mode, worked for me. Haven't had a chance to actually try playing the game yet, but hope to in a few minutes. Smile
Posted February 18, 2006 @ 10:40PM by raytracer78
Win 95 compatability mode worked for me. This is pretty sweet!!


hi skid - heated in there isn't it.
I do it cause I love games and I like the challenge of creating them. I like the "Your awesome!" comments too.


I think that was a result of GfxModes() call.
I removed it, put in fixed number of modes and problem gone.

3.9

Added even more screen modes (29 and counting!)
Made the greenies a bit easier.
Cleanups here and there.
(See readme.txt for more info)

how do you play this? I shoot in one direction and bulets allways keep coming from the same place I fired them first in same direction I fired. How does it work? Any instructions anywhere?

its design to use two sticks one for steering one for shooting

4.1 is ready
see site for changes