Page 3 of 4

Re: Programming Practice

Posted: Sat Mar 21, 2009 11:17 pm
by eatcomics
MarauderIIC wrote:Ginto, read beej's guide to network programming linked from here http://elysianshadows.com/phpBB3/viewto ... ?f=6&t=148
link no longer works :nono: that upset me because I've been looking into winsock stuff...

Re: Programming Practice

Posted: Sat Mar 21, 2009 11:20 pm
by eatcomics
KuramaYoko10 wrote:Ok... I dont know if I should bring this topic up again, but I like the idea of it, and I will post a very simple challenge which I remember doing when I was learning the basics of C (which I still am... kinda lol)

You are requested to print on screen X numbers of the fibonacci sequence (starting from 0), being X the variable that the user inputs.
The fibonacci sequence is an interesting sequence of numbers in which you get the previous number, add to your current number to get the result of the next number of the sequence ... here is how it starts:

Code: Select all

0  1  1  2  3  5  8  13  ...
*more info at: http://en.wikipedia.org/wiki/Fibonacci_sequence


I have the code done, but I will try thinking on different ways of solving it, so it will be an exercise to me as well ... I will wait for some replys and then post my code here (and because i am not on my computer right now =P)
darn my lack of motivation, i might have actually liked this one... i guess I'll try but I'll probably lose interest in two minutes... /me runs of to try to code something

Edit: that wikipedia page looks a lot more mathmaticley heavy........

Re: Programming Practice

Posted: Sat Mar 21, 2009 11:53 pm
by eatcomics
got it :mrgreen: do you want me to PM the code or what???

Re: Programming Practice

Posted: Sun Mar 22, 2009 12:33 am
by andrew
eatcomics wrote:
MarauderIIC wrote:Ginto, read beej's guide to network programming linked from here http://elysianshadows.com/phpBB3/viewto ... ?f=6&t=148
link no longer works :nono: that upset me because I've been looking into winsock stuff...
That link needs to be updated go here. ;)

Re: Programming Practice

Posted: Sun Mar 22, 2009 12:40 am
by eatcomics
andrew wrote:
eatcomics wrote:
MarauderIIC wrote:Ginto, read beej's guide to network programming linked from here http://elysianshadows.com/phpBB3/viewto ... ?f=6&t=148
link no longer works :nono: that upset me because I've been looking into winsock stuff...
That link needs to be updated go here. ;)
Thankee :worship:

Re: Programming Practice

Posted: Sun Mar 22, 2009 11:46 am
by KuramaYoko10
Sure eatcomics... pm me your code, and I will put mine here!

Now, I was looking up my projects folder and I found one that is really fun and might fit as a 'programming practice':

Click here to see the hidden message (It might contain spoilers)
You are requested to do a 'Hang Man' game, in which one player types the word, and a second one tries to guess it by typing a letter at a time...
You have to establish a number of chances to the second player to guess (mine is 7), if he runs out of chances, the first player is the winner!



I will wait till people try to find a way to do this by themselves and then I will post my code here!

Have fun with this one =D

Re: Programming Practice

Posted: Sun Mar 22, 2009 12:12 pm
by eatcomics
Ginto8 wrote:Here's an idea for the up-and-coming network programmer:
Click here to see the hidden message (It might contain spoilers)
Create a console-based chat program (both server and client). Make it read the server's IP from a configuration file

Also helps with some file I/O. ;)
Hey ginto... could you send me the source for this one plz???? I would love you if you did....... ;)

Edit: That post got me a gold egg :lol: :mrgreen: just thought you would all like to know....

Re: Programming Practice

Posted: Sun Mar 22, 2009 1:01 pm
by Ginto8
eatcomics wrote:
Ginto8 wrote:Here's an idea for the up-and-coming network programmer:
Click here to see the hidden message (It might contain spoilers)
Create a console-based chat program (both server and client). Make it read the server's IP from a configuration file

Also helps with some file I/O. ;)
Hey ginto... could you send me the source for this one plz???? I would love you if you did....... ;)

