Playdate graphic api?

hello everyone ,

i will maybe try to make a playdate game with pulp but i have a question ,
i know that there is a api for lua and another for c , and know that playdate have no gpu
but my question is , does the playdate have is own api like vulkan or opengl ?

Lua API documentation: Inside Playdate .

C API documentation: Inside Playdate with C .

Both of the above are also included with the SDK download.

If you're asking if the Playdate has a 3D API, the short answer is 'not really'.

There's an 3D Library example that can be used for 3D renders (though the camera implementation has issues that IMO make it impractical for use for other things), there's also some 3D mathstuffs tucked away in PlaydateSDK\Corelibs\3d.lua . But there's not anything like vulkan/opengl in the SDK itself.

Various folks have ported or otherwise rolled their own raycasting (2.5D ala Wolfenstein 3D) and 3D libraries, however. These tend to be written in C to be able to achieve acceptable performance on the Playdate.

thanks for your response

so they don't have a 3d api , but we can with 3d library and c api . ok

but if we can display 2d games with the playdate on the os , did they have a 2d api like direct2d of directX in windows ?

i mean Lua API and C API are not the only api to display , play , and make games with the playdate os ?

Yes, you can read about the 2D graphics API here: https://sdk.play.date/2.1.1/Inside%20Playdate.html#M-graphics Lua link

It very similar to Love2D, but there are some differences.

There is no GPU in the Playdate so all graphics are drawn through software.

i'm understand , i already know that there is 2 api , lua api (like you said something like love2d) and c api .

but understand me , is this 2 api (lua and c) are the only way in playdate os for all we do in with the system and the console ?

"Yes"

I find Lua very flexible because I can layer images and use masks and shapes and fills and so on. I can do everything I need to.

Some people who use C use little of the SDK and do everything their own way even writing their own line algorithms or screen blitting.

Some people have created API for Rust, Nim, etc but I think they piggyback C.

What are your goals and/or concerns?

ok now i understand there is no graphical api on the console or the system , thank you

my goal is to see pulp and how it work and after how c api works , and try to make a prototype of my game in lua and c api too

1 Like

I'm unclear about why you say "there is no graphical API" what do you mean?

From my perspective there is a graphics API. Indeed, I use it to draw all the graphics in my games.

So maybe I'm misunderstanding what you mean? Can you give an example of the type of API call/function you think is missing? @dark-case

ok i will try to do my best to be clear

in typical operating system you have 3D graphics libraries , like directX for windows , vulkan for android

so i wanted to know is there is something similar in the playdate operating system even if there is no gpu

you have say no there is not , so i have understand that on the playdate operating system Lua api and C api replace the api like directX on windows

I'm still confused. I'm sorry :sweat_smile:

I have said - yes - there is a graphics API, for 2D graphics.

It's available in both the Lua and C Playdate API.

The Playdate SDK API also includes sound and file handling and more. So it's more similar to DirectX (which does 2D, 3D , sound, etc) than Vulkan (which is only 3D afaik)

I would say they are equivalent.

ok now i'm understand thank for your reponse and to tengu too

it will help me better and a lot to begin a game for the playdate

1 Like