Raycasting 3D render -- Blocks Edition

you could always take the position of the sprite at the end of the frame and compare it to the position the next frame (current position - previous position), then to get the velocity, multiply the calculated value (current position - previous position) by 50 (or the number of screen updates that happen every second).

2 Likes

It is possible to render a ground texture (as seen with KWX’s demo in makecode kart), but Idk how easy it would be to render walls and a floor at the same time (and have them look “connected”). You could have tiles in a tilemap that are set to be walls render like the current renderer does, and tiles that are not set to be walls could render as a floor texture. (just a few ideas, don’t feel too much pressure to implement them @AqeeAqee)

3 Likes

Hello, @AqeeAqee, I really love your extention but I wanted to ask if you could make (or if one already exists) a way to turn raycasting ON|OFF, because the player keeps moving if I, let’s say make a main menu and it is kind of bothering.
Thanks, S0m3_random_guy

1 Like

preview Paticle Effects

Made it !
With somewhat perf cost though, and a littel tremble (might not obvious in this preview)
No new block/func and operation required, just start particle effect with Arcade block, auto takeover also.

5 Likes

preview Walking Sway 2

  • set with this block as well, but 1~2 would be fine, and be float number, eg.: 1.5
  • the ratio of sway L/R and “jump” U/D is 1:3, can be adjust only in my code. To simplify the code and keep perf, they are in difference unit now, L/R is in screen pixel, U/D is in Z dimension pixel(ZOffset/ZPosition)
  • let me know if you feel current ratio is not reasonable or not comfortable.
5 Likes

@jwunderl @CarltonFade @Kiwiphoenix364
Hi guys!
as to the multi-level and floor/ceiling:
Thanks for your valuable suggestions! These will be adopt when I coding them.

I did some test, the FPS will down to about 8 on device/console with just drawing walls twice. So this extension is not fast enough to do these features right now, I think. We can’t add these until perf has a significant impovement some day.
But, I know, these are all attractive features, I love them too. I will do my best to optimize perf furture. I am thinking about a new optimized algorithm based on raycasting. But it is a big change, need some time to rewrite almost ALL the rendering codes of walls, and then check it works or not.
Hope I can made it. :rofl:

And leave your comments above 2 new previews pls. It won’t be merge into the extension, until you are satisfied with these results.

Thanks a lot for your support as always!

5 Likes

Hi @S0m3_random_guy
You mean the “myself” showing before a tilemap loaded, right?
Actually, this fixed in last release, but I found It was covered back by an accident. Will be fixed again in next release.
Sorry for that!

4 Likes

Well done Aqee!

Also, well done on the Camera Sway! It works really well, exactly as I thought it would look!
I’m looking to more of the wizardry you’re able to pull off.

Have a great day!

4 Likes

Go ahead, lol :sweat_smile:

1 Like

Do you think that you could maybe optimize by having a way to like load in walls with rendering? maybe looking like Minecraft’s system of only loading what’s in sight, and the sprites always stay there? idk that’s just a suggestion.

1 Like

Quick question: in future updates would be able to use the p2 controls for looking up and down?
(I won’t be mad/dissapointed if you say no, Makecode has a lot of capabilities, but not really for 3D/2.5D games)

1 Like

I know you’re rewriting the engine (and probably don’t want more suggestions), but it would be nice to have an option to render sideways as well, so you could make a first person 2d platformer!

1 Like

Ah, thanks for your advice for optimaization.
Our Arcade devices has some diff from a PC/Mac, we have no real external storage which will take advantage of loading partial resouces. If some day we can save/load files in SD card, this will be useful.

1 Like

Sorry, not sure your meaning with “sideways”.
Once a time, I tried to play my meowbit turned 90°, like this. Is it what you want?
(just a test at that time, keys doesn’t remapping yet )

2 Likes

p2 controls may be considered to support.
But raycasting can’t looking up/down very well. Maybe a little angle is possible, but not very useful, I thinks.

2 Likes

Yeah, I mean have the option to render it sideways, so you have looking up/down, INSTEAD of left/right, so you are basically the sprite in a platforming game, but you can’t look/move left or right. You can move up/down/forward/backwards instead of left/right/forward/backwards. (Kind of hard to explain, but basically you make the renderer flip the image by 90°.

2 Likes

Sorry, I am still not able to guess out what rendering effect you want. Would like paste a screenshot of that kind of game?
What I imagined is a traditional platform, like mario, but in 3D,something like this:

Yep, that’s what I imagined, but in first person instead of 3rd person.

1 Like

That’s easy, just remove the “person”, right?
But how to play with It?

How would you make a 3rd person camera with this though? Perhaps myself sprite following the sprite you want to control but i can’t figure out how to make directions properly