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

Pages: 1 [2] 3 4
16
Axe / Re: help with my Axiom
« on: October 09, 2013, 05:25:44 am »
I did think about that solution before, but it didn't work either.
So I put a  ".org $+1"  just before the  "AXM_4_END:"
Shouldn't that work too?  :-\

17
Axe / help with my Axiom
« on: October 05, 2013, 06:11:34 am »
Hi
I'm making an Axiom for Axe and something with the REP_NEXT macro doesn't work
Code: [Select]
.dw AXM_4_END
 .db AXM_NONAPP
 .db tok_Scan,0
 .db AXM_SUB
 .db AXM_2ARGS
 .org 0
 ...here comes some asm-code
 ex de,hl
 REP_NEXT ;this is .db $7F / .org $-1
 ld hl,_4entry
 ex (sp),hl
 push hl ;jump to (hl)
 ret
_4entry:
 ...here comes some code again
 ret

 .org $+1 ;I though you should increase the program origin to match the real size
AXM_4_END:

.dw AXM_END

after this code there are the token replacements
they don't work in this case but when I leave the REP_NEXT and the .org $+1 they work without any problems

18
Die möglichkeit den GTR zu kaufen bestand nicht.
Auch die Modelle sind unterschiedlich. Mein Bruder (11. Klasse)hat zum Beispiel 'nur' einen TI 83 ohne Flash-Speicher.
Das hat ihn ziehmlich geärgert weil er keine Apps drauf tun kann.

Ich kenne aber andere Schulen, bei denen die Schüler Sammelbestellungen gemacht haben und den GTR gekauft haben

19
Wir haben an der Schule (Baden-Württemberg, Ulm) den TI83+
Ich darf ihn im Abi 2014 im Wahlteil benutzen
Den Taschenrechner leiht uns die Schule für die Klassen 9-12

20
News / Re: Contest 2013 Calculator Gaming Roots
« on: September 24, 2013, 03:14:01 am »
Quote
November 5th 2012
Maybe I got something wrong but that was last year.  ???

21
Axe / Re: how to make a tutorial
« on: September 18, 2013, 12:21:30 pm »
You want an user to input a string and the 'input' routine
from Axe doesn't suit you because..
1. ..the input is on the first line of the display
2. ..the input can't be interrupted or influenced
3. ..while inputting your programm can't draw something other
     to the screen
4. ..the input is only large sized font
5. ..the user can type all tokens he want to
6. ..the input returns a string of OS tokens not of characters (look
     Axe command list)
then just read on.

I will show you how to make a input routine that
1. ..can be drawn everywhere at the screen in small or large sized font
2. ..can be innterrupted, influenced, overdrawn while inputting
3. ..takes a AscII - character input with just those keys and chars you want
     the user to input
4. ..lets your programm do something other while inputting

Let's start

The simpliest way to get all the key inputs would be
to just make a long construction If getKey()... for each Key.

Since this is unoptimized and results in big programm sizes,
I want to show you a better way to do this.

First let's make an input loop that runs until someone presses
2nd to exit

Code: [Select]
Reapeat getKey(54)
...
End

In Axe there is a command getKey (without any brackets) which
"returns the last key pressed or zero if no keys are pressed"
Axe command list

Code: [Select]
getKey -> K

Now let's take a look at the Axe keycodes.
These numbers are copied from the keycodes.png in Axe download pack
    
5352515049
545556
484032
47 - 'A'39 - 'B'31 - 'C'2315
46 - 'D'        38 - 'E'        30 - 'F'        22 - 'G'        14 - 'H'        
45 - 'I'37 - 'J'29 - 'K'21 - 'L'13 - 'M'
44 - 'N'36 - 'O'28 - 'P'20 - 'Q'12 - 'R'
43 - 'S'35 - 'T'27 - 'U'19 - 'V'11 - 'W'
42 - 'X'34 - 'Y'26 - 'Z'1810
4133 - ' '25179

I have written the characters we want the user to input beside
the corresponding keys.
As you can see if we process key inputs from 11 to 47 we can
detect all the character keys plus the space key which is 33.
But how can we find the AscII-character now that we know the key.
Take a look at this:

