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.


Topics - BlakPilar

Pages: 1 [2] 3 4
16
Computer Projects and Ideas / BexIDE -- An Axe/(Extended) BASIC Mini-IDE
« on: December 15, 2011, 08:54:13 pm »
Current version: 1.2 Alpha (snapshot)


It's finally here! BexIDE is an open-source mini-IDE for Axe and (extended) TI-BASIC (by that I mean external libraries such as xLib, Celtic 3, etc). It was written in and requires .NET Framework 4.0. Anything else I would say here, besides the features overview, can be found in the README.

Features
Custom syntax highlighting
With the way I've set up BexIDE, you can choose which words you want to have highlighted, as well as the color and font weight! All you need to do is simply edit the settings XML file!

Custom tokens
Now, this may or may not be a little confusing. Basically, BexIDE comes with another XML file called tokens. In it are groups of all the tokens for TI-OS as of, I believe, OS 2.43 plus ASCII equivalents of the commands in Axe and third-party libraries such as Celtic 3 and xLib. If you open the XML file, you'll see what I mean; each token has a string value, a byte value, and a description. This is where the custom part comes in. You can change anything in this file, and your changes will be applied. For example, if you want to change "ln(" to "naturalLogarithm(" then go right ahead. Just change the value property. You can even create short-hand coding! As an example, if you wanted to make the text "_USELESS_" be equivalent to "3->A" on the calculator, all you would need to do is add a token element where the value is "_USELESS_", the byte value is "0x330441" (where 0x33 is 3's bytes, 0x04 is the store arrow, and 0x41 is A). It's that easy!

Token viewer
This isn't really an amazing feature, but if you don't want to open the tokens file, I've included a token viewer which groups all of the loaded tokens into a nice little tree-view where you can view their text, byte values, and description. You can also double-click on a token to have it added to a text-box, add its parameters, and then insert it into your code!

Sprite editor
I bet you wanted this, right? But yes, BexIDE has a sprite editor! You can easily design and insert sprites into your code! You can even change the width, height, and scale (scale is only for the editor; it makes it smaller or larger) of the sprite. As of this version, it simply prints the sprite as one line, but in future releases I will make it so that the designer splits the hex data for you.

Direct-to-8XP
No need to worry about fussing with text files and the 8XP programs- BexIDE saves directly to the 8XP! Don't worry though, Uncle BlakPilar isn't stupid. You can, if you wish, import and export your code to text files and, because of the editor I'm using, export your colored syntax to pretty HTML!

