4 ms·
I would also recommend, if someone is interested in games, to do Tetris. It's a simple concept that is trickier than expected once you have to figure out the de
by jameskilton 6y ago
I would also recommend, if someone is interested in games, to do Tetris. It's a simple concept that is trickier than expected once you have to figure out the details of how it all comes together.
- corytheboyd 6y ago> figure out the details of how it all comes together Damn, that was good.
- drivers99 6y agoI wrote a Tetris to learn Python and Pygame. There are correct ways (assuming you want to follow official rules, or parts of it) to do the field size, colors, choose pieces randomly, wall push off, rotations, scoring, etc. https://tetris.fandom.com/wiki/Tetris_Guideline https://tetris.fandom.com/wiki/Tetris_Guideline
- quesera 6y agoNice job slipping that in -- it fits perfectly! And it brings back a fun memory: I wrote MacTetris[1] when I was in high school. This made the computer lab a whole lot more popular during free periods than it had been previously. Two interesting bugs that I recall: * Mathematically rotating pieces around an axis was a terrible idea, but it produced some entertaining artifacts (and made placement much harder!). I replaced the math by precomputed rotation maps for each piece, which was much better. My first pass at the maps introduced a displacement bug, so you could spin the pieces counterclockwise and they would walk in the negative X direction. * I got an angry bug report in the lunch room from a kid who had no reason to know my name. He was having a really great game, and then his score started decreasing with every piece. He felt like his record high score had been stolen from him, and he was upset! I asked "what was your score??". He said "I don't know, but by the time I noticed, it was over 30,000 but it was going DOWN!". Aha..[2] :) [1] I'm sure the statute of limitations has expired on my appropriation of copyrights and trademarks. [2] Back in the day, "int" meant "signed 16-bit integer", which is not the proper data type for a score counter.
- xyzelement 6y agoYou're getting some great nostalgia responses to this. Here's mine. In highschool, I cranked out a version of tetris in Turbo Pascal that basically worked. Fast forward a few years, I am taking CS219 with Prof Stark (random that I remember the course number) who is hard-core and really tough since it's year 2000 and the class is full of kids who are taking CS cuz it's "the thing" but have no passion or talent for programing. Me, I love programming but I don't have it very much together attendance-wise so I accidentally miss the midterm. OOPS. And obviously there's a "zero make-up test" policy, but surprisingly the prof lets me do the part of it which is a take-home coding assignment, since you can't really benefit from prior knowledge of the questions. My lucky stars - the test is to make a rudimentary subset of - you guessed it - Tetris. Which I had "solved" for myself a year or two earlier. Apparently I was the only one in the class to nail the implementation.
- phist_mcgee 6y ago1. No idea who Prof Stark or CS219 is. Maybe some context here would help. 2. I f a course is super hard, maybe the class isn't 'full' of people who are just doing it to 'be cool, maybe that is your judgement and does not affect reality. 3. Great that you solved Tetris beforehand, but is there a point here? Are you implying that high school you was smarter than university peers? Sorry, but your post seems a little elitist, even thought it's just an anecdote.
- xyzelement 6y agoHolly crap! First, there's not really a point. The preface to the post is that we're sharing nostalgia, right? Second, the "cool" thing is I got lucky that a test that I nearly blew myself up on happened to be on a subject I had already thought about a lot. However your #2 is off-base. There was something like 400% the applicants to the CS program in my university in 1999 vs 1998 and I bet that was true across the board. It was because dot-com was the hot shit and CS became a lot of people's default. The CS department had a tough choice between lowering the bar and "turning away business." This is not a controversial thing.
- 6y ago
- superbaconman 6y agoI wrote this for the xbox 360 back in college. I definitely learned some some skills and would also recommend.
- hertzrat 6y agoSpeaking of games, I made a decent percent of one recently. It was 4 months of programming character controllers and an ability system, plus 3 weeks of content creation. It came together for a game jam submission (with permission to use the preexisting code). Having to learn everything needed to write this... it was unbelievably educational from a software design point of view If you enjoy horror or third person fantasy adventure games, give it a shot. If you do, please fill out the survey at the end so I can make it better for the next release https://hertzrat.itch.io/a-few-nights-room-and-board https://hertzrat.itch.io/a-few-nights-room-and-board
- tijsvd 6y agoEven more fun, make tetris on a microprocessor, play on terminal via serial port. I did this as a diversion during my master's thesis - multiplayer tetris with two microprocessors, communicating through the radio protocol that I was building.