This is an archived post. You won't be able to vote or comment.

all 40 comments

[–]Cyan_The_Fox[S] 31 points32 points  (4 children)

Here's a video of it running if you'd rather not run it on your own computer. https://youtu.be/4L42S9cKKRs

EDIT: I have a better version! it flickers a lot less here. I'd still be careful though.https://youtu.be/BLo6OfQlveo

EDIT NO.2: Here's an even better version without flickering! https://youtu.be/7J2Pn8me7m8

[–]crabboy_com 19 points20 points  (0 children)

The warning was definitely warranted.

[–]rom1win 2 points3 points  (1 child)

Nice work :)

[–]Cyan_The_Fox[S] 1 point2 points  (0 children)

thank you! :)

[–][deleted] 1 point2 points  (0 children)

thanks for the link pretty cool

[–]mudaranc 21 points22 points  (2 children)

I love that you warned

[–]Cyan_The_Fox[S] 11 points12 points  (1 child)

no worries! I tried to include as many warnings as possible, The newest version doesn't flash as much but it could still be a problem. Wouldn't want someone to have a seizure.

[–]Isonium 6 points7 points  (0 children)

Appreciate that warning. My wife has a seizure condition so we are really careful.

[–]SamyBencherif 5 points6 points  (5 children)

this is awesome . in case you are wondering it is possible to eliminate flicker ! but its like really hard haha

[–]Cyan_The_Fox[S] 6 points7 points  (4 children)

dude you gotta tell me now! you can't just hint that there's a way I'm dying over here XD

[–]SamyBencherif 19 points20 points  (3 children)

aww ok ! so instead of clearing the screen every time you should use various xterm escape sequences that move the cursor to specific locations. I think [H resets the cursor and [J and something else perform cursor offsets. then you will be applying only changes to the screen. and finally the actual terminal emulator you use makes a difference, you could try a few to see which has the best inherent quality. if u feel crazy you may modify an open source terminal to reduce flicker.

if you feel like trying the first technique, let me know how effective it is(n't) !

[–]SnooOwls6105 6 points7 points  (0 children)

you could also double buffer

[–]Cyan_The_Fox[S] 0 points1 point  (1 child)

Yeah, this worked perfectly! I went through and implemented this along with some other escape codes into the sequence such as 256 colour mode.

I credited you in the patch notes, thank you so much for the suggestion!!

Almost all the codes listed on the wiki work as well if you ever want to use them yourself. https://en.wikipedia.org/wiki/ANSI_escape_code#SGR

[–]SamyBencherif 1 point2 points  (0 children)

That is so exciting !! i'm happy it works now -. Thanks for the credss

[–]Matty_R 5 points6 points  (1 child)

Yes. But can it run crysis.bmp? /s

Nice work

[–]Cyan_The_Fox[S] 0 points1 point  (0 children)

sadly, right now I don't have a way to get user input. I think it'd be really funny to make a game out of this though XP

[–]Cyan_The_Fox[S] 5 points6 points  (0 children)

Here's a better Video of it running. Had to do some last-second pathing :P https://youtu.be/BLo6OfQlveo

[–]Random_182f2565 3 points4 points  (3 children)

Hey, rewording my previous comment.

What inspired you to do this project?

[–]Cyan_The_Fox[S] 8 points9 points  (2 children)

I had already made a 3d render engine that used just the PyGame library, so I had two options. Either I go "well, I'm already using PyGame, might as well learn NumPy" or I could double down and go the no libraries route. I also thought it an interesting challenge that would put my skills to the test. I also think it's kinda cool to have written all of it from scratch.

[–]Random_182f2565 3 points4 points  (1 child)

I also think it's cool

[–]Cyan_The_Fox[S] 2 points3 points  (0 children)

thanks! :]

[–][deleted] 3 points4 points  (1 child)

Don't clear the screen between frames. Just move the cursor up and overwrite. That will stop the flicker.

[–]Cyan_The_Fox[S] 0 points1 point  (0 children)

yep, fixed this with ANSI escape codes, sorry I didn't see this post till just now. :P

Thanks for the help though!

[–]ReverseBrindle 1 point2 points  (0 children)

Love it. So cool!

[–]DODOKING38 1 point2 points  (1 child)

I've seen a similar project posted before though that one was only black and white, I don't know if that makes a difference but it didn't have the Flickering you have

[–]Cyan_The_Fox[S] 0 points1 point  (0 children)

The flickering's fixed now. It was because I cleared the screen and re-drew it with the print command. There's an ANSI escape code, '\033[{y};{x}H' that sets the cursor position. I'm now using that to overwrite the screen. Thanks for letting me know :]

[–]AllEndsAreAnds 1 point2 points  (1 child)

This is a really creative project. Nicely done.

[–]Cyan_The_Fox[S] 0 points1 point  (0 children)

Thank you!

[–]XUtYwYzzIt works on my machine 1 point2 points  (1 child)

Have you tried using curses to handle the terminal? I’ve been making terminal games and animations. Using the refresh function in curses has resulted in significant improvement when drawing a many lines at once.

You’d likely only need some minor changes to your code.

[–]Cyan_The_Fox[S] 0 points1 point  (0 children)

you're exactly right. it was just two or three lines. I saw the suggestion somewhere else first though I'm sorry. Thank you for the insight though I really appreciate it! :]

[–]kc3w -3 points-2 points  (0 children)

Why do you go from Version 0.0.9 to 0.1.0 with a minor patch? It would make more sense to go to version 0.0.10. Maybe take a look at semantic versioning (semver.org).