Discuss Scratch

SkeletonWizard
Scratcher
5 posts

How to add stuff in a sprite-based raycaster?

So, I've been trying to make a doom-esque game but can't figure out how to make items appear, nor enemies. Can anyone help?
Link to project –> https://scratch.mit.edu/projects/305127834/

when green flag clicked
forever
if (E=MC2) then
broadcast [Freak Out]
set [SCIENCE] to [Over 9000]
end
end
wayyyy
Scratcher
500+ posts

How to add stuff in a sprite-based raycaster?

One way to display enemies is to do it the same way you did the level. Create a sprite that is a block, and have it act like the same as the map sprite except that it can move, and chance your rendering engine so that it can see the enemy, along with the map.

I would recommend the enemy be a different color from the wall, and having it be a clone, so that things like having it's own hp, and deleting it is easier.


13855907337635093928512657233170943934485827951262112803170447238432875890
Key: 23

SkeletonWizard
Scratcher
5 posts

How to add stuff in a sprite-based raycaster?

Thanks! So I add a sprite that will be in the map as an enemy, & judging by the distance from the player I switch out the sprite!

Also, I hate Fortnite

Last edited by SkeletonWizard (May 27, 2019 13:32:37)


when green flag clicked
forever
if (E=MC2) then
broadcast [Freak Out]
set [SCIENCE] to [Over 9000]
end
end
SkeletonWizard
Scratcher
5 posts

How to add stuff in a sprite-based raycaster?

P.S. What about items? &… I can't figure out the code

Last edited by SkeletonWizard (May 27, 2019 13:33:05)


when green flag clicked
forever
if (E=MC2) then
broadcast [Freak Out]
set [SCIENCE] to [Over 9000]
end
end
Ender_bro_06
Scratcher
29 posts

How to add stuff in a sprite-based raycaster?

.

Last edited by Ender_bro_06 (May 27, 2019 22:32:13)

Ender_bro_06
Scratcher
29 posts

How to add stuff in a sprite-based raycaster?

wayyyy wrote:

One way to display enemies is to do it the same way you did the level. Create a sprite that is a block, and have it act like the same as the map sprite except that it can move, and chance your rendering engine so that it can see the enemy, along with the map.

I would recommend the enemy be a different color from the wall, and having it be a clone, so that things like having it's own hp, and deleting it is easier.

SkeletonWizard wrote:

Thanks! So I add a sprite that will be in the map as an enemy, & judging by the distance from the player I switch out the sprite!

Also, I hate Fortnite
i hate it to
098765432154321
Scratcher
100+ posts

How to add stuff in a sprite-based raycaster?

Ender_bro_06 wrote:

.
What?

Powered by DjangoBB

Standard | Mobile