Code: [Select]
"WRMH" -> Str1
[00 00 00]
"VQLG"
[00 00 00]
"ZUPKFC"
[00]
" YTOJEB"
[0000]
"XSNIDA"

Have you already figured out what I want to tell you with these "XFCZPS" and
so on? Let me explain: First we just have the key code in variable K.
Now we subtract 11 from it since only key inputs from 11 to 47 are interesting.
If someone presses key 12='R' , the number 12 is stored in K. 11 subtracted
equals 1.
Now the simple operation Str1+1 picks the 'R' right out of the bunch of chars we
have in Str1. This procedure is the same for 'W', 'M' and 'H'.
But there is a problem. If key 15='Clear' is pressed you probably don't want a
character added to your input string. Solved this with a zero at the place in
Str1 where K=15 would point. So let's make 4 zero bytes for the keys 15,16,17
and 18 after "WRMH" since there are no characters. (I know there is no key 16
but still let's pretend there is)
Of course you may link some different tokens to those keys (not key 16 :))
There is a thing I should mention. As I said we need 4 zero bytes but there are
only 3 of them. This is because the  -> Str1  already adds an ending zero to
the "WRMH". Later on (for example after "VQLG") this isn't done so we put the
full number of zeros there.

By the way, feel free to play around with different characters and keys to fit
the input program into your needs.

To implement lowercase input as well just make the data above with lowercase
characters.

Enough theorie, let's code:

Code: [Select]
"WRMH" -> Str1U     .Uppercase characters
[00 00 00]
"VQLG"
[00 00 00]
"ZUPKFC"
[00]
" YTOJEB"
[0000]
"XSNIDA"

"wrmh" -> Str1L        .Lowercase characters
[00 00 00]
"vqlg"
[00 00 00]
"zupkfc"
[00]
" ytojeb"
[0000]
"xsnida"

Fix1:Fix5    .Draws big font to the frontbuffer instead of small font to the screen

.Prepare the frontbuffer and draw a textfield
ClrDraw
Rect(22,26,51,11)
WRect(23,27,49,9)

.First the cursor position (zero at the beginning)
0 -> C
0 -> F       .The lowercase flag, 0 means uppercase, 1 means lowercase
0 -> B       .This is our "Blink counter" it is increased every loop and
             .makes the cursor blink

.We need a place to put our input string, I will take L1. reserve 9 bytes for
.a 8 char string (plus ending zero)
Fill(L1, 9, 0)

Repeat getKey(54)     .the loop from above
 getKey -> K

 ...
 Here I will later add the cursor movements
 ...

 If K=48        .The Alpha Key is pressed
  A=0 -> A      .change A from 0 to 1 or the other way, since an alpha-press
                .should always change from uppercase to lowercase or the other way
 End

 K-11 -> K
 If K < 37    .we want the last key to be 47 'A' minus 11 equals 36
  If {K+(F?Str1L,Str1U)}     .if F=0 we take the char from Str1U else from Str1L
  -> {C+L1}                  .add it to the input string if its not zero
   If C<7
    C++           . move the cursor if there is enougth space (remember we just
                  . reserved 8 bytes to fill with our input)
   End
  End
 End

 WRect(23,27,49,9)     .Clears the textfield
 Text(24,28,L1)        .Draws the input string to the frontbuffer
 B++                   .Let's blink the cursor
 If B^64>31            .The cursor should blink not every loop but every 64th
                       .Play around with these values to fit your cursors speed
  Text(C*6+24, 28, (F?227,226)>Char)
  ...Let me explain if F=0 (Uppercase) Char(226) is displayed this is the uppercase
     cursor. Else (Lowercase) Char(227) the lowercase cursor is drawn to the buffer
  ...
 End
 DispGraph             .This is a very complicated command which draws the frontbuffer
                       .to the screen in a mysterious way (So just add it and enjoy :))
End

Fix0:Fix4            .Resets the Fixes

