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 - Compynerd255

Pages: 1 ... 15 16 [17] 18 19 ... 24
241
The Axe Parser Project / Re: Features Wishlist
« on: March 17, 2011, 10:30:14 am »
Such as having "appvarScreen" be able to be displayed on the screen (without messing with L3 or L6)
We have "BUFFER->DispGraph" :) No greyscale, though, for that.
isn't that the same as Buffer->(l3 or L6 not sure) then display graph?
But that destroys L3 and L6. However, as a caveat, you should use an arbitrary buffer as a backup storage, and L3 and L6 as more active drawing space.

242
Axe / Re: Key Timers
« on: March 17, 2011, 10:28:02 am »
What happens if you do a delay for keys that already support multiple presses?
It doesn't matter what key you use, since you're reading the key directly instead of using GetCSC.

If you want an example of this code in action, read the source for Eitrix.

243
Axe / Re: getKey question
« on: March 17, 2011, 10:25:37 am »
Make sure you are using the right "v" when defining your appvar string. It needs to be the [2nd]+[v] token, NOT the lowercase v. If you did it right, it should show up as "appv". Also, in your PCK method, PCK is actually not getting the last key pressed. It is simply waiting for a key, then it gets the one pressed immediately after it (which, unless they press the arrow keys, is always going to be zero). The code should actually be:
Code: [Select]
Lbl PCK
Pause 1000
0->K
Repeat K
getKey->K
End
I only skimmed your source, but if you are using K for something else, feel free to use some other variable name or even a memory location.

244
TI Z80 / Re: Eitrix for TI-84 Plus
« on: March 16, 2011, 10:46:32 am »
Hey guys! Version 0.6 is out! Here's what's new!
Version 0.6:
- Antidotes!
   - 25% of all Special Blocks (more in single player) will be empowered with Antidotes.
   - Clear the block to add 1 Antidote to your total.
   - Antidotes are kept in a stockpile of up to 65535 antidotes.
   - Use an Antidote by pressing MODE
   - When you use an Antidote, all attacks you are currently recieving will be deactivated,
     and any future attacks you recieve over the next few seconds will be negated.
- Diseases!
   - These attacks last perpetually and do not affect the grid directly
   - Clear them away with Antidotes.
   - Specials Added: No More Hints, Static Background, Zee Virus, and Blindness
- Removed Interrupts once and for all! Now it works in both MOS and DCS!
- Changed the Slow Down symbol to a turtle (courtesy of stiny.net)
- Hit CLEAR from the main menu to quickly quit the game
- Several other bug fixes

This will probably be my last Work in Progress release before I publish the 1.0 beta, since there is so little that has to be done now. Just more specials, and seeing your opponent's grid height.

245
Other / Re: Let's learn OOP!
« on: March 16, 2011, 10:41:12 am »
The Diamond operator (<>) is in C# as well, and it is used the same way. Also, C# does have a lot of Java's mechanics, but they are written differently (e.g. public class Square extends Quadrilateral is written as public class Square : Quadrilateral but it has the same function).

Here's another topic I want to write about: properties! Properties are a more elementary item in OOP, and their purpose is simply to set conditions or hook functions into the getting and setting of variables.

