Issue 0.1 of BlitzMax Coder is online...

BlitzMax Forums/BlitzMax Programming/Issue 0.1 of BlitzMax Coder is online...

Arowx(Posted 2009) [#1]
I would just like to thank everyone who has worked on this with me I hope you like it!

Check out the first issue of BlitzMax Coder



matibee(Posted 2009) [#2]
Looking very professional Merx. Great job!


GfK(Posted 2009) [#3]
Looks good - two things though:

1. Why PDF? Why not just a website?

2. You spelt jkrankie's website URL wrong.


Armitage 1982(Posted 2009) [#4]
héhé reading it, will report my feeling on it soon ;)
Thanks


ziggy(Posted 2009) [#5]
Hey, congratulations!
I've just downloaded a copy and read the interview with Mr. Sibly
This looks very promising!


Arowx(Posted 2009) [#6]
@GfK well my webskills need some work and I though a glossy would show off BlitzMax a bit more.

Apologies jkrankie it's correct in the info box, typo sorry I will correct this shortly!

Cheers matibee, ziggy it will only work with your contributions though!


Nate the Great(Posted 2009) [#7]
hmm... I opened it once but now it just freezes when I open it :( firefox doesnt work, IE8 doesnt work, safari doesnt work, google chrome doesnt work...

maybe just make it a webpage instead of a pdf?


Jim Teeuwen(Posted 2009) [#8]
Kudos for the effort. It looks well nice :)


Armitage 1982(Posted 2009) [#9]
Excellent work for a first mag :)

Some text was hard to read for example the last interview (I would have greyed questions over white answers and add more space).
What about "rasterizing" your graphics ? Because it's a bit slow while viewing this online with Firefox (but fast enough if you download the pdf).
As GFX said a webzine would be so much better but I know it's sometime hard to achieve correctly :)

I found articles nice and interesting (but only see 2 while the title say 3 !?).
Maybe some tips and tricks would be awesome too (stuff like : how coding better faster stronger ^^).

The interview with Mark was tiny but really welcome, mainly about the ARM part : I like that.
On the next episode I Would love to know his opinion on optimizing a bit more Max2D (of course I don't want to annoy Mark on every release of BlitzMax Coder but I like the idea :).

I really enjoy the last part talking about the Blitz Community, I think you should emphasis on this more as we really have an excellent community.

Maybe referring to good general articles on game making or programming technologies, libraries available on the web.
Revealing important topic on the forum that we could miss at some point (sometimes it's pretty hard every week to stay up-to-date especially in summer).
Talking about the new features of Max and encountered flaw.

Hope this help you ;D


ImaginaryHuman(Posted 2009) [#10]
Really nice job on your first publication, sir!


N(Posted 2009) [#11]
Looks alright. I think it could do with less gradients and bubbles, though.


JoshK(Posted 2009) [#12]
That was actually pretty good. I liked the article on curves.


Who was John Galt?(Posted 2009) [#13]
Tremendous work. Wouldn't look out of place in a professional production mag.... and getting an interview with the reclusive Mr. Sibley; well done!


xlsior(Posted 2009) [#14]
Very nice, although I found the text very hard to read (bolded, white-on-black is not the easiest on the eyes... Which goes for both the headline font and the arial in the actual articles. Especially the headline font looks very crowded, so rather than stand out they just kind of blur together)

other than that: keep up the great work, the content itself is good.


Dabhand(Posted 2009) [#15]
Bit that intrigued me the most was:-


I wouldn't be adverse to the idea of
opening up the backend code generator (the bit
that converts compiler intermediate code to
either x86 or powerpc asm) for people to play
with.


I'd definitely like a play with that!

Dabz


Flemmonk(Posted 2009) [#16]
Pretty good for a first issue, needs some work obviously but you had a short time span.

Perhaps doing a 'Engine Review' section one month, where somebody reviews all available engines and makes comparisons between them all or lists their advantages/disadvantages.


Ked(Posted 2009) [#17]
The Hello World 2 should definitely not be considered "beginner."

Other than that, I enjoyed reading it!


Roger(Posted 2009) [#18]
Excellent Read,

The Interview with Mark Sibly was really good, so nice to see questions not all based round 'what's happening with Max3D'. The future language options and clarification about ARM/Compiler backend was to my mind far more interesting. After all there are plenty of BlitzMax capable 3D engines available, but only one BlitzMax the language.

The design was quite polished, although as others have mentioned sort of a hybrid between a web/print magazine design.

Reading all that type on a black background was kind of hard.

But thank's for your hard work, the presentation and content was far better than I think most (including myself) expected.

Cheers

Roger


byo(Posted 2009) [#19]
I really like where this is going. Keep up the good work.
Maybe add some 3D tutorials using miniB3D, Irrlicht, Ninfa3D and other engines? (hint).

Thank you for starting this project.


slenkar(Posted 2009) [#20]
looks good, good interviews too


plash(Posted 2009) [#21]
Magazine looks great Merx! But I would prefer it to be on a web page or with less images (the PDF is slow at scrolling/rendering).

Generics/Templates in Max would be most excellent.


Jur(Posted 2009) [#22]
Great magazine! I hope that this will become a regular publication.


Wiebo(Posted 2009) [#23]
Nice man! A bit hard on the eyes at some places, but really cool! Congratulations on 0.1 and I hope to have some content for you once in a while.


Philip7(Posted 2009) [#24]
Nice! Congratulation on your first publication Merx.

A great piece of code for anyone is the Fixed rate logic code that Dmaz made : Timing code

This is an returning question in the forum and certainly if your mag is going to attract new BMax developers they will ask about timingcode.

One little pointer: a tutorial is not 'look here's code, have fun' BAM 2 pages of code. For it to be a tutorial you need to actually explain in depth.


CodeGit(Posted 2009) [#25]
Very good. Massive potential. Also, no problem with pdf (I like to download and read)


Difference(Posted 2009) [#26]
Very nice!

One more vote for Generics/templates


EOF(Posted 2009) [#27]
Great work. The curves tutorial is second to none


MikeHart(Posted 2009) [#28]
Great work Allan. And now my 2 cents of what I would change.

1) Raise the font size by 1 or 2 points
2) use a bright background with a dark font. White on black I find it hard to read and a stress to my eyes
3) Don't use 3 columns of text. Limit yourself to 2.
4) Create a meaningfull index in the magazine with page numbers, but more important, a usefull index in the PDF file.

Thanks for the effort you put into this. I know it is very hard work.

Michael Hartlef


Difference(Posted 2009) [#29]
BTW: I really think you should submit news about this (and continue to) to developper sites http://gamedev.net , http://devmaster.net and the likes.

If you give it an OpenGl spin, I'm sure http://opengl.org will take it too.

BlitzMax will get some well deserved attention that way.


GaryV(Posted 2009) [#30]
Thanks for making it a PDF. It is the only option for an e-mag :)

Very good job on this. I really appreciate your hard work.


TommyH(Posted 2009) [#31]
Great first issue! Thanks for all your efforts, Allan!

+1 for MikeHart's suggestion to change the font and background color. I'd prefer to print the PDF and read it on real paper ;-)


GaryV(Posted 2009) [#32]
FWIW, I have 20/200 vision. I have no problems reading this without my glasses. Very pro job on the design, content and layout.


JaviCervera(Posted 2009) [#33]
This has come along pretty fast, and I must say I'm really impressed by the result!

Keep up the good work!


jsp(Posted 2009) [#34]
Excellent work! Enjoyed reading it
PDF was just fine for me.


jkrankie(Posted 2009) [#35]
Cool! .PDF is great, my preferred choice, but it might be good to have the same content on a web page too.

Cheers
Charlie


Digital Anime(Posted 2009) [#36]
Great job and within so little time, I hope to see more in the future.


Who was John Galt?(Posted 2009) [#37]
BTW: I really think you should submit news about this (and continue to) to developper sites http://gamedev.net , http://devmaster.net and the likes.

If you give it an OpenGl spin, I'm sure http://opengl.org will take it too.

BlitzMax will get some well deserved attention that way.
+1 on this. Your magazine could bring Blitz some well needed exposure.


Space_guy(Posted 2009) [#38]
great work. :)


Patch(Posted 2009) [#39]
Nice work! Looking forward to future issues!


BlitzSupport(Posted 2009) [#40]
Great read, thanks Merx.


Jason W.(Posted 2009) [#41]
You did a great job with your magazine..very professional.

I look foward to the next issue.

Jason


Arowx(Posted 2009) [#42]
Hey guys I only put a nice cover on the stuff you do, it's your magazine, well actually you made the cover, the content, the artwork all I did was present it in an arguably nice fashion.

Now who's got projects, games, tutorials, ideas for 0.2?

Mark Sibly 'I'll just leave it up to the community to keep on surprising me as they constantly do!'

PS your on devmaster.net and have been submitted to gamedev.net and opengl.org ;o)


josk(Posted 2009) [#43]
Good work, look forward to the next one.


GaryV(Posted 2009) [#44]
I was flattered to be quoted twice in this issue, lol.


MGE(Posted 2009) [#45]
Really needs a web version. It would help with seo as well. Isn't there pdf to htm converters?

Fingers are crossed you stay motivated to keep doing this. Looking very, very nice. ;)


Arowx(Posted 2009) [#46]
Well the website is next on my list but which CMS to choose?


degac(Posted 2009) [#47]
Great work! Congratulations!

Some considerations:

1. +++ I like the contents
2. + I like the PDF format (so I can print it...) but a web version would be nice
3. --- PDF layout/colors is not very readable...it's seems to read a magazine of the '90


ziggy(Posted 2009) [#48]
Just a suggestion: If it's going to be published on PDF (wich is ok for me), pelase make it with a printer-friendly color scheme. One of the benefits of it being PDF is that it can be properly printed!


ImaginaryHuman(Posted 2009) [#49]
For anyone interested, as a follow up to the article about bezier curves, here is a piece of sourcecode based on the same algorithm but for cubic beziers.

Each cubic bezier has 4 control points instead of 3. For comparison, I merged this into the final sourcecode from the article, so you can see how the cubic and quadratic beziers give different results - which is a lot more than I expected. The red line is the cubic bezier.

The control points can be adjusted interactively, and since I selected the OpenGL driver I also switched on line smoothing and made the lines thicker. Line smoothing in GL, and this may be driver dependent, basically draws filled rectangles with 90 degree corners. Even with a line strip/loop it doesn't know to change the coordinates of the four corners of each rectangle to make the sequence of lines seamless. You can see this obviously if you set glLineWidth(20) and change the NumberOfSegments to 10. To do proper antialiased lines you'd really need to manually generate correctly-shaped quads or triangle strips and use polygon antialiasing or draw thin lines around the edges.

Local NumberOfSegments:Int=50

SetGraphicsDriver GLMax2DDriver()
Graphics 800,600
glEnable(GL_LINE_SMOOTH)
glHint(GL_LINE_SMOOTH_HINT,GL_NICEST)
glLineWidth(2.0)
SetBlend LIGHTBLEND
'SetClsColor $FF,$FF,$FF

Local PX:Float[5]
Local PY:Float[5]
PX[0]=50
PY[0]=550
PX[1]=225
PY[1]=50
PX[2]=370
PY[2]=300
PX[3]=525
PY[3]=575
PX[4]=750
PY[4]=50

Local Position:Float
Local X:Float
Local Y:Float
Local X2:Float
Local Y2:Float
Local Controlling:Int=False
Local ControlPoint:Int=0
Local MX:Int
Local MY:Int
Local Point:Int
Local SegmentSize:Float=1.0/NumberOfSegments
Repeat
	Cls
	
	'Control it
	MX=MouseX()
	MY=MouseY()
	If Controlling=False
		If MouseDown(1)
			For Point=0 To 4
				If MX>=PX[Point]-15 And MY>=PY[Point]-15 And MX<=PX[Point]+15 And MY<=PY[Point]+15 And Point<>2
					'Control the point so long as it's not the middle shared point
					Controlling=True
					ControlPoint=Point
				EndIf
			Next
		Else
			Controlling=False
		EndIf
	EndIf	
	If Controlling=True
		SetColor $0,$0,$0
		DrawText MX+","+MY,0,32
		PX[ControlPoint]=MX
		PY[ControlPoint]=MY
		If Not MouseDown(1) Then Controlling=False
	EndIf

	'Force continuity - calculate the middle shared point automatically
	PX[2]=PX[1]+((PX[3]-PX[1])*0.5)
	PY[2]=PY[1]+((PY[3]-PY[1])*0.5)

	'Draw stuff
	SetColor $88,$88,$88
	DrawLine PX[0],PY[0],PX[1],PY[1]	'Draw lines
	DrawLine PX[1],PY[1],PX[2],PY[2]
	DrawLine PX[2],PY[2],PX[3],PY[3]
	DrawLine PX[3],PY[3],PX[4],PY[4]
	SetColor $FF,$0,$0
	DrawOval PX[0]-5,PY[0]-5,10,10	'Draw control points
	DrawOval PX[1]-5,PY[1]-5,10,10
	'DrawOval PX[2]-5,PY[2]-5,10,10	'Don't draw middle shared point
	DrawOval PX[3]-5,PY[3]-5,10,10
	DrawOval PX[4]-5,PY[4]-5,10,10
	SetColor 121,195,3
	
	'Draw curve 1 quadratic
	X=PX[0]
	Y=PY[0]
	Position=SegmentSize
	While Position<=1.00001	'Go to 1.00001 to make sure final line is drawn
		QuadraticBezierPoint(PX[0],PY[0],PX[1],PY[1],PX[2],PY[2],Position,X2,Y2)
		DrawLine X,Y,X2,Y2
		X=X2
		Y=Y2
		Position:+SegmentSize
	Wend
	
	'Draw curve 2 quadratic
	X=PX[2]
	Y=PY[2]
	Position=SegmentSize
	While Position<=1.00001	'Go to 1.00001 to make sure final line is drawn
		QuadraticBezierPoint(PX[2],PY[2],PX[3],PY[3],PX[4],PY[4],Position,X2,Y2)
		DrawLine X,Y,X2,Y2
		X=X2
		Y=Y2
		Position:+SegmentSize
	Wend

	'Draw total curve as cubic bezier
	SetColor $FF,$00,$00
	X=PX[0]
	Y=PY[0]
	Position=SegmentSize
	While Position<=1.00001	'Go to 1.00001 to make sure final line is drawn
		Curve4(PX[0],PY[0],PX[1],PY[1],PX[3],PY[3],PX[4],PY[4],Position,X2,Y2)
		DrawLine X,Y,X2,Y2
		X=X2
		Y=Y2
		Position:+SegmentSize
	Wend

	Flip 1
Until KeyHit(KEY_ESCAPE) Or AppTerminate()

Function QuadraticBezierPoint(P1X:Float,P1Y:Float,P2X:Float,P2Y:Float,P3X:Float,P3Y:Float,Position:Float,P123X:Float Var,P123Y:Float Var)
	Local P12X:Float=(P2X-P1X)*Position
	Local P12Y:Float=(P2Y-P1Y)*Position
	Local P23X:Float=(P3X-P2X)*Position
	Local P23Y:Float=(P3Y-P2Y)*Position
	P123X=(((P2X+P23X)-(P1X+P12X))*Position)+P1X+P12X
	P123Y=(((P2Y+P23Y)-(P1Y+P12Y))*Position)+P1Y+P12Y
End Function

Function Curve4(P1X:Float,P1Y:Float,P2X:Float,P2Y:Float,P3X:Float,P3Y:Float,P4X:Float,P4Y:Float,Position:Float,PointX:Float Var,PointY:Float Var)
	'Calculate a point on a bezier curve with 4 control points (cubic)
	'Requires four control points with X and Y coordinates
	'and a current position on the curve in the range 0..1
	'Coordinates are returned in PointX and PointY variables

	'Calculate distance moved along each line, between pairs of control points
	Local P12X:Float=(P2X-P1X)*Position		'P1 to P2 X, scaled
	Local P12Y:Float=(P2Y-P1Y)*Position		'P1 to P2 Y, scaled
	Local P23X:Float=(P3X-P2X)*Position		'P2 to P3 X, scaled
	Local P23Y:Float=(P3Y-P2Y)*Position		'P2 to P3 Y, scaled
	Local P34X:Float=(P4X-P3X)*Position		'P3 to P4 X, scaled
	Local P34Y:Float=(P4Y-P3Y)*Position		'P3 to P4 Y, scaled

	'Calculate values needed for relative-to-absolute coordinate conversion
	Local P1XP12X:Float=P1X+P12X			'Absolute coord of start of intermediary line P12 in X
	Local P1YP12Y:Float=P1Y+P12Y			'Absolute coord of start of intermediary line P12 in Y
	Local P2XP23X:Float=P2X+P23X			'Absolute coord of start of intermediary line P23 in X
	Local P2YP23Y:Float=P2Y+P23Y			'Absolute coord of start of intermediary line P23 in Y

	'Calculate distance along intermediary lines between P12-to-P23, and P23-to-P34
	Local P123X:Float=(P2XP23X-P1XP12X)*Position	'P12 to P23 X, scaled
	Local P123Y:Float=(P2YP23Y-P1YP12Y)*Position	'P12 to P23 Y, scaled
	Local P234X:Float=((P3X+P34X)-P2XP23X)*Position	'P23 to P34 X, scaled
	Local P234Y:Float=((P3Y+P34Y)-P2YP23Y)*Position	'P23 to P34 Y, scaled

	'Calculate length of final intermediary line from P123 to P234
	Local P1XP12XP123X:Float=(P1XP12X+P123X)	'Absolute coord of start of P123-to-P234 in X
	Local P1YP12YP123Y:Float=(P1YP12Y+P123Y)	'Absolute coord of start of P123-to-P234 in Y

	'Then scale it and convert back to absolute coords
	PointX=(((P2XP23X+P234X)-P1XP12XP123X)*Position)+P1XP12XP123X	'P123 to P234 X, scaled, absolute
	PointY=(((P2YP23Y+P234Y)-P1YP12YP123Y)*Position)+P1YP12YP123Y	'P123 to P234 Y, scaled, absolute
End Function


As you move the last point around, you'll notice that the curves really are quite different. Moving the end point influences the entire curve in the cubic bezier but only the second half of the quadratic one. Also the quadratic curves are anchored at the mid point between P2 and P3 whereas the cubic curve flows freely.


AlexO(Posted 2009) [#50]
Good stuff.
Interviews/Post Mortems of developers who have released commercial games with Blitzmax may be a good addition to 0.2 or even a monthly column, similar to GDMag.

I agree on a more printer friendly color scheme.

Great job though! I enjoyed the read.


ImaginaryHuman(Posted 2009) [#51]
Here is a more compact and slightly more optimized version of both quadratic and cubic beziers. The algorithm is much the same but I found a way to approach it slightly differently that lets me maintain the absolute coordinates from getting lost amongst all the relative distances. Saves a few adds. Also easier to read and expand into more control points. I added it to the code archives.

Function Curve3(P1X:Float,P1Y:Float,P2X:Float,P2Y:Float,P3X:Float,P3Y:Float,Position:Float,PointX:Float Var,PointY:Float Var)
	'Calculate a point on a bezier curve with 3 control points (quadratic) using floating point math
	'Requires three control points with X and Y coordinates and a current position on the curve in the range 0..1
	'Coordinates are returned in PointX and PointY variables

	'Calculate position along each line between pairs of control points P1-to-P2 and P2-to-P3
	P1X:+((P2X-P1X)*Position)					'P1 to P2 X, scaled, absolute
	P1Y:+((P2Y-P1Y)*Position)					'P1 to P2 Y, scaled, absolute
	P2X:+((P3X-P2X)*Position)					'P2 to P3 X, scaled, absolute
	P2Y:+((P3Y-P2Y)*Position)					'P2 to P3 Y, scaled absolute

	'Calculate position along final line between P12 and P23
	PointX=((P2X-P1X)*Position)+P1X			'P12 to P23 X, scaled, absolute
	PointY=((P2Y-P1Y)*Position)+P1Y			'P12 to P23 Y, scaled, absolute
End Function

Function Curve4(P1X:Float,P1Y:Float,P2X:Float,P2Y:Float,P3X:Float,P3Y:Float,P4X:Float,P4Y:Float,Position:Float,PointX:Float Var,PointY:Float Var)
	'Calculate a point on a bezier curve with 4 control points (cubic) using floating point math
	'Requires four control points with X and Y coordinates and a current position on the curve in the range 0..1
	'Coordinates are returned in PointX and PointY variables

	'Calculate position along each line between pairs of control points P1-to-P2, P2-to-P3, P3-to-P4
	P1X:+((P2X-P1X)*Position)					'P1 to P2 X, scaled, absolute
	P1Y:+((P2Y-P1Y)*Position)					'P1 to P2 Y, scaled, absolute
	P2X:+((P3X-P2X)*Position)					'P2 to P3 X, scaled, absolute
	P2Y:+((P3Y-P2Y)*Position)					'P2 to P3 Y, scaled, absolute
	P3X:+((P4X-P3X)*Position)					'P3 to P4 X, scaled, absolute
	P3Y:+((P4Y-P3Y)*Position)					'P3 to P4 Y, scaled, absolute

	'Calculate position along intermediary lines between P12-to-P23 and P23-to-P34
	P1X:+((P2X-P1X)*Position)					'P12 to P23 X, scaled, absolute
	P1Y:+((P2Y-P1Y)*Position)					'P12 to P23 Y, scaled, absolute
	P2X:+((P3X-P2X)*Position)					'P23 to P34 X, scaled, absolute
	P2Y:+((P3Y-P2Y)*Position)					'P23 to P34 Y, scaled, absolute

	'Calculate position along final lines between P123 and P234
	PointX=((P2X-P1X)*Position)+P1X			'P123 to P234 X, scaled, absolute
	PointY=((P2Y-P1Y)*Position)+P1Y			'P123 to P234 Y, scaled, absolute
End Function