Edit: That post got me a gold egg :lol: :mrgreen: just thought you would all like to know....
:lol: to be honest I haven't made one myself yet... though I'll need to soon, if I want to actually finish my next project! Here's my list of ideas for it if you want to know:
Click here to see the hidden message (It might contain spoilers)
  • -sidescrolling
    -splitscreen
    -2D
    -a shooter
    -server can upload their own sprite/tile sheet to replace the default one
    -made with SDL/OpenGL
    -uses SDL_net for networking


and if you want a (sorta) cross-platform networking solution, then you can use SDL_net instead of winsock ;)

Re: Programming Practice

Posted: Sun Mar 22, 2009 3:07 pm
by eatcomics
cool I'll look into the SDL_net thing thanx ;)

Re: Programming Practice

Posted: Sun Mar 22, 2009 6:45 pm
by BlueMonkey5
Can anyone tell me anything about DarkBasic? and is a good place to start for a total beginner?

Re: Programming Practice

Posted: Sun Mar 22, 2009 9:07 pm
by MarauderIIC
No idea, blue.

Re: Programming Practice

Posted: Sun Mar 22, 2009 9:37 pm
by BlueMonkey5
Wikipedia sais that the purpose of the language is to "create games using microsofts directX from a BASIC programming language". It's basically a customized language specifically geared to make games, that has the necessary libraries built right into it. So there's no need for API's i guess. It's kind of like a two in one thing from what I see but I don't know if it's worth while to learn, or if it's just better to start right away with a normal languge, like C++ with SDL or something. So maybe someone has a recomendation about that.

Re: Programming Practice

Posted: Mon Mar 23, 2009 3:35 pm
by dandymcgee
BlueMonkey5 wrote: It's kind of like a two in one thing from what I see but I don't know if it's worth while to learn, or if it's just better to start right away with a normal languge, like C++ with SDL or something. So maybe someone has a recomendation about that.
Really the only thing that matters is how much difficulty you wish to deal with as a beginner. Obviously DarkBasic will be much easier to learn, and you may even be able to start making a simple game within the first week. C++ on the other hand will require a lot more patience to master and the beginner tutorials may seem less appealing to you (guess a number game, draw simple ascii art, whatever), but will definitely give you many more options in the long run.

It's up to you to make this decision, and if you're Really unsure go ahead and jump right into C++ and see if you think you can handle it. If not go ahead with DarkBasic first, and work your way towards C++ later on. I tried and failed at learning C++ at least twice before I actually got serious and became determined to understand it. There's nothing wrong with failing the very first time you try something new (unless of course it has to do with sky-diving). ;)

Re: Programming Practice

Posted: Mon Mar 23, 2009 7:58 pm
by BlueMonkey5
LOL... nice. yea that sounds really cool. it's actually a big comfort hearing that you failed the first two times (as twisted as that sounds), because I failed two times at programming too! so wow, that actually does inspire me some and gives me hope that i can give it another whack. thanks!

But here's a good question if anyone knows- is darkbasic similar to C++? so basically, if i start off learning darkbasic, will it be an easy switch to learn C++? if it is, it would be worth while to do that and then make the switch. if they are similar, alongside being useful, learning darkbasic would also be practice when switching to C++. it would be like learning something to help getting started with that. but if they're totally different, i would just start off with C, and maybe play around with darkbasic on the side to see what it's all about.

Re: Programming Practice

Posted: Mon Mar 23, 2009 9:36 pm
by eatcomics
BlueMonkey5 wrote:LOL... nice. yea that sounds really cool. it's actually a big comfort hearing that you failed the first two times (as twisted as that sounds), because I failed two times at programming too! so wow, that actually does inspire me some and gives me hope that i can give it another whack. thanks!

But here's a good question if anyone knows- is darkbasic similar to C++? so basically, if i start off learning darkbasic, will it be an easy switch to learn C++? if it is, it would be worth while to do that and then make the switch. if they are similar, alongside being useful, learning darkbasic would also be practice when switching to C++. it would be like learning something to help getting started with that. but if they're totally different, i would just start off with C, and maybe play around with darkbasic on the side to see what it's all about.
just keep at it, especially when you don't feel like doing it. You get a big boost of confidence that way :mrgreen: