This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Xelostar's profile picture

Doom - CC's first 3D FPS (with online highscores)

Started by Xelostar, 17 February 2018 - 01:24 PM
Xelostar #1
Posted 17 February 2018 - 02:24 PM
Hello everyone! Today I present to you:




Small update:
  • Gun bobbing added
  • Death animation

It has 3D rendering using my 3D rendering API:
http://www.computerc...5-finally-here/

Summary:
  • There are two types of enemies.
  • Normal mode and endless mode.
  • Online highscores
  • Installer
Controlls:
  • WASD for walking
  • Arrows for looking
  • Spacebar for shooting
How to install:
Run the following command

pastebin run 6BcdRV75

For the old version:
Spoiler

pastebin run 8RwQQk3B

If you have LDDestroier's STD installed you can also run

std ld ccdoom
The game is on STD-GUI too

[media]http://youtu.be/-QJBBzky40A[/media]


Special thanks to LDDestroier!
Edited on 22 February 2018 - 10:51 PM
magiczocker #2
Posted 17 February 2018 - 04:49 PM
Amazing game
Xelostar #3
Posted 17 February 2018 - 05:18 PM
Thanks! :D/>
LDDestroier #4
Posted 17 February 2018 - 07:06 PM
Finally, all my pleas for Doom have been answered! Even if the maps are 2D in nature, this is such a cool way to demonstrate your 3D engine.

It's on STD now too, so anyone with that can download/install it too!
Xelostar #5
Posted 17 February 2018 - 07:36 PM
Finally, all my pleas for Doom have been answered! Even if the maps are 2D in nature, this is such a cool way to demonstrate your 3D engine.

It's on STD now too, so anyone with that can download/install it too!
Yup =D
TrainerGold #6
Posted 17 February 2018 - 08:49 PM
Hey! Nice job with this, it looks great, but every time I enter "pastebin run 8RwQQk3B" I get an error at the end. I tried to follow exactly what you did in the video to fix I still get the same error. The error reads "3PBKGR4k:105: attempt to call nil." I have a doom directory but no game inside, just the "files" for the game. If you could help that would be amazing. Thanks. I pretty new to this stuff by the way, I'm no programmer.
CrazedProgrammer #7
Posted 17 February 2018 - 10:51 PM
This is extremely impressive! Great job :D/>
Just a curiosity, do you think you could add more detail to the walls with texture mapping or if the engine is blazingly fast, with polygons?
Xelostar #8
Posted 17 February 2018 - 11:16 PM
Thanks a lot! =D
I could maybe. I don't know how texture mapping works. I don't think it's supposed to be applied to 3D rasterisation. The 3D Rendering API sadly isn't fast enough to do it with polygons =P
I really have to try to get the amount of polygons as minimap as possible to keep the performance stable.
After all, it's running on a Lua interpreter written in Java ;)/>
I'm doing the best I can with what I've got =)
magiczocker #9
Posted 18 February 2018 - 07:35 PM
When I try to launch Doom and I am not in the install directory, following error I get:

File not found
File not found
File not found
blittle:107: attempt to get length of nil
Xelostar #10
Posted 18 February 2018 - 08:46 PM
When I try to launch Doom and I am not in the install directory, following error I get:

