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 - Haobo
1
« on: April 28, 2016, 12:25:04 am »
I've created a few games in Axe that all have the same format underneath, and I've been getting annoyed of recreating the same code for a different program. So, I tried to create something similar to Graylib that will handling a multitude of items that any operating system does. Truthfully, this seems more similar to something like glut (not like I used it much). There are definitely a lot of bugs since I never tested it except in my own code. Here are some of the features auto power down auto archived save appvar limit framerate separate windows intro/outro animations exiting key hooks everywhere Graylib support
Currently, I haven't used this at all except for the planned tetris game. However, it has been working well, and hopefully, create more examples of how this can be used. I found it hard to micromanage all the different functions I use for handling screen changing and other stuff, and using this myself made it real easy to plan everything. This code is definitely not as complicated to read as Graylib was, and it should be easy to understand if you glance at the source a little. Fundamentally, most of the loading functions are similar to Graylib, so if you understand how to use that, this should be easy. If anyone wants to use this, I can start posting some code of how to use it. Otherwise, this is mostly just for me anyway
2
« on: April 14, 2016, 07:01:04 pm »
Thanks! I started figuring out the graphics already, just have some issues over how to program it, and I'm a little busy with school these few weeks. I'll send you or post the different attachments for the source code later and explain how it is made. (btw, going for TGM rules and rotation. Heads up, you can use any variables you want, since I'm not using any A-Z ones. Grayscale buffers are Graylib ones, with 2 extra GB5 and GB6 for storage.
3
« on: April 11, 2016, 09:35:40 pm »
Yep, and I thought about it, I'll just post my current file, just to see how it works for others. There's no actual game yet, but all the UI stuff is done. Edit: Forgot the controls On - exit the program from any location 2nd - A button ALPHA - B button I also plan to make the intro animated, if anyone can give me a good gif animation for a good intro page, link it to me. Hopefully it has something to do with the current one (hint hint) for the parts of the game. Double edit: One last thing, I don't know how to make tetris. (will take too long to read through or think about it) Anyone have some source code I can use?
4
« on: April 11, 2016, 09:10:47 pm »
Really thought something was missing to this site and that is another tetris game. Well, pretty self explanatory here. Main game has yet to be started, but since it's tetris, hope to be done quickly and work on the additional aspects of the game, yet to be revealed. There will be 3 parts to the game based on a web comic (hint hint ), modes are interchangeable in settings, grayscale, and a bunch of other random features. Hopefully, I don't drop this project after a week though. Will post an attachment of the file once I actually get the game done. Probably in a few days.
5
« on: April 07, 2016, 02:54:18 am »
Check out zstart. Most of the stuff that you want in axe are already implemented in zstart. Don't know if you ever used it before. It takes some time to get used to the shortcut keys, but it allows you to jump to labels, copy and paste code, and undo all changes so any bad edits are removed. Most of the other stuff have all been attempted, but it is pretty hard to combine all the different programs into 1 hook.
6
« on: January 24, 2016, 03:28:19 am »
Don't really know why you would not archive it. Saving programs might be a bit longer, but it's still a lot better than duplicating the program in memory, which is what the backup does. Archiving just gives it a double failsafe. Plus, you can use it as a temporary version control (though with only 2 versions) since axe doesn't backup archived programs.
7
« on: January 22, 2016, 03:31:17 pm »
Some more things that might help with dealing with these. The option to run the program right after compile whithout having to go back to the home screen would be nice. Having Axe back up all files compiled (if multiple programs are included with the prgmNAME command) could be helpful. If you attempt to run a source code file it could compile then run.
These were already implemented by zstart. It has a bunch of shortcut keys to archive every program, edit programs from archive and exit without saving, and running the program right after compiling. It will also auto archive files that you compile in axe so that data isn't lost. Backing up files isn't really necessary if you can edit from archive, and axe already supports compiling from archive. Pause until something happens, like pause until the enter key is pressed.
Not sure if this helps, but the getKey^^r function works pretty well for a temporary pause, until a button is pushed. For more specific inputs, you should probably make a function yourself for that. Really recommend zstart if you are into programming on the actual calculator. It also allows you to jump to Lbl's throughout the program quickly in case the program is huge and the shortcut keys help a lot.
8
« on: December 01, 2015, 03:51:28 pm »
The only thing that I see wrong is a bunch of syntax mistakes, which I guess you didn't directly copy and paste this from some IDE. If you move the last line to the top though, there doesn't seem to be any errors. It works perfectly fine when I tested it on wabbit. Here's a file that should work for what you have.
Also, just some stuff, you should probably close your parenthesis since that doesn't make it faster or smaller, only improve readability, and use DispGraphClrDraw instead of them individually, makes it a lot faster.
9
« on: October 02, 2015, 02:33:51 pm »
You can fix the code execution limit with the axiom fullrene. It allows you to use all the memory instead and the program should work, but still show the error. Also, you never mentioned that applications can't modify internal data... that would have been useful...
10
« on: August 16, 2015, 08:43:51 am »
I must axe you a question does the increment operated follow the left to right order of ops exactly? I mean will something like if foo=x++ increment x first and then compare, or the opposite? (In my case foo is a number of arithmetics)
In most of axe, since there is not exact documentation and that it does not follow order of operations, most things you just need to test to see if it works or not. (Btw, it wouldn't even compile, just throw an invalid token error)
11
« on: August 14, 2015, 12:03:27 pm »
But as a side note are you sure it won't be better to remove those -1s and change max() to max()^r? I think that will be smaller. (but i am not sure)
Now this I never heard of. In the commands list, never saw the command for max()^^r, care to explain?
12
« on: August 13, 2015, 06:40:30 pm »
Try not to use any goto's in your program unless you know what you're doing with them. Goto's don't goto a certain part of the code, they also take everything with them, including the stack. It will break the program if not used correctly. What you want to do is create subprograms. (not like you really need them here anyway ) Try this: (I'll change minimally) .WINDOWXP
Fix 5
32->Y 48->X
ClrHome
[E0C0A00000000000]->Pic1
0->A
Repeat getKey(15) ClrDraw Pt-On(X,Y,Pic1 If getKey(1) Y+1->Y End If getKey(2) X-1->X End If getKey(3) X+1->X End If getKey(4) Y-1->Y End If Y>54?X<25?getKey(54) Text(2,56,"START End DispGraph End
Also, I think you should avoid using and's in the code too for that purpose. and doesn't actually compare it that way, check out the command list for more details. For this, use ?
13
« on: August 13, 2015, 06:18:01 pm »
some quick help: ClrDraw ClrHome
ya don't need both if in the end, you're only going to use DispGraph every millisecond, ya can remove ClrHome Line(0,0,95,0 \\Lines for a border Line(0,63,95,63 \\ Line(0,0,63,0 \\ Line(95,0,95,63 \\
try the rect command, makes it easier to write (and the recti command) Y+1->Y ... X-1->X
they can be Y++ and X-- Here's a big optimization of your code that you might want to do yourself or not, but anyway, it's not too hard to figure out after you experiment a lot. (but I'll leave it up to you if ya wanna use it) and check this out for some other optimizations https://www.omnimaga.org/axe-language/the-optimization-compilation/
14
« on: August 13, 2015, 05:58:29 pm »
2) You know how in the Axe app, it shows all of your programs that you made? Could someone explain how that works because I need it for something and I would like to be able to use it for myself.
I'm not 100% sure this is right cause I never used it myself, but I think you want something like the MEMKIT axiom. I also found a topic a while ago on omnimaga that lets you sort programs some other way, but I forgot the link. I think think that MEMKIT is what you need. The file should have come with axe version 1.2.2.
15
« on: June 18, 2015, 11:43:14 pm »
And also a small hint to axe golfers: randomizing the screen only takes 3 bytes
O_O wanna give a little hint on how you did this? Smallest I got was 15 the old fashion way...
|