evanbowman/BPCore-Engine

Some advices.

zxsean opened this issue · 5 comments

Dear Evan,
I summarized some problems in use before talking to BPCore and https://github.com/GValiente/butano,

Because my daily work is Lua.
In terms of language selection, BPCore is a better choice. Thank you for sharing BPCore.

After using it for 2 days, I found some inconveniences in development.

But in use, I think this part of the problem can be corrected through the py tool chain.

1,
the format of the picture
In BP, I want to use some pictures. I need to process the pictures into a specific format. This part can actually consider using the tool chain.

2,
In the use of some functions, the interface part is not as good as butano. Especially when I try to use BP to make an avg demo that requires frequent use of FULL-SCREEN pictures. Similar to https://kva64.itch.io/advance-demo-adventures- of-the-math-logic-club, I found that I have to deal with a lot of things in some seemingly simple effects.

I fixed a few bugs, and created a new release that makes it easier to draw images. Example here: https://github.com/evanbowman/bpcore-simple-image-demo

There's still a limitation in the engine, where you cannot draw a fullscreen image in a single layer. The GBA hardware in fact cannot draw a fullscreen image with one tile layer, so neither can this engine. You could, for example, use two tile layers if you want to draw a fullscreen image. I could edit the build script to make it easier.

This latest release allows you to use tilesets larger than eight pixels tall. For tilesets larger than eight pixels, the image will be sliced and meta-tiled:

For example, given a 32x16 pixel image, (4x2 tiles), the build script assigns increasing tile numbers from left to right for the first row, then assigns tile numbers to the next row, etc.
0, 1, 2, 3,
4, 5, 6, 7,

so an image can be draw with a simple for loop:

function draw_img(layer, x, y, w, h)
   local t = 0
   for yy = 0, h - 1 do
      for xx = 0, w - 1 do
         tile(layer, x + xx, y + yy, t)
         t = t + 1
      end
   end
end

A fullscreen image will be more difficult, due to hardware limitations that prevent drawing a fullscreen image with one layer. I'll think about ways to make it easier.

Fullscreen image demo, in 39 lines of code:
https://github.com/evanbowman/bpcore-fullscreen-image-demo/blob/master/main.lua

I understand that needing to use two tile layers is inconvenient, I haven't decided yet whether to make changes to the engine, or to add extensions to the build.lua script for splitting an oversize image into two files.

Fullscreen image demo, in 39 lines of code:
https://github.com/evanbowman/bpcore-fullscreen-image-demo/blob/master/main.lua

I understand that needing to use two tile layers is inconvenient, I haven't decided yet whether to make changes to the engine, or to add extensions to the build.lua script for splitting an oversize image into two files.

Thank you very much for your enthusiastic answer. I am currently trying to port one of my C++ GDI Game that I wrote a long time ago. https://github.com/zxsean/MyRpgmaker

Hello,

First of all, thank you for this Lua portage. I’ve done one single player game and it works well !

There isn’t any project sample with network, only snippet.
Can you do one to follow the good way to do it ?

Regards,
Tchaly

EDIT : _IRAM/_SRAM were both nil, I updated my version of BPCoreEngine.gba and my build.lua and it worked. :)