The input string is now in L1 you can do what you want with it.
For Example disp the string
Code: [Select]
Disp L1,i
draw it to the buffer  ;remember to set Fix5 (and Fix1 if you want to draw large font)
Code: [Select]
Text(X,Y,L1)
or create an appvar (put a 21 to the first byte):
Code: [Select]
Copy(L1,L1+1,9)^r     .^r to copy it backwards. This way it doesn't override itself
21 -> {L1}            . the appv token
GetCalc(L1, 120)      .Creates a user named appvar 120 bytes long


So this is my first tutorial  :D
Maybe some of you could go through it to help me improve it (also the english, I'm sure I made mistakes)  :-\

22
Axe / Re: Sprites
« on: September 18, 2013, 11:59:35 am »
You're right, I did.  ;D

Just corrected it

23
Axe / how to make a tutorial
« on: September 18, 2013, 05:52:31 am »
I thougth of making an tutorial for how to get an input string in Axe without the use of input()
and I don't know if there are any specifications of  how to make it.
sadly there isn't a tutorial about how to make a tutorial  ::)

PS: I don't even know if this is the correct Section to ask this question. I'm sorry if I made something wrong

24
Axe / Re: Sprites
« on: September 18, 2013, 05:43:11 am »
First you need your Bitmap data.
so for example lets draw a 14x19 bitmap
Code: [Select]
Data(14, 19) -> GDB1
[FFFC                             
first row but the two pixles in the end should be zero (this is because you can't end the row with just half a byte
(this is meant by the "the rows of the image padded with zeros to the nearest byte."
FFFC
FFFC
... now you have three rows of black
complete the 16 other and throw a ] at the end
...
FFFC]

Your Bitmap is now stored at GDB1
To display it just call
Code: [Select]
Bitmap(X,Y,GDB1

I don't use the Bitmap() often, so correct me if I made a mistake somewhere  <_<

25
Art / Re: need for atomic mushroom cloud
« on: September 14, 2013, 09:31:34 am »
What kind of programming language do you use? Do you just need the images or should they be in a specific format?

I use Axe and I just need the images.  ;)
I thought of an explosion (screen turns to white) and after that there would be the cloud.
It shouldn't grow anymore but it would be nice if you can see the material rising.
Maybe like this one
http://www.youtube.com/watch?v=8pZklcho378 (only 0:25 and later)

26
Art / need for atomic mushroom cloud
« on: September 13, 2013, 12:54:43 pm »
Hi I need an atomic mushroom cloud animation for my game.

Because I'm not good with drawing  :-\ I feel free to ask here

the animation should be 2-4 frames and 64x64 pixles black white (no grayscale)
Thought it may be smaller  ;)
By the way there is no need for the cloud to rise out of the ground

Thank you for your try in advance
and of course I will credit you in my game if I use your sprites

27
Axe / Re: Turn off Calc and Exit Program in Axe?
« on: December 03, 2012, 09:51:22 am »
My problem was that the display turned off and I didn't notice the calculator was nevertheless turned on.

I will try it once again as soon as I have a bit more time x.x

28
Axe / Re: Jumping
« on: November 22, 2012, 09:59:35 am »
You might be able to set it up by only moving it 1 pixel at a time and changing your Pauses so the fall looks realistic.

But the problem with that is that if you want to add some horizontal movement it is also affected by those changing pauses.
I wouldn't do that with pixel testing but with virtual pixel testing http://www.omnimaga.org/index.php?action=articles;sa=view;article=66
You have the position of the ground in some variable or it is constant.
Now you can test with Y>Ground if your object has hit the ground.
Don't forget to make something like Ground -> Y otherwise your object can kind of sink into the ground.

29
Axe / Re: Jumping
« on: November 22, 2012, 03:26:50 am »
You can take a jump variable (for example J) that is every time 0 when you are on the ground and 1 when you have jumped. Now whenever the jump key is pressed you test your jump variable. When it's 0 you can do your jump initialization and set J to 1. When your object hits the ground again just reset J to 0.  ;)

I think this should work :)

30
Axe / Re: Negative/Opposite Numbers
« on: November 22, 2012, 03:17:32 am »
couldn't you leave the parentheses
Code: [Select]
1=EXP1*2-1→Z
or if the "true" isn't always 1
Code: [Select]
0<EXP1*2-1→Z

Pages: 1 [2] 3 4