Drawing lines of text... simpel stuff.. help

BlitzMax Forums/BlitzMax Beginners Area/Drawing lines of text... simpel stuff.. help

Apollonius(Posted 2006) [#1]
I got this piece of code I'm trying to draw 5 lines of 0 without them disapearing. Like repeating the code 5 times with different (y):

...
' -------------------------
' Variables
' -------------------------
Local bline_y = 20
Local bline_n = 5
...
MAIN LOOP
...
If(bline_n>0)Then
	DrawText "0",35,bline_y
	DrawText "0",65,bline_y
	DrawText "0",95,bline_y
	DrawText "0",125,bline_y
	DrawText "0",155,bline_y
	DrawText "0",185,bline_y
	DrawText "0",215,bline_y
	DrawText "0",245,bline_y
	DrawText "0",275,bline_y
	DrawText "0",305,bline_y
	DrawText "0",335,bline_y
	DrawText "0",365,bline_y
	DrawText "0",395,bline_y
	DrawText "0",425,bline_y
	DrawText "0",455,bline_y
	DrawText "0",485,bline_y
	DrawText "0",515,bline_y
	DrawText "0",545,bline_y
	DrawText "0",575,bline_y
	DrawText "0",605,bline_y
	DrawText "0",635,bline_y
	DrawText "0",665,bline_y
	DrawText "0",695,bline_y
	DrawText "0",725,bline_y
	DrawText "0",755,bline_y

	bline_y = bline_y + 30
	bline_n = bline_n - 1
EndIf
...

[ ... = removed code ]

I want it to stay drawn, instead of having 25x4 more lines of drawtext... doable?


WendellM(Posted 2006) [#2]
I think I understand what you're going for (but I'm not certain). You might try this stand-alone test and see if it does the sort of thing that you have in mind:
Graphics 800,600

For Local bline_n = 4 To 0 Step -1
	For Local bline_y = 10 + (bline_n * 50) To 50 + (bline_n * 50) Step 10
		For Local x = 35 + xOff To 755 Step 30
			SetColor 0, (bline_n+3) * 35, (bline_n+3) * 35
			DrawText "0", x, bline_y
		Next
	Next
Next	
Flip

WaitKey
I used colors to show the different grouping of lines. You might adjust the Y spacing to get it how you want.


Apollonius(Posted 2006) [#3]
like the first one, that's what I wanted, abit more complex then what I'm used to. I do thing crude and big(when i write stuff) lol.

This isn't in the main loop though, would it still work in the main loop?

MAIN LOOP

game content

if(screen=1)then

endif

if(screen=2)then
...

END LOOP

because I dont want those 00000, on all my "screens" like, menu, character creation screeen.. ingame screen.. ect, dunno if that makes sense


-----------------------------------------------------------
-----------------------------------------------------------
SIDE NOTE: Why did you delete the first one ??? lol, thats the one that answered my post :P


Apollonius(Posted 2006) [#4]
tested it seems to work in the loop aswell


WendellM(Posted 2006) [#5]
Why did you delete the first one ??? lol, thats the one that answered my post :P

I thought that it was right at first, but after re-reading your post, I thought that the second one was more what you were after. :)

This isn't in the main loop though, would it still work in the main loop?

From your post above, it looks like the five lines of zeros are maybe to be put in different positions on different screens? If so, something like the code below might help (it has the first version of what I posted as a function which can be offset when the function is called):

Graphics 800,600

Local screen = 2 ' this is changed (in main loop or wherever) to show different screens

' MAIN LOOP
Repeat

	If screen=1 Then
		' ... other stuff goes here
		DrawZeros(0)
		'... more stuff goes here
	EndIf
	
	If screen=2 Then
		DrawZeros(100)
	EndIf
	
	If screen=3 Then
		DrawZeros(50)
	EndIf

Until KeyHit(KEY_ESCAPE)


Function DrawZeros(offset)
	For Local bline_y = 20 + offset To 170 + offset Step 30
		For Local x = 35 To 755 Step 30
			DrawText "0", x, bline_y
		Next
	Next
	Flip
End Function



Apollonius(Posted 2006) [#6]
nice thanks, now the hardest part is randomly choosing a few and make them fade in and out real fast randomly lol :P


Apollonius(Posted 2006) [#7]
Using this code in the loop, causes some speed and lag issues, it might be somewhat faster to compile but with the lag problem... it's no good. 19 Lines of 25 "0" characters using draw commands and over 1000 lines of code compiles abit slower but doesn't lag at startup and doesn't have a delay at closing.

Maybe the crude way is better?


WendellM(Posted 2006) [#8]
I'm not sure what would be causing a delay at startup and shutdown - there shouldn't be that much overhead caused by using one function with two nested loops. Just in case it's some bounds-checking business, have you tried it with "Debug Build" turned off?

Both approaches run at the same speed for me (and having debug on/off makes no difference). They each take about 1667 milliseconds on my PC:

There's nothing really wrong with doing all of your DrawTexts as big blocks of unrolled code, so use that approach if it's significantly faster for you, but it seems odd that there's a noticable delay with the startup and shutdown when using the looping function. Could you post both versions here (if they don't use images/sounds that would be difficult to post)? Now I'm curious what's going on. :)


Apollonius(Posted 2006) [#9]
Incbin "background.bmp"

SetGraphicsDriver GLMax2DDriver()
Graphics 800,600,0,60 'the 0 stands for debugging, 60 is the herts(FPS)
' -------------------------
' Variables
' -------------------------
'Local bline_y = 20
Local bline_n = 5

' -------------------------
' Load Images
' -------------------------
Local g_background:TImage = LoadImage("background.bmp") ' YOUR IMAGE GOES HERE
' -------------------------
' Create Timers
' -------------------------
Local fps:TTimer = CreateTimer(1)
Local timer:TTimer = CreateTimer(60)

Repeat
WaitTimer(fps)
	PollEvent ' check for events without halting like WaitEvent
	Cls
	
	SetBlend AlphaBlend
	SetAlpha(1)
	' Background
	DrawImage g_background,0,0
	
	' ------------------
	' Special Effect 1
	' ------------------
	SetColor(165,225,225)
	SetAlpha(0.2)
	
For Local bline_y = 20 To 140 Step 30
	For Local x = 35 To 755 Step 30
		DrawText "0", x, bline_y
	Next
Next	
	' Return to no Color or Alpha
	SetColor(255,255,255)
	SetAlpha 1
	
	Flip

Until KeyHit(key_escape)

End


remove the rather large 800x600 image.

--------
edited:
btw the one with the functions work pretty well I think Im gonna use that technique

Function drawbinary()
	For Local bline_y = 20 To 140 Step 30
		For Local x = 35 To 755 Step 30
			DrawText "0", x, bline_y
		Next
	Next
End Function

but my version lags in the main loop


Apollonius(Posted 2006) [#10]
After thinking carefully about all my options, I've concluded that the 1000 Lines of DrawText will be necessary. I don't know of any code that could generate 19 lines of 25 " 0s and 1s " (Binary Style) in my background, without all lines being the same. It's possible to generate 19 lines of 0s and 1s not at teh same places but after the program needs to fade them randomly, and it would need to know which are 1s and which are 0s and sicne they would be randomly generate, I don't see any way of knowign which is which and then fade them in and out. This would probably be less complex with images, but oh well.

So I will write 19 blocks of drawtext with 0s and 1s and then use Select and cases to randomly chose which number will be faded in and out in the line and then, all lines will fade in and out at least 1 number per lines at the same time. Creating the effect I'm looking for.

How does that sound?


WendellM(Posted 2006) [#11]
That's probably a good, simple approach. If I were doing it, I'd be tempted to use the function loop and to use Types to hold whether each character is a 1 or 0, its cycle rate, and its current alpha/color level. But you mentioned that you prefer simple (and big <g>) code. So if it works, and you enjoy writing it, then that's how you should proceed.

I think that programming is sort of personal that way. Sometimes I'll look at examples written by others and realize that the approaches used are supposedly more efficient or "standard" than mine, but that they're not what I'd be comfortable with. I'm a big believer in making code human-readable first (whatever that means to each individual programmer) and machine-efficient second. I only optimize for speed in case some area is too slow for my target machine. So I think that you should program whatever way makes the most sense to you.

Good luck, and have fun!


Apollonius(Posted 2006) [#12]
Speed is always good, but I can't see any other way to do it, and I don't really see how type could do what I'm trying to do. Probably because my experience with types is very limited.


Apollonius(Posted 2006) [#13]
UPDATE
hahaha I just created one awesome binary effect, not what I was trying to do but its' awesome!


Apollonius(Posted 2006) [#14]
Ok problem! I got everything on the screen btu it won't fade in and out, it jsut fades in and out as a whole... i dont get .. it goes way too fast O.O

Freaken big chunck of code.
' -------------------------
' First BX Practice
' -------------------------
Incbin "background.bmp"

SetGraphicsDriver GLMax2DDriver()
Graphics 800,600,0,60 'the 0 stands for debugging, 60 is the herts(FPS)


' -------------------------
' Variables
' -------------------------
Global azero#=0.1
Global azero_var#=0.1

' -------------------------
' Load Images
' -------------------------
Global g_background:TImage = LoadImage("background.bmp")


' -------------------------
' Create Timers
' -------------------------
Global timer:TTimer = CreateTimer(10)


Repeat
	PollEvent ' check for events without halting like WaitEvent
	Cls
	
	SetBlend AlphaBlend
	SetAlpha(1)
	' Background
	DrawImage g_background,0,0
	
	' Binary Effect
	drawbinary(20)
	drawbinary(50)
	drawbinary(80)
	drawbinary(110)
	drawbinary(140)
	drawbinary(170)
	drawbinary(200)
	drawbinary(230)
	drawbinary(260)
	drawbinary(290)
	drawbinary(320)
	drawbinary(350)
	drawbinary(380)
	drawbinary(410)
	drawbinary(440)
	drawbinary(470)
	drawbinary(500)
	drawbinary(530)
	drawbinary(560)
	
	
	
	' Return to no Color or Alpha
	SetColor(255,255,255)
	SetAlpha(1)
	
	Flip

Until KeyHit(key_escape)

End

Function drawbinary(y#)

	SetColor(165,225,225)
	SetAlpha(0.15)

	DrawText "0",35,y#
	DrawText "0",65,y#
	DrawText "1",95,y#
	DrawText "1",125,y#
	DrawText "0",155,y#
	DrawText "1",185,y#
	DrawText "1",215,y#
	DrawText "0",245,y#
	DrawText "0",275,y#
	DrawText "0",305,y#
	DrawText "0",335,y#
	DrawText "0",365,y#
	DrawText "0",395,y#
	DrawText "0",425,y#
	DrawText "0",455,y#
	DrawText "0",485,y#
	DrawText "0",515,y#
	DrawText "0",545,y#
	DrawText "0",575,y#
	DrawText "0",605,y#
	DrawText "1",635,y#
	DrawText "0",665,y#
	DrawText "1",695,y#
	DrawText "0",725,y#
	DrawText "0",755,y#
	
	Local random_fade_number=Rnd(1,26)
	Select random_fade_number
	Case 1
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "0",35,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 2
		SetColor(165,220,225)
		SetAlpha(azero#)
	
		DrawText "0",65,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 3
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "1",95,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 4
		SetColor(165,220,225)
		SetAlpha(azero#)
	
		DrawText "1",125,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 5
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "0",155,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 6
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "1",185,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 7
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "1",215,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 8
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "0",245,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 9
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "0",275,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 10
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "0",305,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 11
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "0",335,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 12
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "0",365,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 13
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "0",395,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 14
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "0",425,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 15
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "0",455,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 16
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "0",485,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 17
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "0",515,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 18
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "0",545,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 19
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "0",575,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 20
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "0",605,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 21
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "1",635,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 22
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "0",665,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 23
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "1",695,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 24
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "0",725,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Case 25
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "0",755,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
	Default
	' Do Nothing
	End Select


End Function



CS_TBL(Posted 2006) [#15]
Dude, you don't want to code like that :P

Imagine you need to fix/change something.. this way you keep fixing/changing until you're 80!

Key-rule in programming is: if something identical happens twice or more then replace it with a single operation and put it in a loop orso.

Ohwell, let's not rush it, good luck :P


Apollonius(Posted 2006) [#16]
Can someone show me how to make this? I mean, this is too big and it's not working, trying to change it is a pain because it's soo big lol

19 Lines
25 0s or 1s
Fading in and out Randomly

I need to improuve... Help.


Augen(Posted 2006) [#17]
In each of the cases, it seems the only thing you are changing is the Drawtext x position and the "0" or "1". Maybe instead of having all the Select Case you could have a couple functions.

Function Zero()
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "0",x#:+30.0,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
End Function

		
Function One()
		SetColor(165,220,225)
		SetAlpha(azero#)
		
		DrawText "1",x#:+30.0,y#
		
		If EventSource() = timer Then ' timer has ticked
		azero# = azero# + azero_var#
			If azero > 1.0 Then azero_var# = -azero_var# ' "ping pong" between getting brighter and getting darker
			If azero < 0.1 Then azero_var# = -azero_var#
		EndIf
End Function


You could even try having a single Type with a drawtext method, but that may be too complicated.


Apollonius(Posted 2006) [#18]
I know abit on how to use types in B+

like
Type binary
field x#, y#
field num#
End type

test.binary = New binary
test\x#= 20
test\y#= 20
test\num#= Rnd(0,1)


Not sure if it works the same in Bmax, but I can't quite see how to use this efficently to solve my problem.


Augen(Posted 2006) [#19]
I'm only a beginner in BMax myself, so I don't know all the workings, so take my advice with reservations :). In BMax there are methods which can be used on an instance of a Type (i.e. you have to have an instance of the type to call the method). You could have a method that would increase the x# by 30, and draw a 0 or 1 based x#,y# coordinates. I would suggest reading up on methods in the docs, and also I think Wave's BMax tutorial has some good info. on methods--it's in the tutorial section of the BMax forum.


CS_TBL(Posted 2006) [#20]
kaisuo:

It works nearly the same:
1 there's the . seperator instead of \
2 there can be type-functions (global)
3 there can be type-methods (attached to an instance)
type bleh
  field a:int

  function blah()
  end function

  method blow()
  end method
end type

local MyInstance:bleh=new bleh
MyInstance.a=3
MyInstance.blow()

bleh.blah() ' <- see? global!



Apollonius(Posted 2006) [#21]
I guess I should go through a few tutorial before trying to make stuff. I understand some of it but you know, learning first hand by example brings to understanding. hehe, gonna read up a few tutorials.


CS_TBL(Posted 2006) [#22]
Well, you should always make stuff, doing stuff teaches you more than just reading tutorials or helpfiles. But: you should start with small stuff instead of large stuff.

And remember one thing: programmers are lazy. This means they want to get things done in as few instructions as possible. It also means that if you have the impression that code is going to get big because it's repetitive, then things must be wrong, try to make a better routine then.


Apollonius(Posted 2006) [#23]
Yeah, your right, and I just noticed something, I'm looking at the games that come with the Blitz Max and I hardly understand them, I'm not too good at understanding other's code it seems.

And Type with Functions and Methodes in them is just confusing for me.


CS_TBL(Posted 2006) [#24]
And yes, it's all very attractive to start with programming a game, it's really the romanticism around game-creating that gives programmers butterflies in their stomache. The truth however is that games are 1) big, 2) a lot of work, 3) not as easy as one might think they are. (not counting 'Guess the number' :D). I see so many beginners on the forum who hardly know how to make good code, but they all seem to want to start by making a game.. Doing big games (RPG's etc.) also requires serious codework, database-routines, textplotters etc. usually the least funny parts..


CS_TBL(Posted 2006) [#25]
And Type with Functions and Methodes in them is just confusing for me.


That's OO for ya. Perhaps you must skip this and first make sure you fully understand classic procedural programming (which blitz+ is, but it's also possible in bmax ofcourse).

I'm looking at the games that come with the Blitz Max and I hardly understand them, I'm not too good at understanding other's code it seems.



I hardly can read other code either, that's no problem. It just means you have to do everything on your own, which is quite educating ofcourse. ^_^
In most of the cases it's because I'm a sucker for full modularity and not all code you find here is modular.


Augen(Posted 2006) [#26]
Try Wave's Beginner's Tutorial in the BMax Tutorial section. I just looked over it again, and it has some good stuff on functions and methods within types. Some of the examples may not work correctly unless you alter them slightly, but it is a superb tutorial for building a foundation to understand BMax.


Apollonius(Posted 2006) [#27]
Someone should make the ultimate tutorial

Showing how to use Types/Methodes/Functions, demonstrating why you should use them and how to use them efficently with small examples. That way your every day beginner can understand how to use them and why use them.

I think that would help alot in the end because then when the beginners ask questions and you answer them then they would probably have a bigger chance of understanding what your saying.

As for myself, I'm ulterly a visual type of person, so if I can picture it then I'll understand, so alot of small simple examples with clear explications, it'd be heaven! :)

But Blitz Max's documentation does not give examples like Blitz Plus's documentation and the documentation's not too clear. No offense intended for the one who wrote it though.

If I had the skills I'd write "The beginners' guide to Blitz Max" because I know how hard understanding some of BMax's aspect for someone who doesn't know that much about programming.

Blitz Max has soo much potential to be exploited by even those who have never programmed before, because it's a very clean language compared to the bigger ones like C++ or ASM. I love programming with Blitz, it's fun although I'm never quite sure of what I'm doing or the result I'll get.