Comments
Like the token viewer, this isn't an awesome feature, but it's helpful. You can add end-of-line comments in BexIDE beginning with the customary double forward-slash (//), and they will be removed at build time.



But wait, there's more!
Remember: this is only in version alpha. Once, with all of your help, the bugs are removed and this version is working good, BexIDE has another card up its sleeve. I will be implementing a .NET portion to this IDE in which I will attempt to parse your BASIC code (possibly with modified syntax like Axe, I haven't decided yet though) into your choice of C# or VB.NET and compile it into a .NET app for the computer! So, in a sense, this will be the Axe of the calculator for the computer!



The meat and potatoes
Now, I think it's time I get to the heart of this post. I need you, yes you, Omnimaga community, to help me with this project! The more people I get to use this and find bugs the better this can become and the quicker I can get to making the .NET portion! I've attached both the source and just the binaries, for those of you who like to view sources and those of you who just like to use the programs. If you do peek at the source and find ways in which I can make this better, please let me know! I say it in the readme, but still. I want this project to be one of the best out there!



Downloads: binaries (executable), source
Screenshot:

17
Site Feedback and Questions / New Code Boxes
« on: December 10, 2011, 10:37:34 pm »
I've been meaning to say this for a while, but I personally don't like the new code blocks. Them not being teletype anymore is kind of... "Annoying," for lack of a better word. That's just my opinion, though. :)

Also, copying to clipboard does not work for me; I'm using Chrome 15.

18
TI Z80 / A Map Editor! (My First Axe Program)
« on: December 02, 2011, 06:31:04 pm »
Well, the title is kind of deceiving; this is not actually my first Axe program. It is, however, the first one of any value (all previous ones were just to mess around with Axe or display key numbers while at school). What better first program, I thought, than a map editor? It includes a list, displaying said list as a matrix, and reading from/writing to an external variable (an AppVar in this case). It's far from perfect, it only allows an 8x12 map, but if I get time to work on it during school, I plan to implement scrolling; and I'm sure it can be optimized a lot. However, it's not too shabby for my first Axe program, if I do say so myself. ;)

ZMAP is the actual program (no shell), and AGAME is the source (I was originally going to make it a game, but then I switched to making a map editor and was too lazy to switch program names). All sprite creation goes to necro from his Zelda 8x8 thread, I just made the hex values.

Anywho, thanks for taking the time to read this if you did! :D

EDIT: Forgot the controls. Arrows move around the area, [ALPHA] changes the sprite, and [2ND] places a sprite.

19
Miscellaneous / Socl - Microsoft's "Yet Another Social Network"
« on: November 16, 2011, 04:53:04 pm »
Quote
It appears that Microsoft is trying to get into the social networking game, as you know, it’s the hipster thing to do. There’s Facebook, Twitter, Google Plus, oh yeah and Myspace; it might be dead but they still garner a good following and stats, for the time being at least. So with the three big dogs Facebook, Twitter and Google Plus, how can there possibly be room for another social network.

We also have YouTube, Tumblr, Diaspora and a few other more obscure social network driven websites that look to connect everyone. How on earth is there room for Microsoft’s new social network Socl? I am trying not to hate on them, but I am not a fan of Internet Explorer nor Bing which probably means I won’t be a fan of Socl. That is just my opinion though.

With so many social networks and it being this late in the Internet game, I really don’t see Microsoft succeeding unless they bring something completely revolutionary to the table. By looking at the screen shots of the new Socl site that The Verge posted as some sneak peaks, it seems more of your run of the mill Facebook-Google Plus style social network. The site is private right now, so you won’t be able to access it.

Taken from the BitShare blog post, which also has screenshots.

EDIT: I do like the video party thing.

20
Gaming Discussion / Supremacy 1914
« on: November 12, 2011, 10:10:04 pm »
Does anyone play it? I'm curious.

If you haven't heard of it, here ya go.

21
Computer Projects and Ideas / CalcInterface for XNA
« on: November 10, 2011, 07:57:31 pm »
As I'm sure a lot of people know, Microsoft has a game development platform for .NET called XNA. I'm not one for long descriptions or essay writing, so I'll just get to the main point; I've made a library for XNA in C# that allows for creation of games that will look like those on the calculator but with full access to the speed of a computer. It has all of the main functions that I'm aware of that are mainly used in game development on the calculator with the exception of lists (they are easily accessed using System.Collections.Generic.List<T>). This includes calc-like text support, sprites (8x8, just like Axe), pictures, and both the home and graph screens.

Before I released this I was going to make a full port of Builderboy's Portal. However, because of BexIDE and other things such as school, I haven't been able to work on it much (sorry, Builderboy). I have, however, been able to put together a fun little program that uses the interface in a cellular automata program. I've attached the entire project so you can view the source and see how it works, or if you just want to play with the program and have .NET 4.0 installed you can do so ;) I've tried to document everything in the library source itself, but if you need any questions answered, feel free to ask them here.

I don't guarantee that the code is 100% optimized, but I've done what I can. I'll be updating this as time goes on (I plan on adding grayscale) so if you feel like it, be sure to keep an eye out.

To use this in another project, simply right click on your project, go to Add > Existing Item, and locate where you placed CalcInterface.cs. Anywhere you want to use it make sure you add "using Betafy;" to the top of the code, or just do "Betafy.CalcInterface <name>" when you declare it. Whichever floats your boat.

If you're playing around with the program I included, ENTER changes from Sandbox to Editing mode, SPACE pauses, left clicking while in SandBox creates particles and in Editing it adds walls, right clicking in Editing mode erases a pixel, and scrolling increases/decreases the brush size. The program itself is by no means perfect, but it's pretty fun to play around with.

Cellular automata demo:

And if you look at the source, congratulations. You now know my name :P

22
Other Calculators / All library documentations
« on: October 31, 2011, 04:19:00 pm »
BexIDE is nearly ready for alpha testing. The only things I have left to do is finish the token documentation and work on some tiny bugs. The only thing is I need the documentation for certain libraries. So, if someone was willing to give me a link to them, I'd be most thankful. Right now I have Axe's documentation, and I'm using TIBD for BASIC. I need:
  • Celtic 3
  • DoorsCS
  • OmniCalc
  • xLib
Also, if someone wants me to throw another library in there, give me a link to the documentation and I'll see about adding it (you'll be able to add your own tokens with their own byte values, but whatever).

23
Computer Programming / Regex (regular expressions)
« on: October 23, 2011, 02:19:00 pm »
Does anyone know regex well? I need to be able to select everything between a double quote and either another double quote, the end of a line, or a two character sequence ("->" for example). What I have now kind of works, except the highlighting only stops after the '>' and sometimes it selects everything for a while after the '>'.

Here's what it is now: (by the way, for the '->' part, I completely guessed lol)
Code: [Select]
@"""[^>]+""|""[^>]+|""[^>]+'->'"

24
Computer Programming / 8xp File Header generation
« on: October 19, 2011, 05:27:21 pm »
I'm completely rewriting my 8xp library for TBEXE (now called BexIDE), and everything works fine (as far as I can tell) except for the header generation. I think the problem is somewhere in the part having to do with the "mystery" byte or the Type ID part, but I can't be exactly sure. I'm definitely going to be investigating further tonight (unless someone beats me to it), but I have to go out for my birthday dinner right now ;)

So yeah, I guess I'm just asking for theories on what's going wrong, if there are any, or what I'm doing wrong.

Code: (le code) [Select]
int i, j = 0;                                                               //i: loops, j: current pos
byte[] len = getDataLength(false);                                          //The length of the data section
byte[] header = new byte[73];                                               //To be returned
//Copy bytes from the file header
for (i = 0; i < FILEHEADER.Length; i++) {                                   //FILEHEADER is the "**TI83F*" stuff as a byte array
    header[j] = FILEHEADER[i]; j++;
}
//Copy bytes from the sub-header
for (i = 0; i < FILESUBHEADER.Length; i++) {                                //FILESUBHEADER is $1A, $0A, $00
    header[j] = FILESUBHEADER[i]; j++;
}
//Copy the comment
for (i = 0; i < Prgm.Comment.Length; i++) {                                 //The comment is a byte array whose length is 42
    header[j] = Prgm.Comment[i]; j++;
}
//Copy data length
for (i = 0; i < len.Length; i++) {
    header[j] = len[i]; j++;
}
header[j] = (byte)0x0B; j++;                                                //Add the "mystery" byte (maybe $0D?)
//Copy data length (again)
for (i = 0; i < len.Length; i++) {
    header[j] = len[i]; j++;
}
header[j] = Prgm.IsProtected ? (byte)0x06 : (byte)0x05; j++;                //Add protection flag
//Copy the program name
for (i = 0; i < Prgm.Name.Length; i++) {                                    //The name is a byte array whose length is 8
    header[j] = Prgm.Name[i]; j++;
}
j++;                                                                        //Skip the version (makes it $00)
header[j] = Prgm.IsArchived ? (byte)0x80 : (byte)0x00; j++;                 //Add the archive flag
//Copy data length (again)
for (i = 0; i < len.Length; i++) {
    header[j] = len[i]; j++;
}
len = getDataLength(true);                                                  //Get the length of the data / 2
//Copy the data length / 2
for (i = 0; i < len.Length; i++) {
    header[j] = len[i]; j++;
}
return header;                                                              //Return the full header

25
Computer Programming / Is it my fault, or the computer's?
« on: October 08, 2011, 05:42:13 pm »
First off, I wasn't sure whether to put this in Math and Science or here, but I'm putting it here.

In .NET, Math.Tan returns the tangent of some number in radians. However, I need the tangent of that number in degrees. I wrote myself a little method, but for some reason, it's not producing the correct number. I take the degrees in radians, multiply them by pi, then divide by 180.

When I put in 30.0, I should get 0.577350269... (according to the calculator) but I'm getting 0.523598775... Am I doing something wrong, or is it an error by the computer?

Full method:
Code: [Select]
public double RadToDeg(double rad) {
    double deg = ((rad * Math.PI) / (double)180);
    return deg;
}

EDIT: I also tried moving around the parenthesis so it was "rad * (Math.PI / (double)180)," but there was no change.

26
Miscellaneous / Clarification of (college) majors
« on: October 04, 2011, 06:21:16 pm »
Ok, so, I'm only a junior in high school, but I've been told numerous times that now is the time I should start looking into colleges. However, I'm kind of confused. I am absolutely 100% sure that I want to get into either enterprise software engineering or game development. My problem is that I'm not exactly sure how to go about looking for colleges for this. I've seen colleges that offer software engineering, computer engineering, game development/engineering, and (most commonly) computer science. I can tell the difference between software and game engineering, but how do they differ from computer engineering and computer science? And how do computer science and engineering differ from each other? Is science more of the software aspect, and engineering the hardware side? I'm not sure on the difference between these, and it's something I need to know when looking for colleges lol.

Also, not sure if it helps, but by the time I go to college, I will know C#, Java, and C++ (with knowledge and experience with VB, though I don't much care for it).

And, though I'll reply, thanks in advance. :)

27
Miscellaneous / Interesting conversations with Cleverbot.
« on: September 30, 2011, 04:23:22 pm »
I figured it'd be funny to post some of the more interesting conversations with good ol' Cleverbot!

Here's my first one to post. I started with "Think for me!"
Spoiler For it's kinda NSFW:


28
Minecraft Discussion / The harder-than-404 challenge of Minecraft 1.8.1
« on: September 25, 2011, 11:43:45 am »
My one friend was messing around with some seeds for 1.8(.1), and he came across "mooshroom". This seed generates a world that, when you spawn, you find yourself on a decent sized island. You are completely surrounded by water. There are other, smaller islands, but none quite as large as the main one that you spawn on.

There is one tree. Two cave entrances. Very little to no wildlife. My challenge to you, users of Omnimaga who play Minecraft, is to see how long you can last in survival mode before you die/get killed.

Good luck ;)

Spoiler For Tip:
It may be worth your while to travel to the island directly north of the main island.

29
Miscellaneous / AndroIRC not connecting to omnom?
« on: September 18, 2011, 01:20:44 pm »
I've been trying to get into omnomIRC using AndroIRC on my phone, and it says that it connects on my phone, but I don't show up in omnom. I've been connecting to "irc.omnimaga.org:6667". It doesn't show any replies or anything either. ???

30
Computer Programming / Bresenham's line algorithm help
« on: September 15, 2011, 05:19:51 pm »
EDIT: Nevermind, I solved it. I fixed my interpretation in case anyone else needs to use it.

I've been looking at Bresenham's line algorithm for something that I'm working on, and I can't seem to get it to work. I tried using the first sample algorithm that is on the wikipedia page, but my line stays stationary. I tried making my own one based on the article itself, but it only works in two positions (the line is either horizontal or perfectly diagonal).

Article: [wikipedia]http://en.wikipedia.org/wiki/Bresenham's_line_algorithm#The_algorithm[/wikipedia]
Spoiler For their algorithm:
function line(x0, x1, y0, y1)
     int deltax := x1 - x0
     int deltay := y1 - y0
     real error := 0
     real deltaerr := abs (deltay / deltax)    // Assume deltax != 0 (line is not vertical),
           // note that this division needs to be done in a way that preserves the fractional part
     int y := y0
     for x from x0 to x1
         plot(x,y)
         error := error + deltaerr
         if error ≥ 0.5 then
             y := y + 1
             error := error - 1.0
Spoiler For my translated version of their algorithm:
int deltaX = x2 - x1;
            int deltaY = y2 - y1;
            double error = 0;
            double deltaErr = (double)(Math.Abs((double)deltaY / (double)deltaX));
            int y = y1;
            for (int x = x1; x <= x2; x++)
            {
                this.PxlOn(x, y);
                error += deltaErr;
                if (error >= 0.5)
                {
                    y++;
                    error--;
                }
            }
Spoiler For my algorithm:
            for (int x = x1; x <= x2; x++)
            {
                int y = (((y2 - y1) / (x2 - x1)) * (x - x1)) + y1;
                this.PxlOn(x, y);
            }
            //x1 in mine is equivalent to x0 in theirs. x2 in mine is x1 in theirs.
I've attached what my algorithm (not my translation of theirs) looks like.

Pages: 1 [2] 3 4