I originally made this engine for Man Of War but I never got around to actually making the game, so since ive had this sitting around for a while, I thought that I might as well release the src for anyone to use
This engine is able to detect solid and transparent objects, it is fast at loading and at run time, and at the same time is small (around 1000bytes)
(note, some of the sprites currently in use are borrowed from Dount Quest)
In Action
Download: http://rhombusproductions.wikidot.com/local--files/start/MAINENG2.8xp
src
Code:
I will be writing a manual/tut on how to use this, but it will be a day or two as I am studing for finals atm)
This engine is able to detect solid and transparent objects, it is fast at loading and at run time, and at the same time is small (around 1000bytes)
(note, some of the sprites currently in use are borrowed from Dount Quest)
In Action
Download: http://rhombusproductions.wikidot.com/local--files/start/MAINENG2.8xp
src
Code:
:
:"SPRITES
:"XXJYXX NIIIN ozoqvq σx[yhat][xhat][yhat][xhat] ::H:H: 48X84 QIIIIQ →Str1
:For(A,1,50,6
:Text(‾1,A,0,"
:End
:Horizontal ‾55
:
:"MAP DATA
:{1111111111111,1333100010001,1000770010001,1000500010001,1000100010001,1111000000001,10001000100001,1000000010001,1111111111111,2,2→L1
:
:Text(56,60,"LOADING...
:
:"------------
:"BEGIN LOAD
:"------------
:
:{9,13→dim([A]
:1E12→θ
:1→D
:L1(1)→Z
:Fix 1
:For(A,1,9
:If θ=.1
:Then
:D+1→D
:L1(D)→Z
:1E12→θ
:End
:For(B,1,13
:iPart(Z/θ
:fPart(Ans/10
:Ans10
:Ans→[A](A,B
:θ/10→θ
:End
:End
:Float
:Lbl A
:
:"------------
:"DRAW
:"------------
:
:For(A,9,1,‾1
:For(B,1,13
:If [A](A,B
:Then
:For(C,1,8
:Text(6A-6,(7B-6)+C,sub(Str1,([A](A,B)8)-8+C,1
:End
:End
:End
:End
:StorePic 1
:For(A,1,7
:Text((L1(10)6)-6,((L1(11)7)-7)+A,sub("N[yhat]![yhat]N ",A,1
:End
:RecallPic 1
:Text(‾1,56,0,"
:L1(10→A
:L1(11→B
:
:"COLISION DETECTION. IF THE VALUE IS THE SAME AS THE INDEX,THATSRRITE IS SOLID
:
:
:{2,1,2,3,5,5,6,5→L3
:While 1
:Repeat Ans
:getKey
:End
:Ans→K
:Text((A6)-6,(B7)-7,"
:B-(K=24 and [A](A,B-1)≠L3([A](A,B-1)+1))+(K=26 and [A](A,B+1)≠L3([A](A,B+1)+1))→B
:A+(K=34 and [A](A+1,B)≠L3([A](A+1,B)+1))-(K=25 and [A](A-1,B)≠L3([A](A-1,B)+1))→A
:For(θ,1,7
:Text(6A-6,(7B-6)+θ,sub("N[yhat]![yhat]N ",θ,1
:End
:RecallPic 1
:End
I will be writing a manual/tut on how to use this, but it will be a day or two as I am studing for finals atm)