Search found 239 matches

by Westbeam
Apr 22, 2016 11:40
Forum: Tips and Tricks
Topic: 2D shadows
Replies: 14
Views: 1994

Re: 2D shadows

Thank you for all the help :) @Peters: You are right, here is a new code: ScreenRes 800,600,32 Randomize Const Light_Range=1000 Const cubes=5 #Include once "fbgfx.bi" #Define Get_R(a) ((a shr 16) and 255) #Define Get_G(a) ((a shr 8) and 255) #Define Get_B(a) (a and 255) #Define Get_Ptr_Siz...
by Westbeam
Apr 17, 2016 13:18
Forum: Tips and Tricks
Topic: 2D shadows
Replies: 14
Views: 1994

Re: 2D shadows

I know, my code-style is horrible. Normally I use UDTs. But in this quick concept I have left it out. It is nothing I want to use in my bigger projects. ;)
by Westbeam
Apr 17, 2016 11:25
Forum: Tips and Tricks
Topic: 2D shadows
Replies: 14
Views: 1994

2D shadows

Good morning coders :) I made realtime shadows for 2D games today: http://fs5.directupload.net/images/160417/vm8brpcz.png Here is the code: ScreenRes 800,600,32 Dim As Integer mx,my Const Rad2Deg=45.0/Atn(1) CONST PI AS DOUBLE = ACOS(0)*2 Randomize Dim As Integer cubex(4),cubey(4),cubexscale(4),cube...
by Westbeam
Mar 24, 2016 15:00
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 956
Views: 199662

Re: MiniB3d for FreeBasic

Awesome. It works now. Thank you St_W!
You're my hero :*
by Westbeam
Mar 24, 2016 12:12
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 956
Views: 199662

Re: MiniB3d for FreeBasic

Tried it with 0.3 and 0.9, both don't work. :/
by Westbeam
Mar 24, 2016 11:34
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 956
Views: 199662

Re: MiniB3d for FreeBasic

No, same error. I get many warnings when he needs to compile to ".o" first: g++ -Wall -O3 -c model.cpp -o model.o g++ -Wall -O3 -c string_helper.cpp -o string_helper.o g++ -Wall -O3 -c surface.cpp -o surface.o g++ -Wall -O3 -c bank.cpp -o bank.o g++ -Wall -O3 -c bone.cpp -o bone.o bone.cpp...
by Westbeam
Mar 24, 2016 6:56
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 956
Views: 199662

Re: MiniB3d for FreeBasic

Still doesn't work. Same error :/
Tried it with the "model.cpp" from 1.1
by Westbeam
Mar 23, 2016 20:32
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 956
Views: 199662

Re: MiniB3d for FreeBasic

The same error sadly :/
by Westbeam
Mar 23, 2016 15:06
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 956
Views: 199662

Re: MiniB3d for FreeBasic

Hmm, I'm trying to compile the library for Linux 64bit, but I get some errors: $ make g++ -Wall -O3 -shared -o libOpenB3D.so model.o string_helper.o surface.o bank.o bone.o brush.o collision.o entity.o functions.o geom.o global.o light.o matrix.o pick.o pivot.o project.o sprite.o tilt.o touch.o text...
by Westbeam
Feb 02, 2016 12:33
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 956
Views: 199662

Re: MiniB3d for FreeBasic

Is it possible to get the "AlignToVector"-function ? I tried to add it in the header, since I found the function in the sourcecode in "entity.cpp": declare function AlignToVector cdecl alias "AlignToVector" (byval ent as any ptr, byval x as single, byval y as single, by...
by Westbeam
Aug 19, 2015 18:43
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 956
Views: 199662

Re: MiniB3d for FreeBasic

Awesome it works. I just changed the "BackBufferToTex" to "CameraToTex". You are an angel angros, thank you : - )
by Westbeam
Aug 16, 2015 18:21
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 956
Views: 199662

Re: MiniB3d for FreeBasic

Hey hello :) I got a new problem with a bloom-effect I tried to copy from here . I already talked to the creator of that demo, but he couldn't help me and I guess it's the difference between minib3d and OpenB3D, since it works for him with the same code. I want to add a bloom-effect to make the scen...
by Westbeam
Apr 05, 2015 7:14
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 956
Views: 199662

Re: MiniB3d for FreeBasic

Ah, awesome. Thank you :)

But I got two questions:
How do I add my lightsmap(like in my example)to the mesh?
It seems like the light "fades out" of the mesh, when I move the camera. How do I remove that?
Sorry, I am not very experienced with shaders. :/
by Westbeam
Apr 04, 2015 20:16
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 956
Views: 199662

Re: MiniB3d for FreeBasic

Is there a way to get the normalmapping right?
by Westbeam
Apr 04, 2015 8:47
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 956
Views: 199662

Re: MiniB3d for FreeBasic

I have no normalmapping at all, when I invert the colors.
When I invert the whole image, the normalmap-texture is simply upside down on the mesh.

EDIT: I wrote a little example which shows the problem:
Download

Go to advanced search