Hello, I worked on this for a couple of days now and I’m proud to announce the first demo of Halo-Doom has been released to the public!
Using the Fake 3D Raycasting Demo from @mmoskal, I added this list of features:
- Zoom/ADS (The change in view only changes when the system registers a button input (e.g. W or D))
- Firing with recoil
- Hand-drawn art
- Armour + Health system (No enemies yet so can’t test that; I will elaborate later)
- Realistic ammo counter with max ammo limits
Now, for some help:
Remember, this is still a demo so expect updates and calls for help!
While making the demo I actually didn’t know how to increase the FOV for the zoom (Or to give the illusion of zoom), so I considered switching out the ADS for a pistol. But in the midst of coding the pistol, I found out that changing the FPX scale changed the FOV.
In case you want to add enemies, I know that the tutorial below is for scratch, but it does have the basic idea of how to do depth sorting, and with Makecode’s new scaling, a code similar to this might work (obviously accounting for how more positioning in makecode has to be done manually, but the general principle is there). I don’t do scratch, but I watched the whole series that these two videos below are from and some of the concepts are really cool and could work for this game!
Sprites in a 3D World | E3. Crazy Fun Raycasting - YouTube
Sprites Behind Walls (Depth Sorting) | E4. Crazy Fun Raycasting - YouTube
Man, raycasting is so cool
by the way, the controls are:
WASD to Move
SPACE/A to Aim/ADS
ENTER/B to Shoot
L to Reload
This is a great game! Can’t wait to see what you do next!
Finally got time to play with this prj, so interesting!
So I tried some customize on it.
- Add a mini map, with pos & dir shown
- Reload animation (screen shot gif is some laggy)
- Add menu as reload btn, for device
- Amo count text refreshed one by one
- Some other optimize, faster then before over all
- Reversed camera X dir, to make it according to tilemap X dir
Hope you like it!
This is really interesting! I’ve made the ammo counter slightly weaker because it needed more elaborate code that I was not bothered to do. The minimap is also a really cool and neat addition!
If you press a and b at the same time the scope doesnt fully close anymore!
Thanks for your feedback, I will test and try to fix it ASAP.
Zoom/FOV if ready. (Again, gif is somewhat laggy)
The bug should has gone, have a try pls.
After a whole weekend, the first sprite is caming…
Just worked, I am understand all codes in detail, still need more study
And more features, optimizations will come also in recent future…
This sample is special for you, FOV and Sprites are all inside.
See animation.ts in pxt-raycasting extension for how to define your enemy sprite animation.
Thanks you for your cool project, which like the rabbit hole I falled in, and got lots of fun.
No problem! This looks especially cool! I just might have to get on Makecode Arcade just to try this out, so a new demo might release soon! Thanks for the tip!
Enemy A.I.??? I’ve never made a 3-D game so, I have ABSOLUTELY NO IDEA how this even works.
@Kiwiphoenix364 has provided a great video, which explain it easy to understand
Yah, wait for your demo, good luck!
BTW, feel free to let me know if there’s any issue, or you have any quesiton about it.
Cant wait for this! And also im a big fan of halo.
@AqeeAqee I tried to provide an update to the demo but the sample you sent me couldn’t be converted to blocks. Not to mention there were extension errors.
Sorry for that issue, I have no idea why it work when I post, but can’t work now.
The fix is easy: Just replace the line with “pxt-Raycasting” to following, in pxt.json file(click “edit settings as text” button)
or check this out:
BTW, if you are just starting to make new version of your project, I strongly suggest you using new edition of this extension. Feel free ask me pls if you have any quesion on migrating to new edition.