MP3D Engine Alpha 33

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
mpz
Enthusiast
Enthusiast
Posts: 497
Joined: Sat Oct 11, 2008 9:07 pm
Location: Germany, Berlin > member German forum

Re: MP3D Engine Alpha 31

Post 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

Image

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 
Working on - MP3D Library - PB 5.73 version ready for download
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Re: MP3D Engine Alpha 31

Post 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. :o
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: MP3D Engine Alpha 31

Post by IdeasVacuum »

You are doing an incredible job mpz and certainly deserve a holiday 8)
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
mpz
Enthusiast
Enthusiast
Posts: 497
Joined: Sat Oct 11, 2008 9:07 pm
Location: Germany, Berlin > member German forum

Re: MP3D Engine Alpha 31

Post 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
Working on - MP3D Library - PB 5.73 version ready for download
applePi
Addict
Addict
Posts: 1404
Joined: Sun Jun 25, 2006 7:28 pm

Re: MP3D Engine Alpha 31

Post 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.
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Re: MP3D Engine Alpha 31

Post 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)
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
mpz
Enthusiast
Enthusiast
Posts: 497
Joined: Sat Oct 11, 2008 9:07 pm
Location: Germany, Berlin > member German forum

Re: MP3D Engine Alpha 32

Post 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
Working on - MP3D Library - PB 5.73 version ready for download
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Re: MP3D Engine Alpha 32

Post 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!
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
applePi
Addict
Addict
Posts: 1404
Joined: Sun Jun 25, 2006 7:28 pm

Re: MP3D Engine Alpha 32

Post 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
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: MP3D Engine Alpha 32

Post by DoubleDutch »

I have the same error in my code too.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
AndyLy
Enthusiast
Enthusiast
Posts: 228
Joined: Tue Jan 04, 2011 11:50 am
Location: GRI

Re: MP3D Engine Alpha 32

Post 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
'Happiness for everybody, free, and no one will go away unsatisfied!'
SMsF town: http://www.youtube.com/watch?v=g6RRKYf_Pd0
SMf locations module (Ogre). Game video: http://www.youtube.com/watch?v=ZlhBgPJhAxI
User avatar
Sveinung
Enthusiast
Enthusiast
Posts: 142
Joined: Tue Oct 07, 2003 11:03 am
Location: Bergen, Norway

Re: MP3D Engine Alpha 32

Post by Sveinung »

@AndyLy

Nice little game....but most of it was greek to me. :D

Sveinung
applePi
Addict
Addict
Posts: 1404
Joined: Sun Jun 25, 2006 7:28 pm

Re: MP3D Engine Alpha 32

Post 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
User avatar
AndyLy
Enthusiast
Enthusiast
Posts: 228
Joined: Tue Jan 04, 2011 11:50 am
Location: GRI

Re: MP3D Engine Alpha 32

Post 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. )
'Happiness for everybody, free, and no one will go away unsatisfied!'
SMsF town: http://www.youtube.com/watch?v=g6RRKYf_Pd0
SMf locations module (Ogre). Game video: http://www.youtube.com/watch?v=ZlhBgPJhAxI
User avatar
AndyLy
Enthusiast
Enthusiast
Posts: 228
Joined: Tue Jan 04, 2011 11:50 am
Location: GRI

Re: MP3D Engine Alpha 32

Post 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
'Happiness for everybody, free, and no one will go away unsatisfied!'
SMsF town: http://www.youtube.com/watch?v=g6RRKYf_Pd0
SMf locations module (Ogre). Game video: http://www.youtube.com/watch?v=ZlhBgPJhAxI
Post Reply