Page 28 of 71
Re: MP3D Engine Alpha 31
Posted: Fri Jun 21, 2013 9:15 pm
by mpz
Hi,
@deseven, yes MP_SetSamplerState is the correct solution, i have some examples in the Demo section
@ leonhardt, i am sorry but in MP3D use DX9 Sprite, the PB lib use 3d Meshs with only one plane. I have made a sprite test to show the difference. You need the actualized beta lib MP32 too use the demo.
On this weekend i will actualize the engine to mp3d 32 an then i go for 2 weeks in holiday
Greetings Michael
http://www.flasharts.de/mpz/Data/mp3d_hack.exe
Code: Select all
InitSprite()
InitSprite3D()
OpenWindow(0, 0, 0, 800, 600, "Screen", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, WindowWidth(0), WindowHeight(0), 0, 0, 0)
Sprite3DQuality(1)
Font = FontID(LoadFont(#PB_Any, "Arial", 192))
CreateSprite(1, 256, 256, #PB_Sprite_Texture)
StartDrawing(SpriteOutput(1))
DrawingFont(Font) : DrawingMode(1)
Box(0,0,256,256,$FF0000)
DrawText(0,0,"F", $0000FF, 0)
StopDrawing()
CreateSprite3D(1, 1)
Define pd3d.IDirect3DDevice9
EnableASM
CompilerIf #PB_Compiler_Processor = #PB_Processor_x86
!extrn _PB_Screen_Direct3DDevice ; Get the DX9 device of PB
!MOV dword EAX, [_PB_Screen_Direct3DDevice]
!MOV dword [v_pd3d],EAX
CompilerElse
!extrn PB_Screen_Direct3DDevice ; Get the DX9 device of PB
!MOV dword EAX, [PB_Screen_Direct3DDevice]
!MOV dword [v_pd3d],EAX
CompilerEndIf
DisableASM
MP_UsePB3D(pd3d)
MP_SetRenderState(22,1) ; Make the Sprite3D looking from two sizes
Sprite = MP_LoadSprite("c:\Programme\PureBasic\Examples\Sources\Data\Geebee2.bmp")
Repeat
wire + 1
If Wire > 100
MP_Wireframe(1)
Else
MP_Wireframe(0)
EndIf
If Wire > 200 : Wire = 0 : EndIf
ClearScreen(0)
#HalfSize = 150
Start3D()
a.f = ElapsedMilliseconds()/1000
ZoomSprite3D(1,200*Sin(a),200)
DisplaySprite3D(1, 400-100*Sin(a), 200)
;- MP3D Sprite Part
MP_TurnSprite(Sprite, 1)
MP_DrawSprite(Sprite, 40, 40,$FF)
MP_RenderSprite()
;-
FlipBuffers()
Until WindowEvent() = #PB_Event_CloseWindow
Re: MP3D Engine Alpha 31
Posted: Fri Jun 21, 2013 10:21 pm
by Psychophanta
mpz wrote:
On this weekend i will actualize the engine to mp3d 32 an then i go for 2 weeks in holiday
Sorry my heavyness, but Damn! man, you are "actualizing" to mp3d 32 since 1 year ago, this lib is not as fast as it should be, the manual is always not finished, etc.

Re: MP3D Engine Alpha 31
Posted: Fri Jun 21, 2013 10:24 pm
by IdeasVacuum
You are doing an incredible job mpz and certainly deserve a holiday

Re: MP3D Engine Alpha 31
Posted: Fri Jun 21, 2013 11:42 pm
by mpz
Hi Psychophanta,
on the beginning i want to have a look on DX9 and make some little commands for my own. And then it was fun for me to make more and more commands. Some users ask me about functions and i put them in. In this time i learned much, but my wife told me all the time "what for stupid think do you make? it burns you time for nothing", but if i have time i like it to programming. Now the engine has 33556 (real)lines of code, 2d, 3d, 2d physic, 3d physic and the best "shader" commands. The manual is not good, but i have more fun to program and not to make text files.
* "actualizing" to mp3d 32 since 1 year ago -> yes, it is not easy to create new working commands in a code monster of 33k code lines.
* this lib is not as fast as it should be -> Have you an example for that? Perhaps i can learn from a faster engine to make it better...
* the manual is always not finished -> oh you want to help? You need the helpmaker from Gnozal and i give you my helptextfiles...
Greeting Michael
Re: MP3D Engine Alpha 31
Posted: Sat Jun 22, 2013 9:37 am
by applePi
thanks Michael for your hard work, i know only 1 percent of your engine and it is enough to do the 3D graphics very good.
Re: MP3D Engine Alpha 31
Posted: Sat Jun 22, 2013 10:20 am
by Psychophanta
mpz wrote:Hi Psychophanta,
on the beginning i want to have a look on DX9 and make some little commands for my own. And then it was fun for me to make more and more commands. Some users ask me about functions and i put them in. In this time i learned much, but my wife told me all the time "what for stupid think do you make? it burns you time for nothing", but if i have time i like it to programming. Now the engine has 33556 (real)lines of code, 2d, 3d, 2d physic, 3d physic and the best "shader" commands. The manual is not good, but i have more fun to program and not to make text files.
* "actualizing" to mp3d 32 since 1 year ago -> yes, it is not easy to create new working commands in a code monster of 33k code lines.
* this lib is not as fast as it should be -> Have you an example for that? Perhaps i can learn from a faster engine to make it better...
* the manual is always not finished -> oh you want to help? You need the helpmaker from Gnozal and i give you my helptextfiles...
Greeting Michael
Of course no need to say you are doing great work, of course, of course, and of course.
But if you can not do a more complete and finished product, why do not leave some work to your trust men around you? I mean, why do you do it all alone?
While you are here (or in the official MP3D web forum) to answer to the requirements of the people who use MP3D, all is ok, but again, why you alone? Nobody has the source, the willfulness, and the knowledge to collaborate with you?
Thanks for all Michael!!
(About MP3D speed i guess i will test it more seriosly and say something about it)
Re: MP3D Engine Alpha 32
Posted: Mon Jun 24, 2013 8:20 pm
by mpz
Hi,
new version is out, my airplane comes in 7 hours, i hope the new installer works cant test it much...
@Psychophanta, your meaning are correct and i will think about that in the holiday...
Greetings Michael
Re: MP3D Engine Alpha 32
Posted: Mon Jun 24, 2013 10:33 pm
by Psychophanta
mpz wrote:Hi,
new version is out, my airplane comes in 7 hours, i hope the new installer works cant test it much...
@Psychophanta, your meaning are correct and i will think about that in the holiday...
Greetings Michael
Thanks, that sounds great!
Software products are never ended, however, since MP3D is a very complete product, please do what is in your hands to ... ... well, to "finish" a product which deserves more than a name as "Alpha" version.
My sincere best wishes!
Re: MP3D Engine Alpha 32
Posted: Tue Jun 25, 2013 7:06 am
by applePi
Hi Michael, thanks for the new setup file , i have installed the new library to PB 5.11 and it seems working okay i will test the new features later. . but when i install it for PB 5.2 Beta 2 and trying the examples it issue an error:
the following PureLibrary is missing: Misc
there is no Misc file in PureLibrary folder for PB 5.20. and it does not work to copy Misc from 5.11 to 5.20 .i don't know what is that file.
regards
Re: MP3D Engine Alpha 32
Posted: Tue Jun 25, 2013 12:44 pm
by DoubleDutch
I have the same error in my code too.
Re: MP3D Engine Alpha 32
Posted: Wed Jun 26, 2013 10:23 am
by AndyLy
If somebody wish - you can test a piece of my game written on MP3D.
Warning: the foreign language (not English).
Rotate the camera, hold down the middle mouse button
Make a move, left mouse button
Enter - auto battle
Exit-Escape
http://yadi.sk/d/vQLbfXWN68WHo
Re: MP3D Engine Alpha 32
Posted: Wed Jun 26, 2013 10:36 am
by Sveinung
@AndyLy
Nice little game....but most of it was greek to me.
Sveinung
Re: MP3D Engine Alpha 32
Posted: Wed Jun 26, 2013 2:07 pm
by applePi
i entered the auto mode and i think it is good, pictorialy i like the thin electromagnetic shield around wagons. also the soft fire particles. indeed a prototype of what MP3D with Purebasic can do.
just a suggestion for a future project if it is possible to destroy some land areas by using MP_FreeTriangle(Entity, Index), so in addition of the black fire imprint there are some holes made by heavy artillery bombs . or the destroy effects can appear on the tanks itself
Re: MP3D Engine Alpha 32
Posted: Wed Jun 26, 2013 2:47 pm
by AndyLy
Sveinung, applePi - thanks for the comments.
just a suggestion for a future project if it is possible to destroy some land areas by using MP_FreeTriangle(Entity, Index), so in addition of the black fire imprint there are some holes made by heavy artillery bombs . or the destroy effects can appear on the tanks itself
Too difficult, at least for me. )
Re: MP3D Engine Alpha 32
Posted: Sun Jun 30, 2013 8:29 am
by AndyLy
Faced with such a problem: the compiled program does not display the Plane (MP_CreatePlane(1,1)).
If run in the editor, everything is normal. If I replace Plane on Cube (MP_CreateCube())- display.
Has anyone encountered such?
p.s. PB 5.0, Windows 7, MP3D- last