Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - markbilly

#321
Lovely! can't wait for something to come of this! ;)
#322
General Discussion / Re: I'm messed up
Sun 20/12/2009 12:18:26
Quote from: Andail on Sun 20/12/2009 08:34:49
I know what your problem is. Since you have little else in your life going on right now, there's so much pressure on you to accomplish something during all those lonely hours in front of the computer.
You need to make that time precious, something rare. You need to fill your days with more than just a monitor staring back at you.

This is so true. I have been waiting for the whole of term for my Christmas holiday so I can get a bit further with my game, but truth is, I've got a staggering amount done in term time and nothing in the holiday. This is because during term time (when I have uni work to do and a girlfriend to spend time with) the few hours I get to work on it are so precious that is all I want to do. And so I get loads done.
#323
Site & Forum Reports / Re: New AGS Website
Sun 20/12/2009 12:07:52
Quote from: SSH on Sun 20/12/2009 09:29:21
User ratings could have half-cups or even smaller fractions.

Why not then just have a percentage? Which is what there is now?

I like the idea of red cups. But has to be 1-5.
#324
I love these characters, they are brilliant. On the subject of a matching background style, I think they would work on a full-colour background, even. Or if you drew full-colour then grey-scaled it, they would look pretty good...

Black and white backgrounds would be a challenge, but if you pulled it off it would be fab!
#325
Critics' Lounge / Re: A little game concept.
Fri 18/12/2009 12:18:45
I really like it, but there's no need for gradients and such with that low a res. Stick to solid colours, or it starts looking messy. :)
#326
Quote from: Crimson Wizard on Thu 17/12/2009 14:06:03
There's also this stupid joke that makes CD/DVD player tray eject and close over and over again. I read about that, scanned WinAPI documentation, found needed functions and wrote a small console app that did that. Never made a prank with this though,but I guess its possible if you make an inviisble window and put executable to Windows autorun folder  ;D

Yeah, I think someone did that to me a high-school. The disc tray opened every time I clicked or something :) can't really remember but it was bloody funny!
#327
Well done! All of those games look brilliant, too! :)
#328
I think the point Ben was making was not that nice graphics make a game better, but they are likely to persuade people to download it, more than a game with lesser graphics.
#329
General Discussion / Re: Sprite designers
Tue 15/12/2009 15:06:11
Paint Shop Pro 7 Anniversary Edition. It comes with Animation Shop, which is great for testing animations and making gifs and the main package, PSP, is pretty solid...

Also, you can pick it up really cheap because it's an old version.
#330
I've really enjoyed the game, though I haven't finished it yet. But I don't need to have finished it to know from other peoples' comments it is at least a 3 cup game.

I think the role of the panel needs to be seriously discussed by the forum community and some change/arrangement should be agreed.

This isn't the first time something like this has happened. Also, I think the issue of the panel not being able to review every game in the same time-frame after release is a major discussion point.
#331
Looks lovely, can't wait! I'm not going to ask any questions, don't worry! ;)
#332
Quote from: Ben304 on Fri 04/12/2009 11:32:04
I stuck with 2.71 for a fair while, and then for some strange reason decided to try 3.xx.

And I realized how insanely good 3.xx is compared to that old thing.

Same experience as Ben, really. I would recommend people just try the new one (3.xx) it may be really different to start with, but it is so much better!
#333
Not to worry. This was a uni assignment so I just looked up the amount of credit I get for it and decided it wasn't worth the effort, frankly. I've been pouring over it for hours. I just submitted what I had, so should still get some marks.

Thanks everyone for the help, though! :)
#334
For 1.1 I get:

number of lines: 14007
answer to integral: 2.254410

the answer should be about 0.75, though. Also, for arguments less than 1 it goes funny and has the 2, 0.000000 output.
#335
That just returns area as zero all the time, now.

Getting output:

number of lines: 2
answer to integral: 0.000000
#336
This is the full code, I'm get the value of the area under a function between 0 and the "upper_lim" i.e. upper limit of integration. The data file contains x values in one column and corresponding f(x) values in another column.

The code is rubbish. I'm not 100% sure what I'm doing.

Code: ags


#include <stdio.h>
#include <stdlib.h>
#include <math.h>

/*define function*/
float area_intg(float *fnc_fx, float *fnc_dx, int lines);

int main(int argc, char* argv[])
{   
	/*define a float for user-inputed upper limit of integration*/
    float user_input, upper_lim, answer;
	float *value_x, *value_xmin1, *dx, *fx, *fx_xmin1;
	
	/*Check the upper limit is enter via command-line correctly*/
    if (argc != 2)
    {
             printf("Need to enter upper limit of integration \n");
             exit(EXIT_FAILURE);
    }
    
	/*Assign the user's string input to the float "upper_lim"*/
    user_input = sscanf(argv[1], "%f", &upper_lim);
    
    /*upper_lim = atof(argv[1]);*/
    
    /*Check upper_lim is valid*/
    if (upper_lim == 0)
    {
     printf("Upper limit cannot be 0, this is the lower limit. \n");
     exit(EXIT_FAILURE);
    }
    if (upper_lim >= 1.57)
    {
     printf("Upper limit cannot exceed pi/2. \n");
     exit(EXIT_FAILURE);
    } 
    
	/*open the file containing data*/
	FILE *input;
	const char file_input[] = "px270prog3a.dat";
	input = fopen(file_input, "r");
	
	/*Find "num_lines" using while loop*/
	int num_lines = 0;
	float num_on_line;
	
	while (num_on_line <= upper_lim) 
	{
        fscanf(input, "%f", &num_on_line);
		num_lines++;
	}

    
	/*manually assign number of array arguments, using malloc*/
	value_x = (float*) malloc(sizeof(float) * num_lines);
	value_xmin1 = (float*) malloc(sizeof(float) * num_lines);
	fx = (float*) malloc(sizeof(float) * num_lines);
	dx = (float*) malloc(sizeof(float) * num_lines);
	
	/*scan file and store data in arrays*/
	int n = 0;
	
	for (n = 0; n < num_lines; n++)
	{
		fscanf(input, "%f %f", &value_x[n], &fx[n]);
		fscanf(input, "%f", &value_xmin1[n-1]);
		dx[n] = value_x[n] - value_xmin1[n-1];
	}
	
	answer = area_intg(fx, dx, num_lines);
	
	printf("number of lines: %i \nanswer to integral: %f \n", num_lines, answer);
}

float area_intg(float *fnc_fx, float *fnc_dx, int lines)
{
	float area;
	int j;

	for (j = 1; j < (lines); j++)
	{
           area += fnc_fx[j-1] * fnc_dx[j];
	}
	return(area);
}

#337
It doesn't matter whether I use %i, %f, %g, whatever, it still returns a value of zero. Whether that is by displaying it as 2.7e-310 or 0.000000 or just 0.

There is something messing up with the loop and I can't work out what...
#338
The list of numbers are like this.

So they have to be scanned as floats, surely?

#339
num_lines is an int

upper_lim and num_on_line are floats

a printf("number of lines: %f \n", num_lines); gives the nonsense number.
#340
Yes. My brother (a social scientist) called me that once. He doesn't any more! ;)

Any ideas on the program?
SMF spam blocked by CleanTalk