Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Come back... and need help

Author
Message
DrFloyd
3
Years of Service
User Offline
Joined: 12th Feb 2021
Location:
Posted: 12th Feb 2021 16:04
Laurent from France, hello, I try to speak english

I bought the first and original DARK BASIC... my god... in 2000 ? Can't remember ! Have made 2 little games for fun

I come back today with 20 years more, and with DARK BASIC PRO. Forgotten lot of thinks... I have some questions :

IMAGES
It is not possible to rotate, flip images ???? I see it can be done with Sprites, but sprites are not a good idea for raising a tilemap

.EXE
Is it possible to hide IMAGES and SOUNDS into the EXE in order to have only one file ?

ANTIALLIASING
When a choose a virtual resolution, like 320x200, the image is anti alliased, it is horrible. Is it possible to have pixel perfect ? (i have tried some basics where it is pixel perfect for any virtual definition (Naalaa, RC Basic) and it was a great feature)

RUMOR
On Wiki i see that DARK BASIC is very slow ? Is that true ? I have tried to move lot of images for testing and it was very fast (ok on an i7)

LIMITS
No limits for the nb of images ? of code ? of RAM ?

Thank you by advance to the specialists who can answer
Laurent
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 13th Feb 2021 05:56
Quote: "
IMAGES
It is not possible to rotate, flip images ???? I see it can be done with Sprites, but sprites are not a good idea for raising a tilemap

There's no convenient built in method i don't think but you can manipulate the data in a memblock

.EXE
Is it possible to hide IMAGES and SOUNDS into the EXE in order to have only one file ?

Yes I'm pretty sure you can add them in the project and build a single exe, not positive though

ANTIALLIASING
When a choose a virtual resolution, like 320x200, the image is anti alliased, it is horrible. Is it possible to have pixel perfect ? (i have tried some basics where it is pixel perfect for any virtual definition (Naalaa, RC Basic) and it was a great feature)

There is a plugin that will help you here, i feel like it was posted in the WIP board, I'm pretty sure i have a copy saved off but I'll have to look for it a bit

RUMOR
On Wiki i see that DARK BASIC is very slow ? Is that true ? I have tried to move lot of images for testing and it was very fast (ok on an i7)

It's slower than straight up c++ yes but it isn't all that slow relatively speaking. Agk and other interpreted languages are slower than dbpro. A lot depends on what you are trying to do and how optimized your code is

LIMITS
No limits for the nb of images ? of code ? of RAM ?

The only real limit is that dbpro is 32bit, this means 2gb of memory, though you can extend this to 4gb when running in 64bit OS by making the exe large memory address aware (third party utility)


"
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
DrFloyd
3
Years of Service
User Offline
Joined: 12th Feb 2021
Location:
Posted: 13th Feb 2021 07:50
thank you for this first reply

for all in one EXE, no antialliasing i will open a thread into HELP section
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 13th Feb 2021 12:19
Quote: "IMAGES
It is not possible to rotate, flip images ???? I see it can be done with Sprites, but sprites are not a good idea for raising a tilemap
"


Dark BASIC Professional has no built-in Commands for Transforming Images., however you can edit them via Memory Blocks (Memblocks).
I'm off work tomorrow, so I'll write some functions to provide Common Transformation on Images for you... as it's not that difficult, just a little time consuming.

Quote: ".EXE
Is it possible to hide IMAGES and SOUNDS into the EXE in order to have only one file ?"


Of course., it's one of the Project Settings.
If you look on the Left-Hand of the Editor, at the bottom are Tabs; one of them is called Properties.
This let's you change the Project Properties., simply change the application type from Exe to Media and anything you add to the Media Tab will be Compiled into the .Exe F

Quote: "ANTIALLIASING
When a choose a virtual resolution, like 320x200, the image is anti alliased, it is horrible. Is it possible to have pixel perfect ? (i have tried some basics where it is pixel perfect for any virtual definition (Naalaa, RC Basic) and it was a great feature)"


Dark BASIC Professional doesn't produce Virtual Resolutions., everything it outputs is Native.
It also doesn't support Anti-Aliasing... the effect you're descripting isn't so much Anti-Aliasing but rather is a simple Bilinear Filtering (Blur) on the Upscaled Image.
Keep in mind that DirectX 10 and later no longer support Resolutions below 640x480 Natively., instead it will Render (Off-Screen) to a Texture that is put on a Plane with Texture Filtering producing the unpleasant result you're experiencing.

Now you can either:
(1) Use a Higher Resolution
(2) Use a Higher Resolution for the Application., but Render (use a Bitmap) at the Lower Resolution; then manually Render it to a Plane that upscales it with Filtering Disabled.

