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.


Messages - nemo

Pages: 1 ... 20 21 [22] 23 24 ... 82
316
Art / Re: 20x20 enemy sprite, critique.
« on: December 11, 2010, 08:59:54 pm »
alright, i think this is good enough. i'm too lazy to make it any better. unless anyone points out something crippling or has a good suggestion.

317
Oasis / Re: OS Poll
« on: December 11, 2010, 08:08:31 pm »
i can test on XP. i'm not much an assembly person, though. so you'll have to give me instructions on how to test/what to test.

318
Art / Re: 20x20 enemy sprite, critique.
« on: December 11, 2010, 07:57:36 pm »
So far so good?

edit: i just realized i'm being inconsistent with my leg-shading. fixed that.
edit2: and i'm lacking the light gray belt in some of them. fixed.

319
Oasis / Re: OS Poll
« on: December 11, 2010, 07:39:50 pm »
XP

320
it was fun to make. i don't know what i want to make next though.

321
The Axe Parser Project / Re: Programs written with an Axe program
« on: December 11, 2010, 03:39:01 pm »
yeah i didn't include error checking because i would hope that people have at least 10 bytes to spare on their calculator. that is neat though, absorbing other variables directly into your program. why are you taking it out next version?

322
TI Z80 / Re: FALSE
« on: December 11, 2010, 12:21:49 am »
oh. i was going to say, there's no dim(L1) in axe. but yeah it's 712 bytes.

323
TI Z80 / Re: FALSE
« on: December 11, 2010, 12:17:03 am »
dim(L1) returns the dimensions of L1. so if L1 = {3,6,2}, dim(L1) = 3.

or do you mean axe?

324
nice, yeong!


next java mini-project i'm working on: linear equation solver (via rref).
done. here's the code, it's fairly obfuscated.... so good luck if you want to understand it.

Code: [Select]
import java.util.Scanner;

public class Solve{
static double[][] matrix;
public static void main(String[] args){
Scanner reader = new Scanner(System.in);
System.out.print("# of variables: ");
int vars = reader.nextInt();
inputValues(vars,vars+1);
for(int col = 0; col < vars; col++){
for(int row = 0; row < vars; row++){
if(row==0)
matrix[col] = rowDiv(matrix[col],matrix[col][col]);
if(row!=col)
matrix[row] = rowAdd(rowDiv(matrix[col],-1/matrix[row][col]),matrix[row]);

}
}
for(int i = 0; i < vars; i++)
System.out.println("xyzuvw".substring(i,i+1) + "= " + Math.round(matrix[i][vars]*1000)/1000.0);

}

public static void inputValues(int rows, int columns){
String equ = "Ax+By+Cz+Du+Ev+Fw".substring(0,rows*3-1) + "=" + "ABCDEFG".substring(rows,rows+1);
matrix = new double[rows][columns];
Scanner reader = new Scanner(System.in);
for(int r = 0; r < rows; r++){
System.out.println("Enter equation " + (r+1) + ": \n" + equ);
for(int c = 0; c < columns; c++){//C++
System.out.print("ABCDEFG".substring(c,c+1)+"= ");
matrix[r][c] = reader.nextInt();
}
System.out.println();
}
}

public static double[] rowDiv(double[] r, double c ){
double[] temp = new double[r.length];
for(int p = 0; p < r.length; p++)
temp[p] = r[p] / c;
return temp;
}

public static double[] rowAdd(double[] i, double[] j){
double[] temp = new double[i.length];
for(int p = 0; p < i.length; p++)
temp[p] = i[p] + j[p];
return temp;
}
}

it can take up to 6 variables, but as far as i know if i modified it a little, it could take an infinite number. it returns numbers to the thousandth decimal place. oh, and it will not tell you if there are no solutions/infinite solutions. it will likely do one of the following things in either of these scenarios:
-tell you that all the variables are 0.
-tell you that all the variables are NaN (not a number)
-tell you that all the variables are either -Infinity or Infinity.

325
Art / Re: 20x20 enemy sprite, critique.
« on: December 10, 2010, 09:07:07 pm »
changes made. i tried to implement most of what you guys asked for an added a little extra too, i think it turned out well. it's 18 pixels wide and 20 tall (the attachment says 20 wide, but those are just 2 transparent columns). now to get a running animation out of him... by the way, i didn't implement bent legs because it's hard to show bent legs when the sprite is standing with his shoulders squared towards you.

326
The Axe Parser Project / Re: Axe Parser
« on: December 10, 2010, 07:54:24 pm »
On second thought, I could just check a 1-byte value against all my 1-byte tokens, and then, if i got no hits, load the second byte and check all the two-byte tokens...

But I don't want to have to look all my tokens up in a table... ah well... tibasicdev has a good table.

you don't have to look up all your tokens in a table, i don't think... use t on a two byte token will work just as well as it will on a one byte.

327
The Axe Parser Project / Re: Axe Parser
« on: December 10, 2010, 07:51:07 pm »
i've probably linked to this page 100 times this week. this'll help you decide what tokens are two-byte tokens. store your token into {L1}, and if {L1} is one of the numbers that is indicates a two-byte token, read the next byte into {L1+1} and go through your checks from {L1}r. i'm not 100% sure this will work though, it is on the right track, since i've never done this before.

328
Art / Re: 20x20 enemy sprite, critique.
« on: December 10, 2010, 07:43:26 pm »
get rid of red so we can use in calc?

it's a computer game...

329
Art / 20x20 enemy sprite, critique.
« on: December 10, 2010, 07:40:42 pm »
well, here he is. is there anything different you would do to him? pretty soon i'll get him a running animation.

330
The Axe Parser Project / Re: Axe Parser
« on: December 10, 2010, 07:39:00 pm »
i'm confused... from what source? a string? a program? and parsing them so you can.. display them? store their integer equivalents into a free ram area?

Pages: 1 ... 20 21 [22] 23 24 ... 82