A generic Property is a block with special get and send methods, as shown below (in C#):
Code: [Select]
int foo;
public int Foo {
 get { return foo; }
 set { foo = value; }
}
Then, when objects reference the class, they reference the property Foo, which gets and sets foo.

Now, let's set some conditions on access to Foo (these are all within the definition of Foo):
Code: [Select]
get { return foo; }
private set { foo = value; }
This makes it so that outside forces referencing the object cannot set the value of Foo, only read it.

Code: [Select]
get { return foo; }
set { if (value < 100) foo = value; }
This restricts the value of Foo to values less than 100.

Code: [Select]
get { return foo; foo = 0; }
set {
 foo = value;
 RickRoll();
}
This code sets foo to zero after its value is read, and also calls the method RickRoll when foo is set.

Properties don't even have to be inimately attached to specific variables. For example:
Code: [Select]
public int Area {
get { return width*height; }
}
When the property Area is read, it will always return width * height;

Some advice on using Properties:
1. If you are just going to do a public Get and Set method with no restrictions, just declare a lone, public variable. It's faster.
2. Never make get less accessible than set. You won't be able to set it relative to itself.
3. Capitalize the names of public members, and leave private members as lowercase. This will help you seperate the two.
4. Use properties. Realize their sheer power!

246
I would have on request. A replacement/alternative for NoteFolio, with PC support. NoteFolio is pretty good but I would like to see smoother scrolling and a smaller font, maybe zoom levels? .txt support would be nice too and imagine what you could do if you could make like these "chapters" so that if you open the file you can jump to one chapter or another, that would be truly great. It is not even that impossible....
To an extent, that is Document DE 7 for Doors CS. That program could use some improvement as well, but it appears that the files that Document creates are the same format as the ones Notefolio creates.

247
Computer Usage and Setup Help / Re: computer won't boot D:
« on: March 15, 2011, 06:42:13 pm »
I've never had a good experience with home-built computers. Whenever I do extensive rebuilding of a computer, it always fries eventually. If the smoke comes out, face the truth: Your motherboard bought the farm. I'm really sorry.

When you go out to look for a replacement computer, buy a Dell. My family currently owns three Dells, and not one of them has had problems (other than being outdated). Even a used Dell is better than a home-built PC. You should be able to transfer your hard disks to your new system.

EDIT: I've noticed you've been posting a lot, momrocker. Why don't you create an account and join us?

248
Other / Re: Let's learn OOP!
« on: March 15, 2011, 06:07:31 pm »
I don't think I understand the purpose of OOP. Why would you use data abstraction and encapsulation for something like, to use your example, updating ships? Since you're presumably only manipulating a single ship at a time, wouldn't it be more logical to maintain an array of data about all ships. The data about that ship could be loaded into the variables you're manipulating and then reloaded into the array when you're done. It could actually work out very easily if you use "pointers" to the data in the array and a simple subroutine to manipulate the pointers and simultaneously updating the data in the array. It seems like encapsulating the ship data just pushes the mechanics of the program onto the interpreter/compiler. That certainly makes things easier to manage, but computers also have a tendency to write less efficient code than humans.

Also, I genuinely don't understand why you would want local variables. Doesn't that make things confusing when the variable "ShipSpeed" is used differently by three different subroutines? Plus, the OS/program has to maintain a table of all of the local variables, look them up, retrieve them from memory, and swap the appropriate ones in when necessary. That's not a lot of overhead, but it might not be suitable for high speed applications. It would also appear to be less memory efficient than maintaining global variables and being careful not to modify them.

PS: Your "Calcnet" example seems to be similar to calling another program or subroutine.
First, as my example shows, if you don't use OOP programming, you would simply keep a multidimensional array of all of the properties of each of the ships. Now, if you have already defined what you want the ship to do, that's fine. But what if you want to add a property to the ship? You would have to change all of your array offsets to fit the new ship! However, if you instead kept an array of Ships, then adding a property isn't a problem.

Private variables are another important thing. For the Ship class, we don't really need any local variables. A better example of where you would need private variables is in a networking class. You don't want to have to tell the program to connect to such and such a port or use such and such a timeout. But the network class needs to know about these things. So, when you write the networking class, all of the little details are hidden from you, so all you have to worry about is doing things with the network. Private variables also prevent you from making foolish mistakes, like modifying variables you shouldn't be.

Also, what classes help us do is make code more portable and mobile. In non-OOP, a lot of pieces of code are interweaved and hard to seperate when you want to use them somewhere else. If you use OOP right, you can take that class into another application and use it again. For example, you might have a method that draws all of the game objects to the screen. However, if you are developing for multiple problems, you might want multiple "DrawTool" classes that respond to different protocols (e.g. one that draws on an 89, one that draws on an old PC, and one that draws on an XBox).

249
Yeah true. However, such new editor should have the exact same controls as the current one, if possible, so people who are used to the old one won't take too long to get used to it. We should have a mode where we can paste tokens and another with intellisense. (I liked Intellisense when I used Visual Basic 6.0)
You could probably dissassemble the code from either the TI-OS one or the DCS one and use it for your own purposes.  :devil:

250
The Axe Parser Project / Re: List of all programs made with Axe Parser
« on: March 15, 2011, 05:36:46 pm »
He can choose whatever he wants to name his program. I think that Scout wanted it to be uPong instead of UPong because the former is easier to type.
* Compynerd255 just got 100 posts!

251
The Axe Parser Project / Re: Features Wishlist
« on: March 15, 2011, 05:35:09 pm »
Couldn't you just do ClrDraw and ClrDrawr?
But that would be slower, since its two loops we have to worry about. Its the same as the logic of having a DispGraphClrDraw command. However, this routine could be coded yourself:
Code: [Select]
For(I,0,767
0→{L3+I}→{L6+I}
End

252
Other / Re: Let's learn OOP!
« on: March 15, 2011, 05:32:12 pm »
I'm glad you like my explanation. What I wrote up there is just the surface of OOP. There are a lot of other cool topics you can learn about, such as:
  • Properties (set conditions on access to variables)
  • Inheritance and polymorphism (make one class act like another class)
  • Types and type casting (convert one variable type to another)
  • Namespaces and libraries (subassemblies)
  • Reference and value types
  • Interfaces

Just let me know what you would like to know about, and I'll write a short explanation.

253
Math and Science / Re: Happy Pi Day
« on: March 15, 2011, 12:38:46 pm »
Okay, I'm sorry. I got a little carried away because I just got Rickrolled. I don't want this to move to Randomness, because I know we all want to accumulate posts.

How many digits do you have Pi memorized out to? I can only do 10 off the top of my head.

254
I had a cool idea for a game that I want to do for computer, but not necessarily for calculator. Basically, you enter a dungeon with a lit torch and the object is to get to the other side of the maze. The main novel idea of the game is that a flame and a monster cancel each other out (the flame goes out as the monster dies). However, more torches line the wall, and you can light them to provide yourself with backup flame. Additionally, flames and monsters can be enhanced: a flame of a higher level does not go out when hitting a lower level monster, and vice versa. There could also be other cool ideas, such as annoying moths, trolls that bust through walls, wind chambers that snuff your flame out, dragons that breathe fire at you (which can light your torches if it doesn't incinerate you first) and stuff like that.

EDIT:
I would like a search engine hook or something like on Casio calcs, because it can be helpful for that. Go up/down would be good too for large programs. Casio had this on their calc for over 15 years now. Maybe a future program editor, hook or Doors CS7 addition?
The best solution would be a new program editor entirely. Another feature I'd like in such a revamped program editor is an Intellisense list (when you type in a function, it will show you the syntax under your cursor). Find/replace would also be nice.

255
Math and Science / Re: Happy Pi Day
« on: March 15, 2011, 12:19:37 pm »
π   π  πππππ  π   π  πππππ  πππ       ππππ   πππ   π   π  π   π    π       ππππ  πππππ  π   π  πππππ 
ππ  π  π      π   π  π      π  π     π      π   π  ππ  π  ππ  π   π π     π        π    π   π  π     
π π π  πππ     π π   πππ    πππ      π πππ  π   π  π π π  π π π  πππππ    π πππ    π     π π   πππ   
π  ππ  π       π π   π      π  π     π   π  π   π  π  ππ  π  ππ  π   π    π   π    π     π π   π     
π   π  πππππ    π    πππππ  π   π     πππ    πππ   π   π  π   π  π   π     πππ   πππππ    π    πππππ 

π   π   πππ   π   π    π   π  πππ    π
π   π  π   π  π   π    π   π  π  π   π
 π π   π   π  π   π    π   π  πππ    π
  π    π   π  π   π    π   π  π     
  π     πππ    πππ      πππ   π      π
...never gonna let you down, never gonna run around and desert you.
Or throw pi in your face.

Pages: 1 ... 15 16 [17] 18 19 ... 24