Mike,
optimized version is in the works.
The worst thing is that you set 2D rendering for EACH tile, better to:
- set 2D mode
- render all tiles
- set 3D mode
- render rest
Plus some more tricks I am working on now, please wait
Bye,
Petr
Hi folks,
attached is a sample code where I draw a map of tiles. I wonder if I have a significant bottle neck here as I think it is damn slow.
If not, then I will try to work with entities on it, but I'm not sure if entities work in 2D mode.
Cheers
Michael
Mike,
optimized version is in the works.
The worst thing is that you set 2D rendering for EACH tile, better to:
- set 2D mode
- render all tiles
- set 3D mode
- render rest
Plus some more tricks I am working on now, please wait
Bye,
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Hi,
here is optimization without entities ( in case you do not want to use them ),
entity version in the works now
Speed gain: 60FPS -> 100FPS on my box.
Petr
EDIT: Updated
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Thanks Petr!
Petr, I tried to download the file but it keeps telling me I am not authorized for this section. Has anyone else had this problem?
Thanks
Sandy
Don't know what happened when I first tried to download but I tried again and got the file.
No, works fine here.
I checked your permissions and they seem ok. If you can see attached files you should be able to download them.
Seems a local problem. try to right-click attached file and choose "save as ...". It is a .tBasic extension file. Maybe some blocks on executing directly from the web page.
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Eros, I tried again and got the file without any trouble. Don't know what happened. It could be a glitch on my end as my server was down for a couple of day. They were putting in some new equipment and there's no telling when they will have their system settled down.
Thanks
Sandy
Hi,
here is entity version attached, again should be faster.
One thing, but I know it is Your script Mike - if you will go the 2D route, it will be again resolution dependant. If you plan it 1024x768 only, then no problem.
Second thing - you originally had V-Sync on, this might hurt performance in some cases ( as says help file :P ). On other side it provides more stable image. You might want to try "Gears Of War" way, where V-Sync is enabled/disabled in dependence on current framerate.
Bye,
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
My results:
Original 100 fps
Opti 1 150 fps
Opti 2 175 fps
All three ran fine, but this will be good code to study to see how done in different ways for sure. Thanks guys!
Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server
Bookmarks