Forum: Show Off Your Open Source Projects
Jul 28th, 2008, 6:59 AM
|
|
Replies: 0
Views: 281
Snake
I made a snake game with SDL to learn C++. You can restart the game with enter and you can change some settings in config.txt (speed is in ms - lower number is...
|
Forum: C++
Jul 28th, 2008, 5:18 AM
|
|
Replies: 5
Views: 275
Re: SDL opens a terminal on win
Thank you for your help.
F**k Windows :D. Why can't they use main()?
How could I forget to reset the timer. Of course. Thank you. I also removed the FPS constant and just wrote the numbers in...
|
Forum: C++
Jul 27th, 2008, 2:46 PM
|
|
Replies: 5
Views: 275
SDL opens a terminal on win
I think many of you know the snake game Nokia mobiles had. I made something similar to learn C++. The problem is that I compiled it on Windows with MinGW (g++ -o myprogram.exe mysource.cpp -lmingw32...
|
Forum: Other Programming Languages
Jun 13th, 2008, 2:36 PM
|
|
Replies: 3
Views: 349
Re: Learning haskell
I found help on #haskell@freenode. The problem was that main doesn't like it when you return something.
|
Forum: Other Programming Languages
Jun 13th, 2008, 10:54 AM
|
|
Replies: 3
Views: 349
Re: Learning haskell
This is what I get from ghci:
Occurs check: cannot construct the infinite type: a = IO [a]
Expected type: IO [a]
Inferred type: a
In the expression: foldl (+) 0 (number : rest)
Wow,...
|
Forum: Other Programming Languages
Jun 12th, 2008, 2:19 PM
|
|
Replies: 3
Views: 349
Learning haskell
I'm trying to understand haskell. A tutorial told me to write a program that would calculate the sum of the numbers you put in.
module Test where
import IO
main= do
putStrLn "Please enter...
|
Forum: C++
Mar 17th, 2008, 9:29 AM
|
|
Replies: 13
Views: 483
Re: Newb interactive fiction
Thanks for helping. Is -> used with pointers? There's still a problem. When I run it, type in "look" and then "n" it crashes.
EDIT: it's because handle_input returns 0 after "look". I replaced it...
|
Forum: C++
Mar 17th, 2008, 7:41 AM
|
|
Replies: 13
Views: 483
Re: Newb interactive fiction
I tried to take it further but it's now even more f*d up. I have trouble understanding this pointer stuff.
#include <iostream>
#include <string>
#include <map>
#include <cstdlib>
class Room
{
...
|
Forum: C++
Mar 17th, 2008, 4:36 AM
|
|
Replies: 13
Views: 483
Re: Newb interactive fiction
Thanks for your help people. I coded python before and in python it seemed that only classes and objects had namespaces.
Is it a rule that you should usually define classes before anything...
|
Forum: C++
Mar 16th, 2008, 3:31 PM
|
|
Replies: 13
Views: 483
Newb interactive fiction
I'm trying to learn C++ and I started coding an interactive fiction game for practice and I can't get this to compile:
#include <iostream>
#include <vector>
#include <string>
#include <cstdlib>
...
|
Forum: Show Off Your Open Source Projects
Nov 9th, 2007, 10:17 AM
|
|
Replies: 12
Views: 794
Re: Another tic tac toe
I made an AI for it. I wanted to do it with minimax but python+my skills made it too slow. So I did in a different (ugly in some places) way. I don't know if it's unbeatable but I haven't beaten it...
|
Forum: Other Programming Languages
Jun 3rd, 2007, 2:53 PM
|
|
Replies: 58
Views: 2,940
D is not that...
D is not that slow:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all
|
Forum: Coder's Corner Lounge
May 31st, 2007, 6:32 AM
|
|
Replies: 11
Views: 276
|
Forum: Coder's Corner Lounge
May 31st, 2007, 6:30 AM
|
|
Replies: 15
Views: 319
I don't have a...
I don't have a desktop:
http://img216.imageshack.us/img216/3374/deskscreenxz3.jpg
|
Forum: HTML / XHTML / CSS
May 31st, 2007, 6:23 AM
|
|
Replies: 6
Views: 244
|
Forum: JavaScript and Client-Side Browser Scripting
May 20th, 2007, 12:16 PM
|
|
Replies: 0
Views: 163
Flickr style comments
You know the feature of flickr where you can add comments on the images and then read them when you hover over the image? How to get text to pop up when hovering over an image with javascript? A...
|
Forum: Show Off Your Open Source Projects
Mar 19th, 2007, 2:59 PM
|
|
Replies: 12
Views: 794
|
Forum: Show Off Your Open Source Projects
Mar 19th, 2007, 6:42 AM
|
|
Replies: 12
Views: 794
Another tic tac toe
http://commodore.gran.ee/tictactoe.zip
The "source" folder contains the python file which can also be ran on Linux. The tictactoe folder contains the windows executable (python and pygame are not...
|
Forum: Visual Basic .NET
Mar 18th, 2007, 3:05 PM
|
|
Replies: 3
Views: 224
|
Forum: Other Programming Languages
Jan 3rd, 2007, 3:06 PM
|
|
Replies: 40
Views: 1,043
|
Forum: Other Programming Languages
Jan 3rd, 2007, 11:00 AM
|
|
Replies: 40
Views: 1,043
|
Forum: Other Programming Languages
Jan 3rd, 2007, 9:05 AM
|
|
Replies: 40
Views: 1,043
Companies, companies, companies. Do you people...
Companies, companies, companies. Do you people program to earn money? I program because it's fun, interesting and I enjoy it. Even if I would earn money off it someday, it would be because I need...
|
Forum: Other Programming Languages
Jan 2nd, 2007, 12:49 PM
|
|
Replies: 40
Views: 1,043
Why is everyone .NETing?
I see people using .NET languages all the time. Why are they so popular? Is it because .NET is so good? Or Microsoft's propaganda? Or because they teach them in schools? Why do they use .NET for...
|
Forum: Community Introductions
Jan 2nd, 2007, 12:39 PM
|
|
Replies: 12
Views: 314
|
Forum: HTML / XHTML / CSS
Dec 30th, 2006, 7:26 AM
|
|
Replies: 2
Views: 201
|
Forum: Java
Dec 29th, 2006, 3:09 PM
|
|
Replies: 4
Views: 260
|
Forum: HTML / XHTML / CSS
Dec 29th, 2006, 2:53 PM
|
|
Replies: 2
Views: 201
Expanding <a>
http://commodore.gran.ee/test/
How can I make the <a> tag the width of the rest? I put it in a div and succeeded but then I can't click on the whole thing.
Don't worry about the other things :P it's...
|
Forum: Python
Dec 29th, 2006, 2:50 PM
|
|
Replies: 15
Views: 578
|
Forum: JavaScript and Client-Side Browser Scripting
Dec 5th, 2006, 11:58 AM
|
|
Replies: 5
Views: 262
|
Forum: JavaScript and Client-Side Browser Scripting
Dec 5th, 2006, 10:28 AM
|
|
Replies: 5
Views: 262
HTML Parameters to document.form.submit()
I have a submit similar to this <input type="submit" class="asdf"....
How can I use the "class=""" with javascript's document.form.submit() or do I have to use some other trick?
|
Forum: PHP
Nov 17th, 2006, 12:01 PM
|
|
Replies: 4
Views: 147
|
Forum: PHP
Nov 16th, 2006, 2:19 PM
|
|
Replies: 4
Views: 147
if in
I can do this in python:
if "asdf" in list:
do stuff
Can I do something like that to an associative array in PHP?
|
Forum: Coder's Corner Lounge
Nov 2nd, 2006, 11:36 AM
|
|
Replies: 7
Views: 187
|
Forum: Python
Jun 16th, 2006, 6:38 AM
|
|
Replies: 10
Views: 344
|
Forum: Python
Jun 15th, 2006, 3:57 AM
|
|
Replies: 1
Views: 126
Branching&loops problem
I have some if and elif statements that I use multiple times so I put them in a def. Now I have a while loop whic start with the defdfunction() and then has elif statements (because the if statement...
|
Forum: Coder's Corner Lounge
Jun 15th, 2006, 3:46 AM
|
|
Replies: 53
Views: 1,036
|
Forum: Other Programming Languages
Jun 4th, 2006, 8:29 AM
|
|
Replies: 3
Views: 223
|
Forum: Other Programming Languages
Jun 4th, 2006, 2:49 AM
|
|
Replies: 3
Views: 223
|
Forum: Coder's Corner Lounge
Jun 3rd, 2006, 1:28 PM
|
|
Replies: 19
Views: 523
|
Forum: Coder's Corner Lounge
Jun 3rd, 2006, 1:26 PM
|
|
Replies: 9
Views: 269
|