Game Dump

A bunch of games I made during this Semester, just dumpin’ them here for people to play. Let me know if there’s anything I can fix or add to these games. Also thanks to AqeeAqee for the raycasting extension. I was stuck on making 3D games in Makecode for a solid 2 months and since I don’t know much Javascript, it really saved some projects.

  1. Funny Fighting https://makecode.com/_TX40qVEReb5J
  • Its just a stupid concept I made based off another stupid concept. (It was suggested that the first character in this game be Seth Rogen)
  1. Gun Game https://makecode.com/_dihERkhbC91E
  • I wanted to make a Doom game, but when I found Aqee’s Raycast extension there was only 2 weeks left in the Semester, and I had already spent 2 months on the same concept and it failed. Thank you Aqee!
  1. Balloon Tower Defense https://makecode.com/_hTLMuEFtPJbC
  • Main project, but I completed it in 2 weeks. Oops!
  1. Paint https://makecode.com/_h7LU8wLagbsJ
  • Made this because the instructor couldn’t figure out how to make a painting game.

Thats all of them, for now at least. Enjoy!

6 Likes

Wonderful games!
Love the Gun Game (of course :smiling_face:). Almost all game element included into this game. Should be the best one I ever saw making with Raycasting.
Have you tried the new release with say and jump features, believe you can make better edition with these.
And I want to ask, that how long time dit it take developing this game? Is there anything you met inconvenient or need to improve? And any feature suggestions?

Thank you again for using pxt-raycasting extention and for your great game!

1 Like

Hey, thanks for replying!

I have tried the jump and say features, and the jump feature should be in the Gun Game actually! Pressing B should allow you to jump, unless I gave a link to the wrong version. Overall though, the plugin works really well! Super easy to set up, the Gun Game took about 2 hours to make, but that’s mostly because I experimented a bit, and had a bunch of assets already made from other versions that didn’t use the plugin.

The only suggestions I have is having a block for setting something relative to the screen, instead of putting “Something.setFlag(SpriteFlag.RelativeToCamera, true)” in Javascript. Another recommendation is a way to mess around with the wall scale for the Y and X axis, but I’m not sure if this is already in the game. If there was a way to make things smaller, it could lead to more detailed maps. Similar to how the Hedges & Pylons messed with the wall scales (it probably has more to it than that, but it could be nice). My last one I don’t know if its do-able, but a way to Raycast the floor or ceiling would be interesting. Makecode might not make this an easy task.

Thank you for the kind words, have a great day!

2 Likes

And forgot to say, love the “DOOM” painting on the wall, and the hand swinging when walking, that holding the gun. :+1:

Excuse me, for paste your game link in my post as a good example of the extension. :smiling_face:

1 Like

Thanks for your detail feedbacks! Very appreciate!

  1. The jump

Sorry for missed trying the jump, it is in the version you published, I just fire and fire to pass levels, and forget to try B btn.

  1. This can be done by set sprite [property] on|off block
    image

  2. wall scale for the Y and X axis
    I understand want you want I think. As you mentioned this is X&Y axis stuff, to reuse existing features about tilemap(designer, etc.), I am trying to involve as less as possible in this extension, to avoid “re-invent wheels”. Is it a solution for you, to set WallZScale to a big number, eg. 6 in this snapshot, and scale up sprites properly ? If not, feel free to let me know, I am glad to discuss and found a reasonable way with you together to resolve this.
    image

  3. Raycast the floor or ceiling
    Ah, actually, the floor/ceiling drawing algorithm is out of raycasting, cause it need rotate, while the raycasting did not. But this is really attractive feature, I will try to implement in this extension, after I optimize perf successfully to make it much fast then current version.

Thanks again for your valuable feedback! And always welcome, if you have any more question or suggestion at any time in the future.

2 Likes

Hello again! Thank you for the list.

I realized after I sent the suggestions that there was a block to set a sprite relative to a screen, and I felt a bit dumb lol.

For the Wall Y and X axis, I understand not wanting to implement it. Since you could scale the Z axis and everything functioned very well, there really isn’t a need for X and Y. And the example that you left gets my point across lol.

I didn’t know if it was possible to add Floor and Ceiling Raycasting, but I didn’t expect the answer to be rotations! If it ever gets added, that would be awesome!

Heres another idea which is mostly just piling on, and might go against trying to “re-invent wheels”. My idea is to scale individual tiles on a tilemap, like how in blocks you can turn specific tiles with walls on or off.

I appreciate you taking the time to explain the solutions, and if I ever have anymore ideas I’ll let you know! Thank you for making this plugin, for about a month and a half I was trying to turn the 3D Raycast game I found on this Forum into a FPS. I couldn’t figure out how to add in an enemy, or an item, or proper movement lol. If you wanna play it, here’s the link: https://makecode.com/_ePcheRLXo0W7. I have no javascript knowledge whatsoever, all I know is C#, and a bit of HTML.

