Looking for an alternative to Text

Blitz3D Forums/Blitz3D Programming/Looking for an alternative to Text

vektorDex(Posted 2015) [#1]
Hello, First time posting here.
I'm writing a rather big scale game with Blitz3D and have encountered a bottleneck: Text.
I had FastText in mind but it refuses to work with a "Userlib not found" error, even though DLLs and DECLS are in the Userlibs folder and IDEal has been restarted.

Is anyone using Fontext or can suggest a better solution? Text is a bit crucial for Chat, IDs, and generally getting around to stuff ;)

As Example (Ignore the FPS counter, i screwed up there):



This runs at~12-13 FPS, but after I disable the UI or manually only disable Text, it runs at 60FPS like this:



I hope someone of you can help me a bit,

Cheers, Dex


RGR(Posted 2015) [#2]
You can edit your post - not a big thing - look at forum codes (link above the text input)
This would help to show links and pictures you want to show - or do you really expect that someone copies and pastes all your urls?

DLLs are not to be placed in the Userlibs folder - although it is often mentioned.
DLLs actual place is the folder where the exe is - because they have to be distributed anyway.

Text alternatives: Search the forums for 'pixel perfect' - leads to some 2D in 3D solutions.


stayne(Posted 2015) [#3]
I use draw3d for text - works great and it's fast.

http://www.blitzforum.de/forum/viewtopic.php?t=21659


vektorDex(Posted 2015) [#4]
RGR: Sorry, not used to a different forum Syntax. Didnt see the codes link, thanks for the tip!

Stayne: I'll try that, thanks!


Yue(Posted 2015) [#5]
Const FPS%=60	

tiempo%=MilliSecs()-periodo%
while endGame% = false 
        Repeat  :  elapsed = MilliSecs() - tiempo%  :  Until elapsed
	ticks = elapsed / periodo%
	tween# = Float(elapsed Mod periodo%) / Float(periodo%)
	For k=1 To ticks
		tiempo% = tiempo% + periodo%
		If k = ticks Then CaptureWorld
		;UpdateObjects Here.
            
		UpdateWord
	Next

        renderworld tween#
        flip

wend
end

This can help offset the drop in FPS.


vektorDex(Posted 2015) [#6]
Thanks Yue. Had a look into Draw3D2 and it really helps. Does anyone have an Idea of the licensing? Is it free to use or do I have to pay for it including it in a commercial project?


RemiD(Posted 2015) [#7]
Another approach would be to have one surface + one big texture, and for each area of the screen where you need to draw values/textes/images, have 4 vertices 2 triangles + one dedicated area of the big texture (you can define this with specific uv coords), and each frame update only the necessary areas (and the corresponding areas on the big textures) with rect(),line(),text(),drawimage() depending on if the values/textes/images of this area have been modified or not. This should decreases the mstime it takes to draw/render all these values/textes/images... (also you could disable bilinear filtering in order to have sharper textures (same as images)).


vektorDex(Posted 2015) [#8]
RemiD - Could you point me to where I can disable Bilinear Filtering? Been coding for long but you learn new things every day.


Yasha(Posted 2015) [#9]
Does anyone have an Idea of the licensing? Is it free to use or do I have to pay for it including it in a commercial project?


They don't put it anywhere in the project documentation, but I emailed the author a while back to ask this question and they said it was completely free for all uses.

Explanation of how to disable bilinear filtering here: http://www.blitzbasic.com/Community/post.php?topic=95702&post=1104692
(alternative download)


RemiD(Posted 2015) [#10]
here : see link in my next post


vektorDex(Posted 2015) [#11]
Remi and Yasha: I did try both of your Solutions, but apparently Blitz3D does not like them. "User Lib not found".
I know how to use userlibs, and they're well stashed away in the userlibs folder. Definitions are refreshed, computer has been reset, to no avail. Refuses to load these userlibs.


RemiD(Posted 2015) [#12]
I probably forgot to modify a filename, let me see, and i will reupload a new archive.


RemiD(Posted 2015) [#13]
Ok i renamed some filenames so that you can use it with others userlibs using DX7 functions without any conflicts.
New link : http://rd-stuff.fr/disable-bilinear-filtering-of-textures-201509131549.zip
This should work...


vektorDex(Posted 2015) [#14]
That really is neat and works almost flawless. Wiggling Text is something I should avoid by now, but it really adds up:



Is it possible to exclude stuff from filtering? the grid is really looking awkward in the distance.


stayne(Posted 2015) [#15]
Have you looked at ClearTextureFilters? Also if you want FastExt to work you need to downpatch your blitz3d compiler to v1.106.


RemiD(Posted 2015) [#16]
Yes this looks good, i also prefer to have no filtering on textures, especially if you like to use some surfaces colored only with one color and some surfaces colored with textures, the final blend looks more consistent.


vektorDex(Posted 2015) [#17]
RemiD: Looks like this crashes on Steam, after removing it it runs on steam without a problem.


RemiD(Posted 2015) [#18]

Looks like this crashes on Steam


You mean on the steam store ?
If yes you should probably ask their technical support team. (Tell them you are using a dll with some DirectX 7 functions to disable bilinear filtering of textures, and send them what's in the .decls file, they should understand...). It works well on all computers that i have here (with Windows Xp, Vista, Seven, 8) without any crash.


vektorDex(Posted 2015) [#19]
I'll do, my rep is like a snail on athritis, but I can plug it in once they've fixed it. Once the Steam Overlay Crashes it implodes...