Jump to content

Any Suggestions On Coding Projects I Could Try to Do?


act

Recommended Posts

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?

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post

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 by vyruss
Clarity and proper explanation

Share this post


Link to post

Remake the Doom engine from scratch.

 

Without referring to the original source code. At all.

Share this post


Link to post

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 by HavoX

Share this post


Link to post
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

Share this post


Link to post
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?

Share this post


Link to post

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 by Dragonker

Share this post


Link to post

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. 

Share this post


Link to post

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.

Share this post


Link to post
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.

Share this post


Link to post

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 by Aaron Blain

Share this post


Link to post
  • 4 weeks later...
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 by smeghammer

Share this post


Link to post
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?

Share this post


Link to post
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.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...