Raycasting 3D render -- Blocks Edition

Oh, side move would be release next version, in fact, in which I plan to add a block to turn off move control inside extension, and then you can do it by the traditional “move sprite with buttons”.

1 Like

Awesome! Then we will be able to change the speed, and limit directions for specific games!

2 Likes

Hi @brandodon
This is for your requirement, the strafing:

image

1 Like

Hi guys, Raycasting V0.3.4 released
I am sure the interfaces is what you want or not, or is convenience for your projects.
Let me know please, if you have any idea about it, or any feature you want in the future version.

add following blocks:
image

image

image

And some of function name changed slightly, sorry.

BTW, the SayText have to be release in next version.

3 Likes

Hi all:
Just released a new version v0.3.6, thanks for @jackal’s feedback above.

Changes:

  • changed project name back to “pxt-raycasting”
  • add shadow picker for speed value in block
  • fixed a little bug of drawing
2 Likes

Oh, sorry for that!
It may be caused by differrent project names, I renamed in branch, and forgot to change back when merge. It doesn’t cause error in my test project, so I missed it.
Try to delete the jump-raycasting ext please, and upgrade again please, the new version should be v0.3.6

So sorry for that again!
Let me know please if it fixed.

1 Like

released v0.3.7
Changes:

  • Anti-alias of walls, after involved wallscale and view point floating (at self sprite)
  • setZOffset doesn’t work, if existed in array already

And here is a demo of jump function in js code.
(Hold A+B press up/down can adjust wallscale at runtime)

7 Likes

I can see the extension in the files of the game, but it doesn’t show up on the sidebar, do you know why?

1 Like

I opened the url you paste, all’s well. Weird, no idea.
Any one here met this before?

1 Like

wait a minute. HORROR GAME TIME!

4 Likes

Lol, really? :joy:

1 Like

yes… hehehehehehehehehehehehehehehehehehehehehe

1 Like

oh. thank you very much I have been trying to put that in the block but it keeps giving me an air. but now you figured it out for me. Thank You :smile:

2 Likes

v0.3.9 released , with 2 valuable features:

support for sprite.sayText() of Arcade

  • create sayText as usual, auto takeover by extension
  • no new block or extra action needed
  • auto scaled depending on distance of sprite
  • Note: have to sign the “timeOnScreen” value, for it has no default value, though it’s optional.
  • Note: doesn’t support sprite.say() which has been deprecated already.

new block to check overlap in Z dimension

  • block: “ is Sprites (sprite1) and (sprite2) onverlap in Z dimension
  • or function: “isSpritesOverlapZ(sprite1, sprite2)”
  • best work with original “ on spirte kind overlaps other kind ”, which worked at X&Y dimension.

image

3 Likes

Hi, all
Just released v0.3.10, with follwoing improvements & small fixes:

  • add variable block: “set mySprite to (myself sprite)”, for convenience and consistent with usage of sprite blocks
    image

  • perf improvement a little, sprites render filtered by horizontal view sector

  • fix, not all sprites be takeovered at once

  • fix, takeover myselft sprite after create

  • fix setValue block, set fov may ruin wallZScale

  • fix jump effect overrided by setZOffset

  • fix a change of first row of a wall painted wrong size caused by anti-alias

  • fix, sprite.sayEndtime=undefined when takeover.

  • fix, draw sayText, if sayEndtime=undefined

BTW, I miss understood logic of “no default value” in last post, sayText was drawn unlimite time if thimeOnScreen not provided.

Just update to new version if you met these issues. No new demo yet.

Import this extension with URL:
https://github.com/AqeeAqee/pxt-raycasting/, or “AqeeAqee/pxt-raycasting” for short.

3 Likes

Here is a great raycasting game made by @CarltonFade
Almost all game elements involved, a good expample project for all.
Thanks @CarltonFade.

The Gun Game:

10 Likes

whoa… this is way better than stalker

2 Likes

Hi all
v0.3.13 just released. No new feature, and No bug fix, so update is not required.

Changes:

  • add help docs for all blocks (open right-click-menu on block and choose help)
  • rename repo to lowercase: pxt-Raycasting → pxt-raycasting
  • SetAttribute() rename to setAttribute()

If you updated:

  • there will be two extension “pxt-Raycasting” and “pxt-raycasting”, delete previous one please.
  • update setAttribute() name in your codes if there is.
2 Likes

Good News !

This extension has been approved and added into the Preferred Extionsions list.

So searching by URL not required any more, raycasting icon shows up in the list when the extensions page opened, and could be chosen by a single click.

Thanks you all who using this extension, your “usings” make this happen!

Great thanks to @jwunderl Joey, for your trust and proposal, and kindly support during the process. It’s my honor, this extension can be listed along with those wonderful extensions together. And absolutely, I would always keep on making it better!

At last, I would like to say again: Thanks Makecode team made this happy land for all-age-programmers!

14 Likes

Hello again!

Just wanted to ask, how close is this plugin to being completed?

1 Like