|
Post by kennn on May 25, 2020 18:55:33 GMT -6
Hello, I have read a very old post about sprite rendering in another forum: forums.indiegamer.com/threads/the-2006-2d-sprite-render-test.7551/Since RCBasic, SDLBasic and NaaLaa are very similar programming languages(they look like classmates), I want to ask a question. Is RCBasic faster than SDLBasic and NaaLaa in sprite rendering? Thanks first.
|
|
|
Post by n00b on May 25, 2020 20:05:59 GMT -6
Thats actually a good question. I have used sdlBasic and NaaLaa before and the simple answer is NaaLaa but there is a little bit more to it.
I have mentioned before that rcbasic is built on the SDL2 API which is faster than SDL. But sdlBasic could technically render sprites at a faster frame rate than rcbasic because rcbasic enables vsync on a window when it opens and sdlbasic makes this optional. But with more sprites rcbasic will still beat sdlbasic once the fps drops below the refresh rate of the display.
NaaLaa is unique in that it uses a custom renderer which I believe is based on pure opengl. This will give it a critical speed advantage. NaaLaa also exposes the VM assembler which allows you to do more optimizations and performance tweaks. The downside is that it is much more complex code than what you would normally see in rcbasic or sdlbasic. But if you optimize your code well to take advantage of the strengths of rcbasic or sdlbasic you could beat a standard NaaLaa program.
All 3 have unique advantages but you have to really dive into the documentation for each and optimize to take advantage of the unique features of that specific language to really get the most out of it.
|
|
|
Post by johnno56 on May 26, 2020 1:17:24 GMT -6
I just finished watching a youtube video of the History of first person shooter games from 1973 to 2019. Watching the progression from simple vector-like lines all the way up to hyper-realistic #D type graphics was really interesting. But, what's this got to do with RC, SDL and Naalaa, you might ask?
N00b is right in regards to SDL and RC. I am running with SDLBasic (2007 Linux version) that includes SDL1.2... It's now 2020 and SDLBasic 'still' does not have SDL2.0 even though it has been available since 13th August 2013. Naalaa version 6 was released on the 22nd of August 2016 and makes use of openGl and as a result has an advantage of rendering speed. RC is newer that SDLBasic but renders graphics a little differently to SDLBasic but does it quicker...
The history of FPS games was interesting because each game became better and the rendering became faster as the years and machines progressed. This may be my point. Comparing 3 "basic" style programs, that were created at 3 different times, I'm going to assume that they would be running the same games... Not a fair test. In the sense that all three have different methods of rendering. My version of SDLBasic is 13 years old and uses the ancient sdl1.2... RCBasic sdl2.0... Naalaa uses opengl... "Apples and Oranges". The skill is in "how" each of the engines are programmed. How to find the best way to operate within the limitations of each engine to produce a result that doesn't look like a "stop motion" video...
All 3 are indeed "unique". All three will have both advantages and disadvantages over each other. I usually re-create RC games with SDL, just to compare performance and to just see if I can... the 1945 game that I made was a conversion of Naalaa. Conversions are not always possible and the results of conversion may differ, but that's the fun and challenge of using all three. If and when I get ideas for a game, I will use which ever engine will produce the results I'm looking for... Of the three, I would favour RC, mainly because it performs better than SDL... Naalaa has a Raycast and Tilemap editors bundled... When and if RC and SDL acquire the same, maybe 'then' it would be a fair comparison...
I need coffee... too much thinking (stop laughing... lol)
|
|
|
Post by n00b on May 26, 2020 13:27:59 GMT -6
Naalaa has a Raycast and Tilemap editors bundled... When and if RC and SDL acquire the same, maybe 'then' it would be a fair comparison... You can actually use these editors with any language. The maps they generate are just text files.
|
|
|
Post by johnno56 on May 26, 2020 16:46:34 GMT -6
I didn't know that... Cool... I detect an experiment coming on... lol
|
|
|
Post by johnno56 on May 26, 2020 17:34:57 GMT -6
Ok. Both the raycaster and tilemap editors ran without error and both produced the expected results. N00b, you were correct about them producing text files... There are sections of the raycaster file that I could follow but some of the data I could not. I checked the raycaster application for a "save function", which it had, but it pointed to a _savefile command that seems to be part of another library... More research is needed... but I suspect a bit of a rabbit hole... lol test01 (3.18 KB) This is the test file I created. As you can see, with knowing "how" the file is saved, we may be trying to push water up hill... lol J
|
|
|
Post by n00b on May 26, 2020 21:09:42 GMT -6
This would be a fairly challenging project but its definitely possible. It uses the GLOOM library that is bundled with Naalaa to render the map. This library is a good example of some of the unique features specific to Naalaa. It makes heavy use of Naalaa's inline VM assembler to do calculations for texture mapping. And it uses UDTs(User Defined Types) to store the data. But the biggest hurdle is it uses DLL calls to run compiled C++ code for certain routines. This library takes full advantage of every feature Naalaa has.
Basically, this would be a pretty advanced project. I don't really expect anyone to be able to do this but I think it would be a way to challenge yourself if you want to try. I will add this to a list of projects to attempt when I get the time.
|
|
|
Post by kennn on May 26, 2020 22:34:15 GMT -6
noob,Thats actually a good question. I have used sdlBasic and NaaLaa before and the simple answer is NaaLaa but there is a little bit more to it. I have mentioned before that rcbasic is built on the SDL2 API which is faster than SDL. But sdlBasic could technically render sprites at a faster frame rate than rcbasic because rcbasic enables vsync on a window when it opens and sdlbasic makes this optional. But with more sprites rcbasic will still beat sdlbasic once the fps drops below the refresh rate of the display. NaaLaa is unique in that it uses a custom renderer which I believe is based on pure opengl. This will give it a critical speed advantage. NaaLaa also exposes the VM assembler which allows you to do more optimizations and performance tweaks. The downside is that it is much more complex code than what you would normally see in rcbasic or sdlbasic. But if you optimize your code well to take advantage of the strengths of rcbasic or sdlbasic you could beat a standard NaaLaa program. All 3 have unique advantages but you have to really dive into the documentation for each and optimize to take advantage of the unique features of that specific language to really get the most out of it. Wow!! You explained in detail. Thanks a lot. I want to ask a question. You said that RCBasic user could not change vsync setting of RCBasic. Thus all games made with RCBasic are normally run at 60FPS? Another question,....will you make the future version allow RCBasic users to change the vsync setting? It will be possible for users to make examples to compare speeds of different languages easily. johnno56,The history of FPS games was interesting because each game became better and the rendering became faster as the years and machines progressed. This may be my point. Comparing 3 "basic" style programs, that were created at 3 different times, I'm going to assume that they would be running the same games... Not a fair test. In the sense that all three have different methods of rendering. My version of SDLBasic is 13 years old and uses the ancient sdl1.2... RCBasic sdl2.0... Naalaa uses opengl... "Apples and Oranges". The skill is in "how" each of the engines are programmed. How to find the best way to operate within the limitations of each engine to produce a result that doesn't look like a "stop motion" video... Hello, I understand this point now. The three programming language softwares belong to different eras.... That's why you became a senior expert of these three programming languages!! Raycast and Tilemap editors of NaaLaa look very interesting and very convenient! Sure!!!!
|
|
|
Post by n00b on May 27, 2020 23:39:55 GMT -6
I want to ask a question. You said that RCBasic user could not change vsync setting of RCBasic. Thus all games made with RCBasic are normally run at 60FPS? Another question,....will you make the future version allow RCBasic users to change the vsync setting? It will be possible for users to make examples to compare speeds of different languages easily. I don't plan on adding any new features or changes for a long time. I will be doing bug fixes as they come up and I will be trying to improve the web port as much as possible but thats about it for the time being.
|
|
|
Post by marcus on Mar 26, 2022 9:53:40 GMT -6
(Bump!)
Actually, NaaLaa has always been using a homemade software renderer. That is, all blitting is done on the cpu.
|
|
|
Post by kennn on Apr 1, 2022 16:17:16 GMT -6
(Bump!) Actually, NaaLaa has always been using a homemade software renderer. That is, all blitting is done on the cpu. Hi, (Are you the author of NaaLaa?) Good!! You are very welcome to join this forum. Actually, this official RCBasic forum is an active forum!
|
|
|
Post by n00b on Apr 1, 2022 18:52:26 GMT -6
(Bump!) Actually, NaaLaa has always been using a homemade software renderer. That is, all blitting is done on the cpu. I stand corrected. I think I was going off a post someone made about NaaLaa on another forum when I said it was using OpenGL. Its impressive what it can do with pure software rendering.
|
|
|
Post by rosy on Apr 2, 2022 3:45:37 GMT -6
What's the problem to do the tests?
|
|
|
Post by aurel on Apr 3, 2022 0:52:12 GMT -6
test it
|
|
|
Post by kennn on Apr 3, 2022 1:56:33 GMT -6
What's the problem to do the tests? Hi, We wanted to compare the speeds of these three programming languages. Do you have any good idea to make a simple test to compare their speeds?
|
|