Omnimaga

General Discussion => Technology and Development => Computer Projects and Ideas => Topic started by: BlakPilar on November 10, 2011, 07:57:31 pm

Title: CalcInterface for XNA
Post by: BlakPilar 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:
(http://img.removedfromgame.com/imgs/CalcInterfaceDemo.gif)
And if you look at the source, congratulations. You now know my name :P
Title: Re: CalcInterface for XNA
Post by: C0deH4cker on November 10, 2011, 08:06:54 pm
This is really neat! Ive used xna before, but never made anything like this. Now you just have to make it emulate the z80 processor so it can run compiled axe programs :P
Title: Re: CalcInterface for XNA
Post by: BlakPilar on November 10, 2011, 08:13:04 pm
Thanks! :D But no, it's not an emulator lol. You write the code and Visual Studio compiles it into a .NET app :P it does support sprites like Axe, though...
Title: Re: CalcInterface for XNA
Post by: C0deH4cker on November 10, 2011, 08:20:18 pm
Cool. Ill have to check it out.
Title: Re: CalcInterface for XNA
Post by: DJ Omnimaga on November 19, 2011, 02:34:40 pm
Hmm interesting. I remember Miotatsu did something similar for the computer, but sadly he stopped working on it after he lost his progress. It was called BasiC++ IIRC.