Thank you! Have a great day!

about the relative camera block, don’t worry, I always met some “new block” at unexpect time at beginning to now. Arcade team are developing new blocks continuously also.

The rotation is not an option, be required, when view angle(facing dir of myself sprite) turned a number angle. And plus, a trapezoid transform needed also, for the perspective effect. Both transforms have not c++ implement on Arcade. Though, we will optimize as fast as possible, but still much slower than render of walls, in which blit is a hardware function.
If you mean “rotation option for floor/ceiling texture”, is very possible can be provided if you like, cause it should be only plus a extra number on “view dir angle”, not much extra cost, I think by now.

The game you are trying to add in an enemy is the 3D map made by mmoskal. This is a demo for raycasting walls, have not game features eg. sprite. So that’s the reason why I dev this extension based on it. :slight_smile:

Thanks again, love your games.
Have a good day!

1 Like

I love the graphics in the Tower Defense game!!! :smile_cat: :smile_cat:

1 Like

How did you create the sprites? They look amazing!

1 Like

Alright, that makes more sense! I guess I misunderstood what you meant in your previous reply. Thank you for explaining it! I’ll let you know about more ideas I might have while working with your Plugin! I’m working on something new right now, and I think it’ll look a lot better than the previous game.

Also, I may have found a glitch, or this may just be a problem with my code. In this game: https://makecode.com/_6TWMJuDbUFHv, I wanted to add a pretty insignificant feature of bullet holes in the walls. I thought it would look cool, but for some reason when you shoot every single wall except for the one you’re facing ingame, the hole either doesnt show up in the Raycast, is way too far out, or goes behind the object. My screen recording software doesn’t work right now, but if you need me to take screenshots to explain I can. (A is to Shoot, B is to Reload, Menu is to swap between Tilemap and Raycast)

1 Like

I appreciate the compliment!

A lot of the sprites in-game were just my best attempts at making things look close to Doom 3D or BTD6. (I had to turn the gun in Gun Game into a “water” gun because I wasn’t allowed to show an actual gun in the game. Not school appropriate lol) There are some exceptions though, such as the enemies in Gun Game. Just looking up “Doom sprites” or “Doom 3D sprites” gives good references and usually you can count the pixels and guess the best color. There’s also this: https://kristianpedersen.github.io/Convert-Image-to-MakeCode-Arcade-Sprite/ which converts images on your computer into a sprite.

Have a great day!

1 Like

tysm!

1 Like

Hi @CarltonFade !

Thanks for your feedback, it’s interesting and very important. I tried your project, and guess it not problem of your codes, should be some issue relative with wall coordinate and sprite positions in my extension. I will investigate it soon, but it may take some times.

Thanks again! I will update you once I have any news.

1 Like

Hi @CarltonFade !

After go over again, I found you are using very high image for the bullet (to make them as high as your line of sight, I guess). This would be the reason of this issue.

The center of bullet sprite is not the “bullet” position.

Why?

The Arcade physical engine only consider the solid part(hitbox) of sprite image at the collision test, and working in 2D mode, so switch to tilemap mode, and imagine the bullet image boundary box, may be helpful to understand.

As the bullet is on the top part of the image, when collision occured with wall, the y of bullet sprite and y of its hitbox always offset about (45-9)/2 . To test this, add “setScore(sprite.y)” in the “on sprite of projectile hits wall”. Shoot the wall at top, the score shown 38=16+45/2, instead of 20=16+9/2.

So acctually the value you need here should be the center position the hitbox of the bullet. But that’s no very easy to get. You can minus the offset from sprite.y also. Or, I suggest, use a square image and setZOffset for it. I tried, that works. And as well as bullets holes.

And additional, added “set autodestroy off” to bullet, make it can go to the wall far away from you.

Don’t worry, it’s really easy to confused, as these are both relative with the original 2D mechanism running in our new 3D world. I am looking for a way to make more clear, but have no good idea yet. The advice I can give by now, is using square image as long as possible, for physical collision.

Check project appended below please.

I have to say the bullet hole idea is so cool! And btw, the hand holding the gun are really nice and detail. Love these features. Can’t wait for your next game!

1 Like

Hello!

I appreciate the explanation and the fix! I was confused for a while since when you were to press the menu button, it would set the game to tile-map mode. There it would show the bullet hole perfectly, right where the projectile went. However, in-game it wouldn’t show up! Seeing it work in this way is awesome! I’ll implement this into my newer game, and since I don’t have to keep things as family friendly, things should look a lot better!

Have a great rest of your day, and thanks again!

1 Like