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 ... 21 22 [23] 24 25 ... 82
331
« on: December 10, 2010, 06:29:36 pm »
ok I can avoid using it in calls (or just use 'pop de/pop hl/push de' etc), and using it to store/recall the Ans is exactly what I'm using it for. Also, I'll have a counter so that I know how many items are in the stack at a given time. Also gotta avoid using it in the middle of routines. like no Output(0,0,Asm(E1)>Dec), that'll probably cause an error
EDIT: also, while I'm here, "Str1" is sufficient for a GetCalc( filename, right?
yes, Str1 is free game.
332
« on: December 10, 2010, 05:19:25 pm »
Copy(Data(tDisp,t",'I',t")),GetCalc("prgmTEST",4),4)
333
« on: December 09, 2010, 10:44:52 pm »
Lol, "apple this magical unicorn". Interesting program, nemo. I love the comment on that return statement.
EDIT: What would be really funny, is to analyze the sentence, and get a new version that was "prettier" so that everyone talked pretty.
So "Hey, I think your program is a fail" becomes "I think your program is missing some butterflies, but other than that, I think the unicorns were happy."
i think that's a little beyond my word processing abilities. it'd be cool if i made an advanced library to process strings, though. also, if you want, you can just copy/paste my source code and add words. if you want to add the swear words list to include "snow" for some reason, you can do that. you can also add replacement words, if you wanted to replace snow with honey. maybe i could make a function that, when a certain word is spotted, it will always replace it with a certain other word...
334
« on: December 09, 2010, 09:57:47 pm »
interesting. you know what i just thought of doing? censoring a string to take out all the swear words edit: just finished it. it will change something like this: into You endearing unicorn. import java.util.*;
public class Censor{ public static void main(String[] args){ Scanner reader = new Scanner(System.in); System.out.print("Enter a string to censor: "); String evilness = reader.nextLine(); System.out.println("Your string in a more holy format: \n" + censor(evilness)); System.out.print("\nAgain? (y/n) "); if(reader.nextLine().equalsIgnoreCase("y")) main(null); //recursive calls to main? i think yes. }
public static String censor(String evilness){ String[] badWords = {"fuck","shit","damn","ass","FUCK","SHIT","DAMN","ASS"}; //yes, i know there are more swear words. this covers the basics. String[] replacementWords = {"apple","magical","unicorn","fairies","endear","renowned","butterflies","sugar"}; Random r = new Random(); for(int i = 0; i < badWords.length; i++){ int indexOfBadWord = evilness.indexOf(badWords[i]); if(indexOfBadWord != -1){ String begin = evilness.substring(0,indexOfBadWord); String replacement = replacementWords[r.nextInt(replacementWords.length)]; String end = evilness.substring(indexOfBadWord + badWords[i].length()); evilness = begin + replacement + end; i = -1; } } return evilness; //now holy. } }
335
« on: December 09, 2010, 08:12:03 pm »
Looks really good.
Will it have a story mode to match? I recently played a portal game done in basic that was good. the story was okay, but was lackluster due to it only being text.
that portal game in basic was most likely builderboy's (:
336
« on: December 09, 2010, 07:28:55 pm »
question 3b will be answered once i recall my knowledge of the sin/cos routines.
Hint: They return a value between 0 and 255 and are normal otherwise.
no, they return a value between -127 to 127. and they are not normal otherwise. they have a period of 256, not 2pi. also, i was thinking of the problem of making a routine which retains a constant speed while being able to change your direction. linear bullets are easy because you just have an x velocity and y velocity, like michael lee said.
337
« on: December 09, 2010, 07:23:48 pm »
to start, no one is stealing your idea to make doodlejump. to be frank, doodle jump has been at least partially ported in axe already. if i want to make a doodle jump clone, i will. alright... many questions. i'll start with the first. 1. use some of the free RAM areas. use L1. so {L1} contains the first bullet's X pos, {L1+1} is the Y pos. {L1+2} is the second bullet's x pos, {L1+3} likewise. 2. you cannot. well, you *can*, but it's not really worth the trouble. 3a. this is the one i feel confident in explaining. when division occurs, the remainder is truncated. 1/3 produces 0. 5/6 produces 0. 7/6 makes 1. this is only a downfall if you plan on making a math program. in which case, you shouldn't be programming in axe, you should be programming in TI-Basic. i'll give a code snippet to make a black square jump up and down when you press [2nd]. horizontal movement i'll leave up to you. basically, you need a velocity variable and a position variable. you also need a number. we'll pick 16. the screen is 96 pixels wide and 64 tall. as you said, you can't display something at .5 of a pixel. so, we must enlarge the screen. if our screen were 192 pixels tall and 128 tall, we'd technically be able to place a sprite at twice the precision as if the screen was 96 by 64. therefore, our X and Y position variable is going to be twice as large right? why don't we just pretend? let's say the screen is 96*16 pixels wide, and 64*16 tall. then, everytime you add 1 to your X position, you are technically moving it by 1/16th of a pixel.
ClrDraw [FFFFFFFFFFFFFFFF]->Pic1 Line(0->V,58,96,58) 800->Y Repeat getKey(15) If Y=800 and getKey(54) // if there's no velocity and you press [2nd] 20->V //increase that velocity. End If Y-V->Y<800 //collision detection here V-1->V Else 0->V End Pt-Change(8,Y/16,Pic1) DispGraph Pt-Change(8,Y/16,Pic1) End
question 3b will be answered once i recall my knowledge of the sin/cos routines.
338
« on: December 09, 2010, 03:44:12 pm »
oh, or you could do this: TDisp->{P}
339
« on: December 09, 2010, 03:42:22 pm »
this table will help you greatly. Copy([656667686970717273747576777879808182838485868788899091],P,26) ^should copy the alphabet into whatever's at P.
340
« on: December 08, 2010, 10:29:24 pm »
i can't figure this out for the life of me. run this code and please tell me i'm sane:
.P Disp (1e7)>Dec //euler's e
it displays 7 for me. but it should be displaying 1, am i right? because 1 in binary is 0000 0001 and the 7th bit starting from the left like the documentation says is set. i have axe 4.6. Builderboy on IRC tried it with 4.5 and it displayed a 1.
341
« on: December 08, 2010, 10:20:06 pm »
i doubt it, i'm having issues with my program. too much java, clearly.
342
« on: December 08, 2010, 08:04:41 pm »
RotCC/RotC?
343
« on: December 08, 2010, 07:45:22 pm »
can the screen be assumed cleared?
344
« on: December 08, 2010, 07:29:53 pm »
Yes rect and rectI() are both used, including line() and all the pixel/sprite commands. As for the size, i'll upload a new version really quick
unless you plan on having a title screen that can scroll an amazing..... three pixels!
345
« on: December 08, 2010, 07:24:17 pm »
Do you use Rect()/RectI() in portal's code already? because then the routines are only like 15 bytes to call instead of having to include a 200 byte subroutine. by the way, the image is 192 x 134... is that intentional?
Pages: 1 ... 21 22 [23] 24 25 ... 82
|