Share your repls and programming experiences

← Back to all posts
Stargaze (ALMOST 3000 LINES!!!) (100 cycles project)
h
Baconman321 (1046)

The month long project is here!

Almost three thousand lines of code, Stargaze is finally out! I know it's a little late for a 100 cycles project, but eh. I worked so hard, it's nicely made, compatible with different devices, and download as an app (it runs offline, and you can even control what you cache to some extent)! I ran this through google lighthouse and it got a good rating (50 for performance but that's because it takes up a bit of CPU power, 90ish for performance and best practices, and PWA certified)!
Note that this doesn't use canvas or any frameworks. It's solo made and uses the html page itself to create span elements for stars. You can also draw constellations now! Big thanks to my teacher for recommending the constellation drawing. I'm planning on adding some more features, so stay tuned. Read the whole description in the README file. Also, the main files are minified. If you want to try to fork it, there are unminified files that exist but are not used when serving the content.

Possible upcoming updates for this

Please note that these may or may not happen (sadly).

  • Planets with randomized planet names and descriptions
  • Filters (like sepia)
  • (Maybe) Point system, unlock different things

I know this may not get a lot of views, but please, if you like it, comment! If you don't, what can change?

PS: There's also a few space objects like the ISS, comets, and meteor showers. They pop up randomly so see if you can find some!

Hope ya like this! Bacon boi out!

Edit:

Thanks to all the people who upvoted. I am truly grateful. While this isn't on trending, it still is pretty popular! Glad to know people appreciate hard work :)

Comments
hotnewtop
BobTheTomatoPie (3351)

dude this is so cool, ive always wanted to learn php even tho its outdated lol

Baconman321 (1046)

@BobTheTomatoPie Thanks! Actually, it doesn't use PHP anymore. It used PHP for get requests, but I found out I could do URL.searchParams for that

BobTheTomatoPie (3351)

i rly like the tutorial thing it makes it super ezy @Baconman321

Baconman321 (1046)

@BobTheTomatoPie The stargaze to-go? Yeah, thanks.

KobeFF (1260)

WOW! This is sum cool stuff right here! have an updoot.

Baconman321 (1046)

@KobeFF Wow, thanks! I am hoping this can get on trending, but i don't know. Either way, I am glad people like it.

KobeFF (1260)

@Baconman321 Yeah, me too! I've only gotton 3 projects on trending... If it hits trending tho you'll get tons of upvotes. 3 of my posts got on trending, and one of those got about 180 upvotes lol

Baconman321 (1046)

@KobeFF I just like how I made it a PWA that works offline. I am a bit worried about the PHP file on account of it being a php file, but it caches the html, so it runs offline (i tested). Since there isn't any PHP code (the only reason I had it a PHP server is because of a feature called Stargaze To-Go where you can use stargaze in your own website), it works offline (hopefully). The hardest part was actually the space objects, as I remember it took 2-3 hours to debug them.

KobeFF (1260)

Wow!!! @Baconman321 This post deserves to be on trending... I spent 40 minutes on a project that I posted - it was the one that got 180 upvotes!! I literally spent less than an hour on it and it got on trending lol

Baconman321 (1046)

@KobeFF Sometimes hard work goes unnoticed. I know, thanks for really believing that. Maybe if we keep talking it will ;> It's already the first hot post on the talk page (yay!).

KobeFF (1260)

@Baconman321 yeah! I'll share it with a couple of my coding friends.

Baconman321 (1046)

@KobeFF Thank you! I am hoping to go beyond repl.it and actually get some real "users" here. I remember my brother asks me to just sit in front of my computer and look at the program running (XD). I hope people can actually use this and use it as a relaxation or break from the stress of life.

Dunce (44)

Amazing! however I noticed the music isn't on by default, you have to turn it off then on again, also the sounds and music are a little loud.

Baconman321 (1046)

@Dunce I think i'll add a volume bar, thanks.

Also, it should be on by default, it's just that the browser blocks them. Try clicking on the page right before it loads or manually loading sounds.

codealt1 (3)

Hey there, it looks like you are using the PHP web server which really shouldn't be used any longer, by the folks who maintain PHP.

Baconman321 (1046)

@codealt1 I'm going to switch it to a non php server because I found out I don't need PHP. However, PHP is still used in the majority of sites using backend. It is still a good thing.

codealt1 (3)

@Baconman321 I mean the web server haha

Baconman321 (1046)

@codealt1 PHP web server is still great. Although there are newer languages appearing for backend, PHP is still in the run. In fact, they just appeared with a new version (PHP 8).

BD103 (113)

Have an upvote! :)

