Page 2 of 2
Posted: Thu Oct 06, 2005 1:31 pm
by wolfwood2x
Well I have decided if I can successfully code this game I will more than likely buy it. I just didnt want to purchase yet another compiler I will barely use. I have a bad habit of starting 100 hobbies getting all the stuff i need for them and then never touching them again ^_^
I have VB6.0 and
VB .Net Several books for each
and nothing more than some simple api call tests to show for it.
Several books on PHP, CGI and DHTML as well.
So i didnt want to buy the compiler and the book and be out $$ and then look like an idiot yet again .
But As I said IF i can code this or learn enough to warrant this I will most defenitely purchase it.
Posted: Thu Oct 06, 2005 9:18 pm
by Beach
You know I have been singing PureBasic's praises to you for about a year now! - I will not allow you to let it go to waste!

Its been the best software investment I have ever made. Heck, I'm even planing on buying it again when 4.0 is released.
I work with WolfWood (but I am not the focus of this game thank god!).
Posted: Fri Oct 07, 2005 8:21 pm
by MadMax
OK my example is ready, here is the code
Code: Select all
If InitSprite()=0 Or InitMouse()=0 Or InitKeyboard()=0
MessageRequester("Error","Can't start DX",#PB_MessageRequester_Ok)
End
EndIf
OpenScreen(640,480,32,"Dabidu")
Background=LoadSprite(#PB_Any,"Background.bmp",0)
Hbg=LoadSprite(#PB_Any,"HardBG.bmp",0)
cursor=LoadSprite(#PB_Any,"cursor.bmp",0)
hit$=""
hardon=0
Repeat
StopDrawing()
If hardon
DisplaySprite(hbg,0,0)
Else
DisplaySprite(background,0,0)
EndIf
DisplayTransparentSprite(cursor,mx,my)
StartDrawing(ScreenOutput())
DrawingMode(1)
FrontColor(255,255,0)
For sy=20 To 480 Step 40
For sx=20 To 600 Step 100
Locate(sx,sy)
DrawText(hit$)
Next
Next
FlipBuffers(1)
If SpritePixelCollision(cursor,mx,my,hbg,0,0)
hit$="COLLISION!!!"
Else
hit$=""
EndIf
ExamineMouse()
mx=MouseX()
my=MouseY()
ExamineKeyboard()
If KeyboardReleased(#PB_Key_Space)
Select hardon
Case 0
hardon=1
Case 1
hardon=0
EndSelect
EndIf
Until KeyboardPushed(#PB_Key_Escape)
End
And
http://www.raver.moonfilth.com/collision.zip this is a zip with code and graphics
move the mouse to check collisions, and space to toggle between background or hardness map.
hopè this helps.