act Posted December 7, 2021 I'm an uncreative son of a gun who can't think of a novel idea to inspire me to go out and learn more stuff with C. I've been learning C on-and-off on my own time since I screwed up my BIOS and had to install Linux. Since then, I've created a Rock-Paper-Scissors machine that uses the system's time to generate a pseudorandom seed, I made a fizz-buzz program, and I'm working on a Russian Roulette machine. Any suggestions on what I can do next? 2 Quote Share this post Link to post
Wavy Posted December 7, 2021 You could create a text adventure game of some kind. 5 Quote Share this post Link to post
act Posted December 7, 2021 1 minute ago, Wavy said: You could create a text adventure game of some kind. Been there, done that, little 12 year old me taking good advantage of Batch files lmao. Not to mention writing isn't my forte. 2 Quote Share this post Link to post
Wavy Posted December 7, 2021 4 minutes ago, act said: Been there, done that, little 12 year old me taking good advantage of Batch files lmao. Not to mention writing isn't my forte. Well, fair enough. I remember writing one for C64 BASIC a little while back. Never got far with it though hehe 0 Quote Share this post Link to post
act Posted December 7, 2021 the "hehe" was not necessary. why is everyone trying to be micheal jackson 0 Quote Share this post Link to post
Wavy Posted December 7, 2021 30 minutes ago, act said: why is everyone trying to be micheal jackson Because I can Going back on topic, another idea I thought of is by making a Stroop test kind of thing. What I'm thinking is if the word displayed is "red" but coloured in blue, you'd need to press the B key (for blue) to get it correct. Maybe you could have 10 or so words in a stream and add up all the correct answers in total. 3 Quote Share this post Link to post
act Posted December 7, 2021 6 minutes ago, Wavy said: Because I can Going back on topic, another idea I thought of is by making a Stroop test kind of thing. What I'm thinking is if the word displayed is "red" but coloured in blue, you'd need to press the B key (for blue) to get it correct. Maybe you could have 10 or so words in a stream and add up all the correct answers in total. And what would you suggest as a starting point? I only have done terminal-related stuff. 0 Quote Share this post Link to post
Wavy Posted December 7, 2021 5 minutes ago, act said: And what would you suggest as a starting point? I only have done terminal-related stuff. This guide here explains how to change text colour in the terminal. 0 Quote Share this post Link to post
Apprentice Posted December 7, 2021 4 hours ago, act said: Any suggestions on what I can do next? Modify the Doom engine so that you can seamlessly can go from one level to another and back again . . . :D 0 Quote Share this post Link to post
Redneckerz Posted December 7, 2021 2 hours ago, Apprentice said: Modify the Doom engine so that you can seamlessly can go from one level to another and back again . . . :D We already have ZScript mods that make level traversal continuous and a WAD (Memorial) that strings them all together in one big megamap. @actDoom engine, text mode rendering, and then raytracing. In text mode, the amount of rendering you can push is immense so that software raytracing/marching becomes possible. Other than that, Doom running directly on the Windows Console/PowerShell or in Excel. 0 Quote Share this post Link to post
vyruss Posted December 7, 2021 (edited) Not sure if you've done this sort of thing yet, but a fun exercise might be to create a lexer. It should start with reading a text file from the local filesystem (passed as an argument) Have it write out either to console or as an output file (also passed as a command line argument) the words present in the document and the number of times those words appear in it, ordered by number of appearances descending. Edited December 7, 2021 by vyruss Clarity and proper explanation 2 Quote Share this post Link to post
MFG38 Posted December 7, 2021 Remake the Doom engine from scratch. Without referring to the original source code. At all. 2 Quote Share this post Link to post
HavoX Posted December 7, 2021 (edited) There's a lot you can do with C. I've got a book called "C for Dummies," but since the book is so long, I don't have the patience to read all that. I just want to learn the basics! :-P At least I bookmarked the important pages. Edited December 7, 2021 by HavoX 0 Quote Share this post Link to post
act Posted December 7, 2021 5 hours ago, Redneckerz said: We already have ZScript mods that make level traversal continuous and a WAD (Memorial) that strings them all together in one big megamap. @actDoom engine, text mode rendering, and then raytracing. In text mode, the amount of rendering you can push is immense so that software raytracing/marching becomes possible. Other than that, Doom running directly on the Windows Console/PowerShell or in Excel. how in the name of god will i do that like actually, you're basically walking up to a chimpanzee and saying "yo bro you just stacked some rocks together? go build the cistine chapel" lmao and also i messed up my bios and switched to linux 1 Quote Share this post Link to post
act Posted December 9, 2021 Sorry to bump my own thread, but I just made that Russian Roulette simulating thing:https://gist.github.com/act17/9aad8a4a7382ff97348bfe0f2449c281 4 Quote Share this post Link to post
act Posted December 9, 2021 2 hours ago, HavoX said: Well, it's a start. On 12/6/2021 at 11:04 PM, Wavy said: This guide here explains how to change text colour in the terminal. Hey I have a question, so hypothetically, I could make a program in one of two ways: int main(){ int stuff; scanf("%d", stuff); if( stuff == 1 ){ printf("1"); return 0; } else{ return 0; } } int main(){ int stuff; scanf("%d", stuff); if( stuff == 1 ){ stuff(); } else{ return 0; } } void stuff (){ printf("1"); return 0; } So what would be the advantages of the second one, where upon a certain condition being met, I use a void to perform the actions for that condition being met, as opposed to just doing it within the Main? 0 Quote Share this post Link to post
Dragonker Posted December 9, 2021 (edited) First, the return 0 inside the stuff() function is wrong: you can't return something from a void function. There are two main benefits in using a function: Reuse. You can reuse the same function later. Some functions accept void functions as arguments, most commonly the atexit() function. No use in trying to guess which performs better. For such small functions some compilers will take the content and paste it "in-place" to avoid the overhead of calling it. Edited December 9, 2021 by Dragonker 2 Quote Share this post Link to post
Stupid Bunny Posted December 11, 2021 I wrote a really crude terminal version of Uno in C some years back. The code is horribly messy and the way it handles the deck is all weird and could be way more efficient but it was a fun puzzle anyway. You could try something like that, not worrying about AI the first time through. 3 Quote Share this post Link to post
boris Posted December 11, 2021 We do Doom here, so write a program that can read WAD files, make it read maps and output its stats. Next step: extend it to actually display the 2D view of the map. 3 Quote Share this post Link to post
Doominator2 Posted December 11, 2021 (edited) I programmed Hangman in ARM Assembly before, which was pretty fun. Edited December 11, 2021 by Doominator2 3 Quote Share this post Link to post
Aaron Blain Posted December 13, 2021 everything you ever wanted to know about terminals I wrote my own much-simpler replacement for Ncurses from scratch, allowing me to fluidly redraw the ascii "screen" at 60fps with no libraries, using only escape codes and some OS calls. Also Ncurses is needlessly clunky when it comes to changing colors, so I made up my own system for that. 1 Quote Share this post Link to post
act Posted December 15, 2021 On 12/13/2021 at 11:46 AM, Aaron Blain said: everything you ever wanted to know about terminals I wrote my own much-simpler replacement for Ncurses from scratch, allowing me to fluidly redraw the ascii "screen" at 60fps with no libraries, using only escape codes and some OS calls. Also Ncurses is needlessly clunky when it comes to changing colors, so I made up my own system for that. this has made me unnecessarily jealous and I unironically considered deleting my account after that. I don't know what my problem is but I don't like it. 0 Quote Share this post Link to post
Aaron Blain Posted December 15, 2021 (edited) Well, don't be too jealous. I've been working on a few game projects for a couple years now in my spare time and haven't released anything. I'm just saying, I like the terminal a lot and I found getting a little more familiar with it extremely satisfying. You might enjoy experimenting with ansi escape codes, or with Ncurses (which is very good despite my perverse urge to reinvent the wheel). There are lots of good tutorials out there. Edited December 15, 2021 by Aaron Blain 0 Quote Share this post Link to post
smeghammer Posted January 13, 2022 (edited) 3 hours ago, Maxxx17 said: I see you know a lot about coding. Have you ever worked with a database? Try learning and using the code completion and syntax checking tools for MySQL. I think with this sql syntax checker and a lot more, you should be able to do something. C is definitely 'programming' not 'coding'. And not necessarily anything to do with SQL either. Sure you can call SQL from within many languages but if you are not using an RDBMS then SQL is not even in the mix. With regards to the OP, how about a really efficient web crawler to look for and download wad files? Oh, and I pitch in for SQLite... 😊 Edited January 13, 2022 by smeghammer 0 Quote Share this post Link to post
MFG38 Posted January 14, 2022 On 1/13/2022 at 2:05 AM, smeghammer said: C is definitely 'programming' not 'coding'. I dunno, I always viewed programming and coding as being synonymous with each other. Is there a practical difference between the two or is it one of those subject matters that are entirely subjective? 0 Quote Share this post Link to post
smeghammer Posted January 14, 2022 36 minutes ago, MFG38 said: Is there a practical difference between the two or is it one of those subject matters that are entirely subjective? Heh! No, I guess it is subjective... C, C++ and particularly machine code are complete black boxes to me and I have always thought of them as utterly incomprehensible except to hardcore programmers. I probably felt the same about Java before I used that (and I would certainly call that 'programming'), and I guess it is probably true for any language I don't know about. It probably also comes from being aware of C/C++ as hardcore languages used to build applications before I ever programmed anything, so I probably had a conceptual difference in my head between 'easy' stuff (Javascript...) and 'hard' stuff I did not know anything about. 2 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.