Skip to content
Sign upLog in
← Back to Community

Stargaze (ALMOST 3000 LINES!!!) (100 cycles project)

Profile icon
Baconman321

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 :)

Voters
Profile icon
IsaacEdelson
Profile icon
arnavpatel2021
Profile icon
Kenshan14
Profile icon
shanikhubert
Profile icon
IngeniousDevise
Profile icon
DividedFox
Profile icon
connorstott
Profile icon
matthyno
Profile icon
AmbF
Profile icon
JadeOdulio
Comments
hotnewtop
Profile icon
BobTheTomatoPie

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

Profile icon
Baconman321

@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

Profile icon
BobTheTomatoPie

oh lmao still rly cool tho

@Baconman321

Profile icon
BobTheTomatoPie

i rly like the tutorial thing it makes it super ezy

@Baconman321

Profile icon
Baconman321

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

Profile icon
KobeFF

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

Profile icon
Baconman321

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

Profile icon
KobeFF

@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

Profile icon
Baconman321

@KobeFF
Cool :>

Profile icon
KobeFF
Profile icon
Baconman321

@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.

Profile icon
KobeFF

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

Profile icon
Baconman321

@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!).

Profile icon
KobeFF

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

Profile icon
Baconman321

@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.

Profile icon
KobeFF

@Baconman321
lol yeah me too

Profile icon
Muhammad_SJC

This is pretty good

Profile icon
Baconman321

@Muhammad_SJC Thanks!

Profile icon
JWZ6

POG U IS GENIUS

Profile icon
Baconman321

@JWZ6
Thx :D

This is actually really old and messy code, so I'm going to remake it to use canvas (sometime)

Profile icon
JWZ6

@Baconman321
ik i saw u profile and found this LOL nice homepage btw

Profile icon
Baconman321

@JWZ6
Thx :D

Profile icon
JWZ6

np noice typing effect too

@Baconman321

Profile icon
Dunce

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.

Profile icon
Baconman321

@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.

Profile icon
Dunce

@Baconman321
ok, thanks

Profile icon
Kookiez

This is super cool! :D

Profile icon
Baconman321

@Kookiez
Thanks!

Profile icon
code-alt

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.

Profile icon
Baconman321

@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.

Profile icon
code-alt

@Baconman321
I mean the web server haha

Profile icon
Baconman321

@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).

Profile icon
BD103

Have an upvote! :)

Profile icon
RohilPatel

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

Profile icon
EpicGamer007

This is pretty dang awesome! here is an updoot

Profile icon
Jeydin21

This made my computer start humming :|

Profile icon
Baconman321

@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.

Profile icon
RayhanADev

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

Profile icon
programmeruser

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

Profile icon
RayhanADev

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

Profile icon
Baconman321

@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.

Profile icon
RayhanADev

@Baconman321
ahhhhhh, okay gotchu. Kewl!

Profile icon
Baconman321

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

Profile icon
RayhanADev
Profile icon
Baconman321

@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.

Profile icon
RayhanADev

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

Profile icon
Baconman321

@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?

Profile icon
Taiga123m

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

Profile icon
Taiga123m
Profile icon
Taiga123m
Profile icon
Taiga123m
Profile icon
Taiga123m
Profile icon
Baconman321

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

Profile icon
Taiga123m

@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

Profile icon
Baconman321

@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!

Profile icon
Taiga123m

@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.

Profile icon
Baconman321

@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).

Profile icon
Taiga123m

@Baconman321
oh but what site??

Profile icon
Baconman321

@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.

Profile icon
badst

Stunning! wow this is really good man!

Profile icon
Baconman321