Of course keep in mind that with the latter solution you will have a disparity between the Aspect Ration, so the image will appear to be stretched... to offset this., what I'd recommend is creating a Memblock Image with the Output Resolution (say 640x480) then pad ("Letterbox") with Black Pixels copying the Native (320x200) using a 2x2 Pixel Stepping approach.

Again, I can write an example up to showcase what I mean tomorrow.

Quote: "RUMOR
On Wiki i see that DARK BASIC is very slow ? Is that true ? I have tried to move lot of images for testing and it was very fast (ok on an i7)"


Dark BASIC v1 (aka Classic) was an interpreted language., and could be slow... although ironically not AS slow as AppGameKit is.
Dark BASIC v3 (aka Professional) is a compiled language and while it's not as fast as various other Compiled Languages (C, C++, PureBASIC, BlitzMax)... it's pretty decent in terms of performance.
But it does lack Multi-Threading, SSE3, FMA, etc. support... so it's not quite AS fast as it could be.

Quote: "LIMITS
No limits for the nb of images ? of code ? of RAM ?"


You're limited to a 32bit Unsigned Integer of Asset IDs for each Asset; with the exception of Bitmaps (only 8 Rendering Targets at one time, this is a limitation of DirectX 9.0c) and 32 Memblocks at once, which HAVE to be created in order.
Beyond that Update 7.0 added support for 64bit Windows / CPUs thus increased the System Memory supported from 4GB to 1.86TB and VRAM you've never had a limitation beyond what the GPU has available.

In essence most limitations are either imposed by DirectX or Hardware.
DrFloyd
3
Years of Service
User Offline
Joined: 12th Feb 2021
Location:
Posted: 13th Feb 2021 12:37 Edited at: 13th Feb 2021 12:39
Fabulous for hidden images and sound !!!!!!! Great new for me ! Thank you so much Raven,

and thank you for looking how to flip/mirro images (rotate is optional, not really need)
it will be a great feature if implemented on a future version of DBpro
DrFloyd
3
Years of Service
User Offline
Joined: 12th Feb 2021
Location:
Posted: 13th Feb 2021 12:41
About the speed of DB

I suppose wiki was talking about the first version of DB

Indeed DB pro is very fast !
I have made a game with PURE Basic (very very FAST) but the DB Pro seems as fast !

Perfect anyway to do retro 2D games
DrFloyd
3
Years of Service
User Offline
Joined: 12th Feb 2021
Location:
Posted: 13th Feb 2021 12:52
About the blur in low res, I am curious to know how Naalaa basic and RC basic do to have pixel perfect in any resolution ?
you can choose 200x100, 320x200, 300x250 : there is on blur, the pixels are perfect.
I suppose they have develop that with virtual resolution ????

I dont't know if i want to do double size pixels (2x2 pixels)... it is boring

perhaps just render the image into a plane (even if the image is stretched)... but i have NO IDEA how to do that... and the impect on my game... if it generates lot of complications i prefer to forget

Some resolutions are about correct, like 400x280, the blur is less visible
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 15th Feb 2021 00:22
Mirror / Flip Image (this is a "Simple" Version)


And the Image I used for testing


I'll post the upscaler tomorrow, as turns out working a 50hr+ week... kinda makes you tired and I basically ended up sleeping the whole day >_<
Having this week off is going to be awesome to catch up on rest and relaxation
DrFloyd
3
Years of Service
User Offline
Joined: 12th Feb 2021
Location:
Posted: 15th Feb 2021 06:57
whaouu il will check tonight !(as i also work
Thanks, hope it will be usefull for lot of developers here ? It should be a native command for a future DBP version

Cannot wait for the upscaler of low resolutions without blur ! It is the real feature that i need to dev my first game

I am surprise there is no official tuto for this as now there are so many commercial games with very low resolutions (for example on Switch or Steam)
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 15th Feb 2021 13:28


Of course this will be much faster in C++ as a Plug-In... and the Display Resolution will have a clear affect on the Performance
Still this is more or less a "Proof of Concept" for how to handle a Virtual Resolution (and within DBP itself... no external trickery)

It could be further Optimised and Cleaned up to be Function Calls handling it to be _almost_ invisible in the main code.
But that said, the Low Framerate is also quite "Retro"
DrFloyd
3
Years of Service
User Offline
Joined: 12th Feb 2021
Location:
Posted: 15th Feb 2021 17:24
Whaouu, it works, need to understand now, and check if it is slow or not for my project (suppose it's ok)

Thank you again

Login to post a reply

Server time is: 2024-04-14 08:39:51
Your offset time is: 2024-04-14 08:39:51