RohilPatel (1533)

I don't think my internet is gone...

EpicGamer007 (1600)

This is pretty dang awesome! here is an updoot

Jeydin21 (103)

This made my computer start humming :|

Baconman321 (1046)

@Jeydin21 XD, yeah it doesn't use canvas, so it can be power sucking. Sorry. If you can't take as much power, go into settings, appearance, quality. Then you can change it to 100 stars which lowers the processing power as well.

RayhanADev (1863)

Interesting and awesome!, saves me from having to buy a telescope why preference PHP Web Server over NodeJS?

programmeruser (575)

@RayhanADev it's mostly just clientside js, I don't think there's even a line of PHP code

RayhanADev (1863)

@programmeruser which I saw too, I just wondered why they preference PHP over NodeJs.

Baconman321 (1046)

@RayhanADev and @programmeruser So the reason I did php was because I had a stargaze to-go application, and I needed to parse a query string. I realize now that I can do that with javascript (as shown in the offline page). Otherwise, I like php because I can do $something = $_GET['Something']; where in nodejs I have to write like 10 lines of code. I also started learning php first, and I think it's simpler. The only reason I use nodejs is because it has libraries and while php has some too, repl doesn't allow you to download them. That's why it's in PHP.

RayhanADev (1863)

@Baconman321 ahhhhhh, okay gotchu. Kewl!

Baconman321 (1046)

@RayhanADev Yeah. Nodejs is fast though, while I feel like PHP is more simple. Either way they are both great!

Baconman321 (1046)

@RayhanADev Would you know why my site isn't secure even though it shows https in the address bar? For some reason it says certificate is valid in security section of dev tools yet there is no certificate? Maybe repl?
Edit: Oh nvm must be my cache or smthing, it is secure now. Also if u have phone you can download this and explore offline! That's why I was wondering why it wasn't secure, cuz it needs to be to download.

RayhanADev (1863)

@Baconman321 it’s Repl. Sometimes that happens to me too without reason but typically the sites should be secure ƪ(˘⌣˘)ʃ

Baconman321 (1046)

@RayhanADev Also, I realized this shouldn't be php since it won't load a php file offline (typically). Is there any way to fix this other than run a file called index.html and redirect from index.php? I know I can't delete index.php, so maybe I should make a new repl and use that instead?

Taiga123m (2)

Phantom forces bad business R2D(reason 2 die) unite:Classified CB:RO (counter blox:Roblox offensive:

Baconman321 (1046)

@Taiga123m What is this for? Also, yes I like phantom forces, sorry if you don't :(

Taiga123m (2)

@Baconman321 Idk i'm doing this in school im just cus im dum also i like pf but for some reason pf is laggy sorry tho
do u know oscar or godstatus or someguyPF?
also do u hak in pf cus you can code
dont u have school its school hours

Baconman321 (1046)

@Taiga123m Yes, PF can be laggy, but I still like it (gives it a challenge). And no I don't know them, but I know paradox poke (and actually I was in the server with him a couple of times EEEEEE!). Also, no I don't hack (I kinda wanna on an alt to see what it's like, but I shouldn't cuz it's against the ToS and I know the frustration of having a hacker. And yes I'm in school, but I'm done with everything (science was so easy my teacher recommended I take 12th grade physics and I'm in 9th grade lol). Also, you're not dumb. You're just new. What grade are you in? If you work hard enough you can be a pro coder. I joined the coding community about a year ago and even I'm not a pro!

Taiga123m (2)

@Baconman321 my account on school chromebook also im not in middle school yet but almost. Wait but you know how to hack right? Also I like paradox poke to.

Baconman321 (1046)

@Taiga123m I only know enough to prevent my site from getting hacked itself. Technically I have "Hacked", but to show a guy vulnerabilities in his site, while alerting him right away, so that is "legal" (not really hacking compared to actual hacking).

Baconman321 (1046)

@Taiga123m That I showed a guy what was wrong with his code? A forum posted by someone here. I noticed he ran an xss test, so I expected it to not work, but I found out it did. And since he used session cookies, I could have easily stolen everyone's cookies. and been able to login to anyone's account. I showed him the flaw and he fixed it really fast. If you mean my site, it's phantomforcestools.ml. I made it a while ago and have been updating it for a long time now.

badst (655)

Stunning! wow this is really good man!

Baconman321 (1046)

@pepelaugh Thanks! Although I realized that canvas would be better for this kind of thing, as stated in the readme, it was recycled code, so I started from that. If you go the README, and scroll down, you can see how the meteor showers work, which is particularly cool.