Join us on Discord!
You can help CodeWalrus stay online by donating here.
Menu

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.

Show posts Menu

Messages - E37

#181
Quote from: DarkestEx on September 07, 2016, 07:12:18 PM
Quote from: E37 on September 07, 2016, 07:09:29 PM
How about some screenies?
Looks really awesome :)

I will make you a list of the menus today. I guess there will be "Maths", "Logic", "Bitmanipulation", "Jumps", "VM", "Debug", "Arrays", "Stack" , "Extend", and "Misc", but I will see if I missed anything :)
Make sure to tell me if you want any keys replaced.
Like replacing sto with LD
Note than the menus won't have title.
I can make as many as you want! Almost to the point of having a key to a command! Wait it only supports up to 200 menus... That should be good.
#183
Quote from: DarkestEx on September 07, 2016, 04:41:25 PM
Quote from: E37 on September 07, 2016, 03:33:52 PM
Alright, I have all the hex and their names copied.
Since I don't have the organization for the menus, I have started on the compiler.
All I have is convert number in program to 16bit number.
I hope to have the source code compatible so all it now needs is a compiler.
Awesome ;D
Just to confirm you got the right instruction set from https://github.com/bmuessig/Clawsemble/wiki/Instruction-set
Instruction 0x19 should be called SWF, is that correct?
EDIT:
In case you need an easier to edit or copy version, there is a JSON representation here:
http://dev.claw.bmuessig.eu/bytecode/?view&output=json
a C# representation here:
http://dev.claw.bmuessig.eu/bytecode/?view&output=cs-class
and a C representation here:
http://dev.claw.bmuessig.eu/bytecode/?view&output=c-header
I fixed it!
The IDE is ready whenever you have the sorted menus done!
(I did notice that 0x4D is empty)
All Claw commands begin with the byte 0xBB and the command byte follows.
#184
Alright, I have all the hex and their names copied.
Since I don't have the organization for the menus, I have started on the compiler.
All I have is convert number in program to 16bit number.
I hope to have the source code compatible so all it now needs is a compiler.
#185
PC, Mac & Vintage Computers / Re: Programming Ideas
September 06, 2016, 09:51:55 PM
Quote from: p2 on September 06, 2016, 09:27:08 PM
what would be possible:
a little seed-based generator to create a for example 32x32 map, each part of it being a 8x8pt tile with like 5 different tiles.
showing this map as a scrollable screen then (with left border==right border) we could actually run around a "map" based on a seed.
But what should we use that for? creating some fancy-looking terrains as background-images just for fun...?
Still need a good game on top of that ^^

Edit: If anyone feels like making such a game, I'd love to help drawing a couple of sprites ^^

Edit2: Thanks to @E37: This should help creating it: https://ourl.ca/15307/286856

Glad that helps!
I don't have time right now... Plus I am TERRIBLE at world gen... even without a seed
I can barely make simple trees generate...
#186
PC, Mac & Vintage Computers / Re: Programming Ideas
September 06, 2016, 04:37:56 PM
One of these days I need to get around to posting my sandbox game...
I added crafting, tools even dynamic blocks...
Ill do it eventually
#187
GreyLib is a library. Axe has two types of includes Axioms (which are written in Asm) and Libraries which are written in Axe.
Libraries are meant for things Axe can already do like greyscale.
Axioms add completely new things like reading the VAT, running programs and more.
Libraries need to be compiled. Axioms already are.
#188
I was actually going to make a post on optimization in a bit.
You might want to hold off for a bit.
#189
GreyLib for Axe? it is in Axe.
(This thread should be renamed to like general Axe discussion...)
#190
Have you ever tried to understand greylib? That's impossible to read!
#191
Other / Re: How good is your French?
September 02, 2016, 05:13:28 PM
All that proved is that I can use google translate...  :P
#192

If {r3-1} and °RightLedge!=0

Wait... You can use "!" outside of If statements?
#193
You think more than one line of conditionals is bad? For one of my games I wrote an entire subroutine on one line using ?? And ? !
You can chain statements though like:
A-B??1->A:7->B,0->A->B
That is perfectly legal to do.
#194
A couple things:
First, you don't need the : in most cases. you can simply do X?*5->X since the ? ends the statement.
I'll try to go over all the ways to do and and or statements. Ill bring in to account the size, speed and problems with the statement.
With all of them I am going to take into account the worst case for them. (slowest and largest)
But first... a little math. Pause 1 takes up 3349 cycles. Pause 1800 is about a second in slow speed mode. 3349*1800=6028200 cycles a second. Just to give you an idea when I talk about speed.


1. " and " and " or "
Speed: 33 cycles - that's pretty quick.
Size: up to 7 bytes - not to bad.
Pitfalls: it only compares the lower byte of each argument. That means if number mod 256 is 0, it will treat it as 0. Only use if you are sure if this won't matter or if neither of the arguments can exceed 255.

2. "*" and "+"
Speed (for "*"): It can get up to 800 cycles - by far the slowest!
Speed (for "+"): It can get up to 32 cycles - not too bad.
Size: up to 5 bytes for "+" and 7 for "*" not bad.
Pitfalls: It has a chance that the math operations can wrap around and =0. It's not very likely though.

3. "?" and "??"
Speed: 18 cycles - that's screaming fast!
Size: always 5 bytes - that's really small!
Pitfalls: None really. Just watch the short circuiting as it can cause a headache if you forget it!
Note: since it is a short circuit operator, it has a chance to increase speed even more - even a large amount!

4. plot style tokens
Speed: 45 cycles - not the fastest.
Size: up to 10 bytes - pretty small!
Pitfalls: They can be hard to differentiate, "That's 'or' right... no, its 'and'!"
Notes: It functions the same way as " or " and " and" but doesn't have the >255 problem.

5. nested 'If" statements
Speed: who cares?
Size: does it matter?
Pitfalls/notes: ... just no. Don't do it. Any coder who tries to read your code where you made a separate 'If' for each and and calls the same routine for each 'or', will HATE you (and you probably won't be able to read it anyway) That kind of code is for assembly! NOT Axe!

That is all of the ways I can think of. Read over all of them and decide which is best for yourself.
#195
Oh... and another thing... Endiness... I you have no clue what that is then consider yourself lucky...
Suffice it to say that {L1}r+256 is the same thing as {L1+1}+1
and {L1}+512 is the same as {L1+1}+2 and so on...
Don't ever use this trick if you want you code to be readable (and I am pretty sure Axe does it for you during compile anyway)

I meant above that you could:
:[0000000000000000]->pic1
:[FFFFFFFFFFFFFF]
:pt-on(0,,Pic1+5)
The only time you are going to have variables other that 1 or 2 bytes is 9-byte floating point (that is what the OS uses)
you can use float{var} to use it. (again, I've never used it for anything useful)
Powered by EzPortal