BASIC

Author Topic: World Editor "Modex"  (Read 3086 times)

Offline L.D.M.T.

  • Mc. Print
  • *
  • Posts: 10
    • View Profile
World Editor "Modex"
« on: 2012-Jul-04 »
I am the author of the editor of the worlds whom I wrote on blitz3d. now I try to write the loader for glbasic,
but there were many problems... I will begin with that the development environment - mistakes very strongly is buggy so many that I wouldn't like at all from here to write, because I think the author and itself about them knows :-)
further there were problems of other plan - there is no similar team as in blitz3d - "scaletexture"
there is no team of rotation of a texture - "rotatetexture"
there is no team of range of distribution of a light source - "lightrange"
well and still there are a lot of small and irritating mistakes :(

http://myblitz3d.narod.ru/modex.html

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1142
    • View Profile
    • My GLBasic code archiv
Re: World Editor "Modex"
« Reply #1 on: 2012-Jul-04 »
In some cases GLB uses a different approach than Blitz, so porting code 1:1 maybe is not the best idea all the time, a redesign may be the better idea, anyway most of what you asked can be done, but it may be not perfect (like beeing slow etc).

Quote
further there were problems of other plan - there is no similar team as in blitz3d - "scaletexture"
there is no team of rotation of a texture - "rotatetexture"
Textures are normal sprites, so you can use them like all sprites and manipulate them. So if you want to stretch or rotate a texture i would suggest to use CREATESCREEN. But if you want to do it many times every loop it may be slow.

Quote
there is no team of range of distribution of a light source - "lightrange"
Yeah but it can be done with Inline and native OpenGL calls. If you know how to use them, look for Attenuation.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Offline L.D.M.T.

  • Mc. Print
  • *
  • Posts: 10
    • View Profile
Re: World Editor "Modex"
« Reply #2 on: 2012-Jul-05 »
language very perspective and quite good, but it needs completion.
glBASIC - the name speaks for itself, that is it should be as
it is simple as well as any other BASIC! but isn't present - here I faced such problems,
what wasn't when studying QBasic, PureBasic, Blitz3d...
it is visible that language still "crude" - many mistakes and up to the end it is not thought over.

here the source code with an example is everything that to me managed to achieve at present :(

http://myblitz3d.narod.ru/glmodex.zip

Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
Re: World Editor "Modex"
« Reply #3 on: 2012-Jul-05 »
Oh I like this stuff!
I'm added a shadow to it.

Download modified project from the attachment



[attachment deleted by admin]

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10697
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: World Editor "Modex"
« Reply #4 on: 2012-Jul-05 »
Are you on the lastest update? Menü: Web/Internet-Update.

Offline L.D.M.T.

  • Mc. Print
  • *
  • Posts: 10
    • View Profile
Re: World Editor "Modex"
« Reply #5 on: 2012-Jul-16 »
Kitty Hello - yes, the version the last.
Albert - thanks for a source code with shadows!

I have some questions:

1) how to me to make analog of the ScaleTexture team (Blitz3d) in Gl Basic?
it will be necessary to use shaders or there are other options?

2) where I can find a source code of export to a DDA format on GLB?

3) why in GLB lighting doesn't affect the created objects?
look at the picture above - the cylinder completely black...

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10697
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
World Editor "Modex"
« Reply #6 on: 2012-Jul-24 »
Hi

I have no idea about the cylinder. If you first enable the light, then render it should work. Are the normals OK?

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5014
  • O Rly?
    • View Profile
Re: World Editor "Modex"
« Reply #7 on: 2012-Jul-24 »
looks like fliped normals on that...
I <3 DGArray's :D

PC:
AMD RYzen 7 1700 @3.9Ghz, 16GB HyperX Fury 2666Mhz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

Offline L.D.M.T.

  • Mc. Print
  • *
  • Posts: 10
    • View Profile
Re: World Editor "Modex"
« Reply #8 on: 2012-Jul-25 »
new demo with shadows - at me they are buggy.
I will repeat - where I can find a source code for export to a DDA format? the specification is written not so clearly.

http://myblitz3d.narod.ru/modexloader.zip

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10697
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
World Editor "Modex"
« Reply #9 on: 2012-Jul-26 »
I don't have anything but the dda specs. What are your problems in detail?

Offline L.D.M.T.

  • Mc. Print
  • *
  • Posts: 10
    • View Profile
Re: World Editor "Modex"
« Reply #10 on: 2012-Jul-28 »
some more questions:
how to load a texture with a mask as on a screenshot?
how to make translucent model as on a screenshot?
why shadows so are buggy? what do I do incorrectly? it is possible to look at a source code in archive above.
when there will be already a support of DDS of textures and format B3D? when I use textures PNG, objects aren't displayed, but the shadow from them falls.

[attachment deleted by admin]
« Last Edit: 2012-Jul-28 by L.D.M.T. »

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3366
  • Integrated Brain
    • View Profile
Re: World Editor "Modex"
« Reply #11 on: 2012-Jul-28 »
The mask you can do it whit a simple .png... If I don´t rebember bad...

About the transparency you can use settransparency, but only works whit minus values, and it´s equal ,0.9 or .0.01

And the shadows you can´t make better, they are at this mode...

Another point for make better things... Take a look to OpenGL, in the forum Gernnot explains very well how call to OPENGL functions... and you can do anything in 3D from GLBasic, not it´s complex, I´m not programmer and I did a mini port of OPENGLES 1.0.... take care, OPENGL not it´s OPENGLES 1.0 , and this it´s different to OPENGLES 2.0... stay sure about your target for the 3D Editor...

Regards