[QUOTE=ZenX2;28117430]It looked pretty good in the videos, I doubt it'll turn out bad.[/QUOTE]
Well, maybe not bad, but we'll still have to cut out a few things we really want in the game.
such is programming with deadlines
What kind of overhead is there for a std::stack? Like twenty - thirty bytes?
[QUOTE=TheBoff;28116292]I think Haskell must be the best designed language of any that I have ever used. Everything just fits together so perfectly.[/QUOTE]
It's pretty nice on the whole, but it [url=http://stackoverflow.com/questions/3277840/name-clashes-between-field-labels-of-different-datatypes-in-haskell]does have its flaws[/url].
One thing I think is valuable about learning "unconventional" languages like Haskell is that they introduce you to new concepts, things you don't encounter in common procedural/OO languages, that can change the way you think about designing a program.
For example, [url=http://www.haskell.org/haskellwiki/Partial_application]partial function application[/url] is commonplace in Haskell, and once you learn to recognize the situations where it's useful, you may find that you can apply the technique in [url=http://www.webreference.com/programming/javascript/rg17/]other languages[/url] that don't support it directly. This sort of broadening of your mental "toolbox" makes you a better programmer, no matter which language you're writing code in at the moment.
Some guy tried to send me to a phishing site, so I made a program that spams his server with fake usernames and passwords.
It sends about 1,000 fake credentials per minute. Not fast by any means, but it's fast enough.
[QUOTE=geel9;28119876]Some guy tried to send me to a phishing site, so I made a program that spams his server with fake usernames and passwords.
It sends about 1,000 fake credentials per minute. Not fast by any means, but it's fast enough.[/QUOTE]
Sure hope you are using proxies.
[QUOTE=geel9;28119876]Some guy tried to send me to a phishing site, so I made a program that spams his server with fake usernames and passwords.
It sends about 1,000 fake credentials per minute. Not fast by any means, but it's fast enough.[/QUOTE]
Are the usernames and passwords stored in text files?
[QUOTE=Quark:;28121239]Are the usernames and passwords stored in text files?[/QUOTE]
Better yet, link us.
[QUOTE=Jallen;28111893]Ugh, we are learning Haskell on my computer science course at the moment and I don't know what you guys think about it, but it's such a piece of shit.
I can't think of any reason why I would want to use a functional programming language ever in my life after this, I hate it with a fucking passion.[/QUOTE]
A wise programmer once said, "Haskell is a perfect language that no one will ever use. Its only purpose is to train your mind to think in different ways."
I made my first program in problem in C++ yesterday in my 'solving problems with computer application I' class. Am I a programming king yet
[code]#include <iostream>
using namespace std;
//
int main()
{
//Declaring variables
float ticketA,
ticketB,
ticketC,
ticketAprofit,
ticketBprofit,
ticketCprofit,
totalprofit;
//
float ticketAprice = 15.50,
ticketBprice = 12.75,
ticketCprice = 9.25;
//Promt for user to get input
cout << "Please enter the tickets sold for Ticket A";
cin >> ticketA;
//
cout << "Please enter the tickets sold for Ticket B";
cin >> ticketB;
//
cout << "Please enter the tickets sold for Ticket C";
cin >> ticketC;
//
//Performing calculations
ticketAprofit = (ticketAprice * ticketA);
ticketBprofit = (ticketBprice * ticketB);
ticketCprofit = (ticketCprice * ticketC);
totalprofit = (ticketAprofit + ticketBprofit + ticketCprofit);
//Output results
cout << "The total amount made is $" << totalprofit << ".";
//End the program
return 0;
}
[/code]
[QUOTE=DevBug;28118892]What kind of overhead is there for a std::stack? Like twenty - thirty bytes?[/QUOTE]
[url]http://codepad.org/VBc5Hmpe[/url]
0
It just hides a bunch of functions and provides an own interface to the underlying container, but it doesn't add any member-variables.
Started learning C++ yesterday, and this is what I've come up with so far ~
This is an ISBN number checker, my friend said he was making one in VB for homework, so I said I'd give it a go in C++. He had a different approach, doing each number seperately but I just did the whole thing at once. It works great.
[code]
#include <iostream>
using namespace std;
int main()
{
int even, odd = 0;
long long int isbn;
cout << "Chec"
cin >> isbn;
cout << "Checking ISBN number " << isbn << endl;
long long int cisbn = isbn/10;
while (cisbn>=1){
int last = cisbn%10;
cout << "Parsing " << last << endl;
if ( last%2==0 ){
even=even+last;
} else {
odd=odd+last;
}
cisbn = cisbn/10;
}
int total = even + (odd*3);
if ( ((total%10)) == isbn%10 ){
cout << "ISBN is valid.";
} else {
cout << "ISBN is invalid.";
}
return 0;
}
[/code]
Prime Number Finder
Finds all prime numbers in a certain range.
[code]
#include <stdio.h>
int main()
{
bool isPrime=false;
int low, high;
printf("Low number \n");
scanf("%d", &low);
printf("High number \n");
scanf("%d", &high);
printf( "All prime numbers between %d and %d are \n", low, high);
if (low<=1) printf("1\n");
for( int i = 2; i<= high; i++){
isPrime=true;
for( int n = 2; n<=i;n++){
if( i==n ) continue;
else if( i%n == 0 ) isPrime=false;
}
if(isPrime) printf( "%d\n", i );
}
}
[/code]
This second one I made for a friend doing a uni course and one of my assignments for the day was to make that in C#, I stole some of his code and then finished it off (of course I didn't give it to him, that would be plaigirism on his part if he submitted it!)
My third project and what I'm working on now is a Texas Hold-em Poker game played in the console window. It's a bit optimistic but I think it's going well considering I only started half an hour ago.
[code]
#include <iostream>
using namespace std;
class Card {
public:
int num; //1 2 3 4 5 6 7 8 9 10 11=Jack 12=Queen 13=King 14=Ace
int suit; //1=Hearts 2=Diamonds 3=Spades 4=Clubs
int isHigher( Card ); //Returns 0 if lower, 1 if higher and 2 if equal.
void setup( int, int );
char getSuit(){
switch ( suit ){
case 1:
return 'H';
case 2:
return 'D';
case 3:
return 'S';
case 4:
return 'C';
}
}
};
int Card::isHigher( Card c ){
if ( num < c.num ){
return 0;
} else if ( num == c.num ) {
return 2;
} else if ( num > c.num ) {
return 3;
}
}
void Card::setup( int n, int s ){
num = n;
suit = s;
}
int main()
{
Card deck[56];
//Create card deck;
int curCard=1;
for ( int i=1;i<=4;i++ ){
for ( int j=1;j<=14;j++ ){
deck[curCard].setup( j, i );
cout << deck[curCard].num << deck[curCard].getSuit() << endl;
curCard++;
}
}
//Number of players?
int computer;
cout << "Enter the number of computer players\n";
cin >> computer;
}
[/code]
Looks good?
My maths knowledge seems to help a lot with some of these things.
[QUOTE=Richy19;28117740]Added a couple new features
[URL="http://www.facepunch.com/"]View YouTUBE video[/URL]
[URL]http://youtube.com/watch?v=vO3gQSD2fhw[/URL]
[/QUOTE]
You could make it so that when you do repeated damage (e.g. with the SMP), the existing number (of HP lost) updates and grows in size instead of making a new one on each hit. Magicka does that and it's quite neat
[QUOTE=Quark:;28121239]Are the usernames and passwords stored in text files?[/QUOTE]
I asked him and he said they were.
[QUOTE=geel9;28125263]I asked him and he said they were.[/QUOTE]
-Joke-
-Your head-
[QUOTE=Rocket;28120793]Doesn't that make you as bad as him?[/QUOTE]
I've never understood when people say this. A lot of people's steam accounts are worth over $500 and have the whole community thing attached to them. If I lost my steam account I'd be pretty shattered. Sure you have to be pretty stupid to fall for one of those sites but the fact that they would do that to someone is the main point. Unleashing a spam script on their site is extremely mild.
People who make sites like that can rot in jail for all I care.
Does anyone have any good tutorials for some simple 2D physics?
Box2D and Chipmunk are too heavy for the job.
Also, why should he use proxies? Is the owner of the phish site going to sue him for attacking his illegal website?
[QUOTE=Darwin226;28127215]Also, why should he use proxies? Is the owner of the phish site going to sue him for attacking his illegal website?[/QUOTE]
Yes.
[editline]18th February 2011[/editline]
I mean, he has a valid case there, whether or not the site is illegal. He could just take down all phishing content before doing that.
[QUOTE=Dj-J3;28125700]-Joke-
-Your head-[/QUOTE]
I got the joke. I just found it funny how he actually stored them that way.
The light tiles are the characters immediate FOV. The darkened tiles are previously explored ones, in case it isn't clear.
[img]http://gyazo.com/451f4a242f3d800ef0e232f2ffa1047a.png[/img]
Working on some shaders.
Just finished normal mapping and cubemap reflection shaders.
[b]Normal map[/b]
[img_thumb]http://img23.imageshack.us/img23/1948/67323358.jpg[/img_thumb]
[b]Cubemap reflection[/b]
[img_thumb]http://img833.imageshack.us/img833/6955/95903497.jpg[/img_thumb]
[b]Normal map + Cubemap reflection = [/b]
[img_thumb]http://img232.imageshack.us/img232/9538/37821635.jpg[/img_thumb]
I've been working on a program that calculates some statistical stuff from a list of numbers you input, standard deviation etc.
I had all the maths stuff done from a while ago and recently added some tokenizing(?) so I can get all the input on a single line, I'm still pretty new to programming so excuse my code:
[img]http://img88.imageshack.us/img88/6454/standdevcalc.png[/img]
[b]main.cpp[/b]
[code]
#include<sstream>
#include "StandDevFunc.h"
int main()
{
std::vector<double> nums;
std::string input;
std::cout << "[STANDARD DEVIATION CALCULATOR]\n\n";
std::cout << "Enter the list of values seperated by a space:\n\n";
std::string token;
std::getline(std::cin, input);
std::stringstream ss(input);
while(std::getline(ss, token, ' '))
{
int number;
std::stringstream converter(token);
converter >> number;
nums.push_back(number);
}
if(!(nums.size() <= 1)){
std::cout << "\nMEAN DEVIATION: " << getMeanDev(nums);
std::cout << "\nSTANDARD DEVIATION: " << getStandDev(nums);
std::cout << "\nVARIANCE: " << (getStandDev(nums))*(getStandDev(nums));
std::cout << "\nRANGE: " << getRange(nums);
}
else
{
std::cout << "\nPlease enter 2 or more numbers" << "\n";
}
std::cin.get();
}
[/code]
[b]StandDevFunc.h[/b]
[code]
//Important Functions header
#include<iostream>
#include<math.h>
#include<vector>
double getStandDev(const std::vector<double>& nums);
double getMeanDev(const std::vector<double>& nums);
double getRange(const std::vector<double>& nums);
double getDiff(double a, double b);
double getStandDev(const std::vector<double>& nums)
{
std::vector<double>::const_iterator iter;
double sum = 0;
double sumTemp = 0;
double mean = 0;
for(iter = nums.begin(); iter < nums.end(); iter++){ //Find sum of all values in vector
sum += *iter;
}
mean = sum / nums.size(); //Divide by vector size to find mean
for(iter = nums.begin(); iter < nums.end(); iter++){ //Subtract the mean from each value then square the result, add to sumTemp
sumTemp += ((*iter - mean)*(*iter - mean));
}
sum = sqrt(sumTemp / (nums.size() - 1)); //Find squareroot of sum divided by amount of values
return sum;
}
double getMeanDev(const std::vector<double>& nums)
{
std::vector<double>::const_iterator iter;
double sum = 0;
double sumTemp = 0;
double mean = 0;
for(iter = nums.begin(); iter < nums.end(); iter++){ //Find sum of all values in vector
sum += *iter;
}
mean = sum / nums.size(); //Divide by vector size to find mean
for(iter = nums.begin(); iter < nums.end(); iter++){ //Subtract the mean from each value then square the result, add to sumTemp
sumTemp += getDiff(*iter, mean);
}
sum = sumTemp / (nums.size()); //Find squareroot of sum divided by amount of values
return sum;
}
double getRange(const std::vector<double>& nums)
{
double largest = 0;
double smallest = 0;
for(std::vector<double>::const_iterator iter = nums.begin(); iter < nums.end(); iter++){
if(*iter > largest){
largest = *iter;
}
}
smallest = largest;
for(std::vector<double>::const_iterator iter = nums.begin(); iter < nums.end(); iter++){
if(*iter < smallest){
smallest = *iter;
}
}
return largest - smallest;
}
double getDiff(double a, double b)
{
if(a > b){
return a-b;
}
else{
return b-a;
}
}
[/code]
Working on a nice OpenGL3 wrapper/library for 2D stuff around OpenTK.
I'm getting these strange errors.
When rendering triangles, it renders fine:
[img_thumb]http://i56.tinypic.com/2jaccqq.png[/img_thumb]
But when I render as line strip it always has this black line going from the last point to the middle of the screen.
[img_thumb]http://i55.tinypic.com/o56ukp.png[/img_thumb]
Any ideas what could be causing that? The attribute pointers are the same for triangles and line strips since the data is formated the same so I don't know what could be wrong.
It doesn't matter how many points I give it, always one black line going from the last one to the middle.
Edit:
Fixed. Turns out I was giving GL.DrawArrays the length of the buffer instead of the number of vertices.
this will be my life for the next week: [url]http://www.opentk.com/doc/chapter/2/glcontrol[/url]
Converting OpenGL ES 1.0 in Java to whatever version OpenTK is using in C# so that we can have a level editor. Also need to brush up on my XSD writing skills, so that I can have Visual Studio generate the XML class structures.
And we found people who are willing to do art and music.
Is MonoDevelop a good IDE for C++ development on Linux? Code::Blocks does the job, but I'd like something better.
Learning Python, working on a simple text adventure game: [url]http://codepad.org/wyLmdFVd[/url]
I'm herping hard enough to derp here, anyone got advice on how to set this out?
I'm having a hard time to choosing what language/library to make a game with/in.
[list]
[*]LÖVE, Lua: Very nice & easy language and framework but no 3d nor drawing textured polygons;
[*]OpenTK, C#: Nice & easy language and framework but no TrueType text drawing;
[*]XNA, C#: Nice & easy language but clumsy polygon drawing and clumsy SpriteBatch bullshit;
[*]SFML, C++: Framework has everything I need but C++ is just too hard for me right now;
[*]Game Maker: Extremely easy but not a powerful framework and also laggy + Windows only;
[*]Processing: Easy language but it's very tough to make a complete game with it.
[/list]
Any help here?
Do you [u]need[/u] 3D? If not, I'd say LÖVE.
[QUOTE=thelinx;28129332]Do you [u]need[/u] 3D? If not, I'd say LÖVE.[/QUOTE]
Yeah, my main choice was LÖVE until I discovered that 3D and drawing textured polygons is impossible. For some reason, I hava a fetish for drawing textured polygons: if I can't do it in a language, I instantly back off :v:
Also, the physics engine doesn't allow meshes with more than 8 vertices, which is bullshit.
SFML and C#?
Sorry, you need to Log In to post a reply to this thread.