Hey guys, I'm having some trouble texturing a square in WebGL, it was working fine before when I was using a color buffer, but now it just does not want to render at all, [url=http://dl.dropbox.com/u/6553431/webgl/webgl.htm]here[/url]'s the page.
Can someone give me an idea on what to program in C#?
I've been studying it for about 3 months and I'm looking to do something other than my assignments I get from college, and hopefully a bit of a challenge which will help me learn.
Please?
Keep in mind I've only studied it for 3 months so I'm not über good but give me a challenge :3
[QUOTE=Robbi;35229645]Can someone give me an idea on what to program in C#?
I've been studying it for about 3 months and I'm looking to do something other than my assignments I get from college, and hopefully a bit of a challenge which will help me learn.
Please?
Keep in mind I've only studied it for 3 months so I'm not über good but give me a challenge :3[/QUOTE]
Write a program the compresses and hides files in images.
Also known as steganography.
[QUOTE=Richy19;35218003]Im trying to build Bugle on linux (as gDebugger doesnt work) but when i run scons I get: error: #error "Your GL/glext.h is too old! Please obtain the latest version from http://www.opengl.org/registry/"
Is it advisable to just overwrite the current glext.h with a new one from opengl.org?[/QUOTE]
what distro of linux are you using? you can probably get an updated glext .h through your package manager.
[QUOTE=Naelstrom;35231847]what distro of linux are you using? you can probably get an updated glext .h through your package manager.[/QUOTE]
Lubuntu 11.10 I had a look for glext but nothing showed up on the synaptic package manager
[QUOTE=Richy19;35232316]Lubuntu 11.10 I had a look for glext but nothing showed up on the synaptic package manager[/QUOTE]
mesa-common-dev should provide this, if I remember correctly.
[QUOTE=T3hGamerDK;35232550]mesa-common-dev should provide this, if I remember correctly.[/QUOTE]
Yea I have te latest version
Anyone have an in depth explanation of OOP with examples of where it would be a good idea to use it and where it wouldn't be a good idea?
[QUOTE=Robbi;35229645]Can someone give me an idea on what to program in C#?
I've been studying it for about 3 months and I'm looking to do something other than my assignments I get from college, and hopefully a bit of a challenge which will help me learn.
Please?
Keep in mind I've only studied it for 3 months so I'm not über good but give me a challenge :3[/QUOTE]
An obfuscator using Mono.Cecil.
Hi Facepunch,
Can you help me with some Comp Sci homework? I'd greatly appreciate it.
We're working in Java and are covering the "While
statement.
"Write a program to compute the average of a certain number of integers. First, ask the user how many numbers they wish to average. Then use a while loop to continually prompt the user for numbers and print the average at the end."
[QUOTE=humpalump;35234788]Hi Facepunch,
Can you help me with some Comp Sci homework? I'd greatly appreciate it.
We're working in Java and are covering the "While
statement.
"Write a program to compute the average of a certain number of integers. First, ask the user how many numbers they wish to average. Then use a while loop to continually prompt the user for numbers and print the average at the end."[/QUOTE]
sure...
[code]
num amount = get user input;
num curr = 0;
num total = 0;
while(amount != curr)
{
total += get user input;
curr += 1;
}
print( total/amount );
[/code]
You could do something like:
[code]
int sum = 0;
int numNums = 0;
while(numNums < 10)
{
int read = get number lol i forgot how java does this
numNums++;
sum += read;
}
print(read / (float)numNums);
[/code]
or something
[editline]21st March 2012[/editline]
ninjad's by the same thing
[img]http://puu.sh/lNjZ[/img]
[editline]21st March 2012[/editline]
Any help?
Do you want to bounce off walls or just stop there?
I already got it so it stops, it works when going left and upwards, but when you go into a wall downwards, I dont know what to do. Putting this.xSpeed*=0.1; into if(this.xSpeed>0) doesn't work properly, as in you get stuck in the wall and start really slowly moving through it.
Don't blindly reverse direction.
You need to know the surface normal. If you're working with AABB's it's pretty trivial.
A left-facing wall will have a surface normal w/ x=-1. A right-facing wall will have a surface normal with x=1. Up and down are similar, but they are oriented to the y-axis.
Your collision response function should be something like:
[i]v += (1.0 + elasticity) * n * -dot(v, n)[/i]
Whoops my bad. But why are you using this.xpseed? I use C++ so I might sound dumb.
Can you put that in terms of retard? Sorry, I don't understand.
[editline]21st March 2012[/editline]
This is AS2 by the way.
And I find it cleaner to have it this.xSpeed so I can have seperate xSpeed and ySpeed values for my enemies.
Oh I have no idea about AS2 so disregard anything I've said about that. In C++ you could just use xspeed instead of this->xspeed.
[QUOTE=C:\;35237698]Can you put that in terms of retard? Sorry, I don't understand.[/QUOTE]
Suppose the object is going right. It collides with a right-facing wall (this is physically impossible, but it occasionally occurs when you simulate mechanics in discrete time intervals). Your code would take the object, which is trying to exit the wall, and shove it straight back into the wall, since it reverses direction without taking into account the orientation of the surface with which it is colliding.
The other work-around is to move the ball back to where it was before it started colliding, which would prevent that case from ever occurring in a static environment. Personally, I'd probably do both.
[QUOTE=mutated;35212462]What's a good way to set up file structure in Java? I can create packages just fine, which organizes all my class files, but I'd prefer to split source files into folders so I can look at them much more easily - I have a lot of files and I intend to add more.[/QUOTE]
Hey guys, I just started my Java course, can anyone help me with this?
[csharp]/**
* @author Derp
* Calculates and displays the future value of a given amount
*/
import java.util.Scanner;
public class FutureValue
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
// Header
System.out.println("Future Value Calculator");
// Input for initial capital
System.out.print("Enter the investment amount: ");
double amount = input.nextDouble();
// Input for annual interest rate as a percent
System.out.print("Enter the annual interest rate as a percent (2.75): ");
double monthlyInterestRate = input.nextDouble();
// Input for number of years
System.out.print("Enter the number of years: ");
double years = input.nextDouble();
// Calculate
double futureValue = amount * Math.pow((1 + monthlyInterestRate), years);
System.out.print("The future value is: ");
System.out.printf("%.2f", futureValue);
}
}
[/csharp]
My math is off badly, though, since I get this;
[csharp]
Future Value Calculator
Enter the investment amount: 1000
Enter the annual interest rate as a percent (2.75): 3.25
Enter the number of years: 2
The future value is: 18062.50[/csharp]
As the output.
It should be;
[csharp]
Future Value Calculator
Enter the investment amount: 1000
Enter the annual interest rate as a percent (2.75): 3.25
Enter the number of years: 2
The future value is 1067.07[/csharp]
I'm stumped, some online calculators got 1067.07, but I have no idea what the correct formula is.
You want to use the value over 100, not in percentage. montlyInterestRate (why isn't this called yearly investment rate if you're using an annual input) would be divided by 100. Your investment formula was slightly off.
[csharp]
public class FutureValue
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
// Header
System.out.println("Future Value Calculator");
// Input for initial capital
System.out.print("Enter the investment amount: ");
double amount = input.nextDouble();
// Input for annual interest rate as a percent
System.out.print("Enter the annual interest rate as a percent (2.75): ");
double monthlyInterestRate = input.nextDouble();
// Input for number of years
System.out.print("Enter the number of years: ");
double years = input.nextDouble();
// Calculate
double newMonthlyInterestRate = 1 + (monthlyInterestRate / 100);
double futureValue = amount * (Math.pow((newMonthlyInterestRate), years) - 1); // This will only give you the difference between the initial amount and the amount given through interest
double actualValue = amount + futureValue;
System.out.print("The future value is: ");
System.out.printf("%.2f", actualValue);
}
}
[/csharp]
Gee maybe it's a good idea to describe the issue more specifically than "wtf!!!"
[QUOTE=Plastical;35242003]You want to use the value over 100, not in percentage. montlyInterestRate (why isn't this called yearly investment rate if you're using an annual input) would be divided by 100. Your investment formula was slightly off.
[csharp]
public class FutureValue
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
// Header
System.out.println("Future Value Calculator");
// Input for initial capital
System.out.print("Enter the investment amount: ");
double amount = input.nextDouble();
// Input for annual interest rate as a percent
System.out.print("Enter the annual interest rate as a percent (2.75): ");
double monthlyInterestRate = input.nextDouble();
// Input for number of years
System.out.print("Enter the number of years: ");
double years = input.nextDouble();
// Calculate
double newMonthlyInterestRate = 1 + (monthlyInterestRate / 100);
double futureValue = amount * (Math.pow((newMonthlyInterestRate), years) - 1); // This will only give you the difference between the initial amount and the amount given through interest
double actualValue = amount + futureValue;
System.out.print("The future value is: ");
System.out.printf("%.2f", actualValue);
}
}
[/csharp][/QUOTE]
Thanks for being so helpful, man! :v:
Need a bit of help coding a java GUI
I want to make a button that when clicked, a menu shows up to change the color of that button.
C++:
I'm all of a sudden getting very obtuse crashes when running my program but only part of the time. It crashes about 40-60% of the launches from the debugger (in debug-mode or in release-mode) in Visual Studios, with this error:
[img]http://i54.tinypic.com/4hwraq.png[/img]
To make matters worse, this crash is happening before the entry point of my program.
I'm using OpenAL, Ogg-Vorbis, DirectX, GLM and Awesomium.
I know Ogg-Vorbis is set to the same Runtime Library (Multi-threaded Debug DLL (/MDd)), GLM is header-only, DirectX hasn't given me problems, OpenAL doesn't have a SDK to compile with and is a C api so I don't think it matters, same with Awesomium.
I've tried backtracking by removing the calls to OpenAL, Awesomium and Ogg-Vorbis (but not un-linking the DLLS) and the crashes are still there. Anyone know where to proceed from here?
That error actually autocompletes (even the 0x000007b part) when I type it into google, I'd try that.
Right, just started to learn LUA/Love2d.
Quick question, Is there anyway to only allow the colour mode to affect font/text and not images too?
I'm trying to get some text to fade in and out by changing the alpha variables but it also affects the image that I'm using as a background.
EDIT:
never mind. I just called the method before the image, then after with the alterations before the text
[code]love.graphics.setColor(255,255,255)
love.graphics.draw(titlebg, 0,0)
love.graphics.setColor(255,255,255, alphaVar)
love.graphics.print("press LMB to start!", 225, 500)[/code]
How can i simply generate perlin noise in XNA? I have looked up some tutorials but each one would take a long long time to implement. I simply want to generate perlin noise, then edit it so it only has 2 colors. Its kinda hard to explain, but i think you'll understand. Im using it for 2D tilemap terrain generation by the way.
Sorry, you need to Log In to post a reply to this thread.