File not found
File not found
File not found
blittle:107: attempt to get length of nil
That's right. It's trying to load the APIs that should be in the same folder, but it can't. Because it can't find the APIs it'll give errors.
(You have to run Doom from it's directory. If you know a fix for this please tell me)
LDDestroier #11
Posted 19 February 2018 - 12:04 AM
snip
That's right. It's trying to load the APIs that should be in the same folder, but it can't. Because it can't find the APIs it'll give errors.
(You have to run Doom from it's directory. If you know a fix for this please tell me)

Replace line 4 with this:

local path = fs.getDir( shell.getRunningProgram() )
…and it will set 'path' to the directory of Doom, instead of the working directory.

Also, could'ja change your installer to use http.get() with the raw files from your Github instead of using shell.run() to use the pastebin command to run SuperTextDownloader to download from Github, for every file?
Xelostar #12
Posted 19 February 2018 - 09:45 AM
Ah right! Thanks! I wasn't sure how to get the path of the running program, so I always just used fs.getDir(), because it was the closest to the thing I wanted.

And I was already planning on doing that. Thanks for the feedback! :)/>
3d6 #13
Posted 19 February 2018 - 01:02 PM
This game is a masterpiece, a shining demonstration of your API, and a jewel among gameplay experiences in ComputerCraft!!
Xelostar #14
Posted 19 February 2018 - 03:34 PM
Thanks a lot 3d6!
This means a lot to me ^^
jakejakey #15
Posted 20 February 2018 - 06:29 PM
This is immensely impressive!

Another entry on the Doom runs on everything reddit I suppose.
This is a really clever way to show off your 3D API,
Wish I understood these things!

EDIT: Perhaps a bit of documentation and a short tutorial would help people utilize your API?
Edited on 20 February 2018 - 05:43 PM
Purple #16
Posted 22 February 2018 - 10:08 AM
Can you just give us the whole thing in a zip file like you did with the API? Because as it stands I am completely unable to get this to run no matter what I try.
Edited on 22 February 2018 - 10:06 AM
LDDestroier #17
Posted 22 February 2018 - 06:22 PM
Can you just give us the whole thing in a zip file like you did with the API? Because as it stands I am completely unable to get this to run no matter what I try.

What emulator/version of ComputerCraft are you using? I AIM TO SERVE
Xelostar #18
Posted 22 February 2018 - 11:41 PM
This is immensely impressive!

Another entry on the Doom runs on everything reddit I suppose.
This is a really clever way to show off your 3D API,
Wish I understood these things!

EDIT: Perhaps a bit of documentation and a short tutorial would help people utilize your API?
Thanks! I'm pretty sure I'm going to make a documentation soon. =)
Can you just give us the whole thing in a zip file like you did with the API? Because as it stands I am completely unable to get this to run no matter what I try.
I suppose I could give you the github link from where you can download a whole zip of the repository:
https://github.com/Xelostar/CCDoom
Can you just give us the whole thing in a zip file like you did with the API? Because as it stands I am completely unable to get this to run no matter what I try.

What emulator/version of ComputerCraft are you using? I AIM TO SERVE
I'd love to know too. For me CCEmuRedux is the way to go :3
Xelostar #19
Posted 22 February 2018 - 11:51 PM
Small update implemented gun bobbing and a death animation with special thanks to LDDestroier for committing!
Purple #20
Posted 23 February 2018 - 11:01 AM
I don't use emulators. I am trying to run this on regular old computercraft. Game Version: 1.7.10 Mod Version: 1.74. I do not think that is the problem on account of the fact that I am getting the same error everyone else was. Either way, looking it up on github, thanks for the link, will report back.
SquidDev #21
Posted 23 February 2018 - 11:43 AM
I've noticed the script uses shell.dir() to find where the program is located, which only works if you're executing from the same directory as the script. It might be better to use fs.getDir(shell.getRunningProgram()).


I don't use emulators. I am trying to run this on regular old computercraft. Game Version: 1.7.10 Mod Version: 1.74. I do not think that is the problem on account of the fact that I am getting the same error everyone else was. Either way, looking it up on github, thanks for the link, will report back.
I've had no issues running on 1.75, so you could try updating to that version. If it still doesn't work, it would be useful to include your error message or a more detailed description.
Xelostar #22
Posted 23 February 2018 - 10:25 PM
I've noticed the script uses shell.dir() to find where the program is located, which only works if you're executing from the same directory as the script. It might be better to use fs.getDir(shell.getRunningProgram()).

Ah right. Someone told me already because I didn't know. I forgot to add it in with the update.
I'll just sneakily add it as if it wasn't ever not there. :P/>