Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
19 June, 2013, 12:23:07 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 ... 84 85 [86] 87 88 ... 110   Go Down
  Print  
Author Topic: Axe Q&A -  (Read 60190 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
MGOS
LV5 Advanced (Next: 300)
*****
Offline Offline

Gender: Male
Last Login: Today at 06:55:51
Date Registered: 29 July, 2011, 16:54:53
Location: Germany
Posts: 297


Total Post Ratings: +74

View Profile
« Reply #1275 on: 31 December, 2011, 18:52:30 »
0

Wow, this is exactly what I needed - thanks!

But how can I handle the other possible keypresses? Should I change everything to getkey->K and check the other possibilities with the inData, or can I leave the getkey()?

This

1
2
3
4
5
6
7
8
9
10
11
12
Repeat getkey(15)
getkey->K
inData(K,Number-Possibilities)->N
if N<9 + N
do number stuff
elseif getkey(whatever)
do other stuff
elseif getkey(whatever)
do other stuff
End
End
Or that:

1
2
3
4
5
6
7
8
9
10
11
12
0->K
Repeat K=15
getkey->K
inData(K,All Possibilities)->N
if N<9 + N
do number stuff
elseif N=whatever
do other stuff
elseif N=whatever
do other stuff
End
End
Logged

Click those to see more information Smiley
Current   
Projects: 
ztrumpet
The Rarely Active One
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: 11 June, 2013, 05:10:51
Date Registered: 08 November, 2009, 21:10:12
Location: Michigan
Posts: 5688


Total Post Ratings: +360

View Profile
« Reply #1276 on: 31 December, 2011, 19:17:27 »
0

It depends.  What are you using this for?  If this is for a menu or text input, I'd go with getKey, but if this is for part of the main engine for a game I'd go with getKey(#) and make eight of them in If statements.
Logged

MGOS
LV5 Advanced (Next: 300)
*****
Offline Offline

Gender: Male
Last Login: Today at 06:55:51
Date Registered: 29 July, 2011, 16:54:53
Location: Germany
Posts: 297


Total Post Ratings: +74

View Profile
« Reply #1277 on: 31 December, 2011, 19:32:32 »
0

It's more like an editor, so I think getkey->K is good for this. But if I used both functions, would they still work both fine?
Logged

Click those to see more information Smiley
Current   
Projects: 
ztrumpet
The Rarely Active One
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: 11 June, 2013, 05:10:51
Date Registered: 08 November, 2009, 21:10:12
Location: Michigan
Posts: 5688


Total Post Ratings: +360

View Profile
« Reply #1278 on: 31 December, 2011, 20:05:52 »
0

It's more like an editor, so I think getkey->K is good for this. But if I used both functions, would they still work both fine?
They'd work fine, but I'd stick to one or the other for a more standard appearance.
I think getKey->K is the best solution too.

Good luck with the editor.
Logged

Darl181
Vy'o'us pleorsdtu tlh'e gjaemue.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Gender: Male
Last Login: Today at 09:37:15
Date Registered: 10 June, 2010, 00:32:08
Location: {I*9+L₁+1},{I*9+L₁+3}
Posts: 3298


Total Post Ratings: +269

View Profile WWW
« Reply #1279 on: 31 December, 2011, 20:37:21 »
0

Ok I have a feeling I'd be able to firgure this out myself, but it would prolly take a while since I don't remember much from math Tongue

Anyway, so I have a projectile flying at (S,T) with an angle, Z.  If Z is zero it faces straight down, 256 degrees, etc.
I have an enemy at, say, (X,Y).  How would I check which side of the projectile the enemy is on (right or left), related to the projectile's angle?
Logged




 
Spoiler for Stuff:



OS 2.43  Boot 1.02  Hardware Rev. B

OS 1.04.32

OS 3.1.0.392  Boot1 3.0.99  Boot2 3.10.16
Spoiler for Misc:
Quote
You'll understand / It's not a shame / To be always / Losing the game / Burma-Shave
"Dynamic userbars!"
Omnimaga radio
Our World of Text
Draw on websites
Then blow them up
In-browser flight simulator
Haxball: MMO soccer/air hockey game
  Draw with sand.  Yay?
The Game
You just lost the game
Zombo.com
light post color is #dfefff
dark post color is #cae4ff
quote box color is #6699ff
transparent color is...transparent 0.o
Spoiler for Forum search alternative (bookmarklet):
https://www.squarefree.com/bookmarklets/search.html
javascript:q=""+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);if(!q)q=prompt("No%20selected%20text;%20enter%20search%20term.").replace(/\s\+/g,"%252B");if(q!=null)location="http://www.google.com/search?q="+q.replace(/\s+/g,"+")+"+site:"+location.hostname;void(0);
jacobly
LV5 Advanced (Next: 300)
*****
Offline Offline

Last Login: Yesterday at 22:18:01
Date Registered: 09 October, 2011, 01:53:09
Posts: 200

Total Post Ratings: +150

View Profile
« Reply #1280 on: 31 December, 2011, 21:06:55 »
+1

Data(33,34,26,18,35,27,19,36,28,20)->GDB0
While 1
getKey->K
inData(K,GDB0)->r1
EndIf r1

Data(33,34,26,18,35,27,19,36,28,20,0)->GDB0
While 1
getKey->K
inData(K,GDB0)->r1
EndIf r1

Fixed.

Ok I have a feeling I'd be able to firgure this out myself, but it would prolly take a while since I don't remember much from math Tongue

Anyway, so I have a projectile flying at (S,T) with an angle, Z.  If Z is zero it faces straight down, 256 degrees, etc.
I have an enemy at, say, (X,Y).  How would I check which side of the projectile the enemy is on (right or left), related to the projectile's angle?
tan⁻¹(S-X,T-Y)-Z^256<128 should be true if the projectile needs to rotate in the positive direction.
tan⁻¹(S-X,T-Y)-Ze0 is optimized but returns the opposite.
Logged
ztrumpet
The Rarely Active One
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: 11 June, 2013, 05:10:51
Date Registered: 08 November, 2009, 21:10:12
Location: Michigan
Posts: 5688


Total Post Ratings: +360

View Profile
« Reply #1281 on: 31 December, 2011, 21:25:52 »
0

Data(33,34,26,18,35,27,19,36,28,20)->GDB0
While 1
getKey->K
inData(K,GDB0)->r1
EndIf r1

Data(33,34,26,18,35,27,19,36,28,20,0)->GDB0
While 1
getKey->K
inData(K,GDB0)->r1
EndIf r1

Fixed.
Good catch.  Thank you!
Logged

Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Today at 08:32:53
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5645


Total Post Ratings: +589

View Profile
« Reply #1282 on: 31 December, 2011, 22:33:05 »
0

tan⁻¹(S-X,T-Y)-Z^256<128 should be true if the projectile needs to rotate in the positive direction.
tan⁻¹(S-X,T-Y)-Ze0 is optimized but returns the opposite.
If you had the X and Y velocity (we'll call A,B) instead of an angle, you could ditch the slow trigonometry and use cross products instead!


1
X-S*B-(Y-T*A)<<0
Logged

BlakPilar
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 20 February, 2013, 02:38:22
Date Registered: 16 July, 2011, 02:50:55
Posts: 735


Total Post Ratings: +43

View Profile
« Reply #1283 on: 07 January, 2012, 05:14:36 »
0

How does Axe handle sprites whose lengths are greater than 16? For example, if I had [AA00AA00AA00AA0032BB32BB32BB32BB] would it be displayed horizontally as two sprites, vertically as two sprites, or some other way completely?
Logged
Darl181
Vy'o'us pleorsdtu tlh'e gjaemue.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Gender: Male
Last Login: Today at 09:37:15
Date Registered: 10 June, 2010, 00:32:08
Location: {I*9+L₁+1},{I*9+L₁+3}
Posts: 3298


Total Post Ratings: +269

View Profile WWW
« Reply #1284 on: 07 January, 2012, 05:18:13 »
0

Pt-*() displays the next 8 bytes after the pointer.  So, if you wanted that to display them, one after the other, you would have to display it 8 bytes at a time:
[AA00AA00AA00AA0032BB32BB32BB32BB]→Pic1
.stuff, etc
Pt-On(X,Y,Pic1)
Pt-On(X+8,Y,Pic1+8)


« Last Edit: 07 January, 2012, 05:18:32 by Darl181 » Logged




 
Spoiler for Stuff:



OS 2.43  Boot 1.02  Hardware Rev. B

OS 1.04.32

OS 3.1.0.392  Boot1 3.0.99  Boot2 3.10.16
Spoiler for Misc:
Quote
You'll understand / It's not a shame / To be always / Losing the game / Burma-Shave
"Dynamic userbars!"
Omnimaga radio
Our World of Text
Draw on websites
Then blow them up
In-browser flight simulator
Haxball: MMO soccer/air hockey game
  Draw with sand.  Yay?
The Game
You just lost the game
Zombo.com
light post color is #dfefff
dark post color is #cae4ff
quote box color is #6699ff
transparent color is...transparent 0.o
Spoiler for Forum search alternative (bookmarklet):
https://www.squarefree.com/bookmarklets/search.html
javascript:q=""+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);if(!q)q=prompt("No%20selected%20text;%20enter%20search%20term.").replace(/\s\+/g,"%252B");if(q!=null)location="http://www.google.com/search?q="+q.replace(/\s+/g,"+")+"+site:"+location.hostname;void(0);
BlakPilar
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 20 February, 2013, 02:38:22
Date Registered: 16 July, 2011, 02:50:55
Posts: 735


Total Post Ratings: +43

View Profile
« Reply #1285 on: 07 January, 2012, 05:40:45 »
0

Ahh, okay. So [AA00AA00AA00AA0032BB32BB32BB32BB] is equivalent to [AA00AA00AA00AA00][32BB32BB32BB32BB]?
Logged
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Today at 08:32:53
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5645


Total Post Ratings: +589

View Profile
« Reply #1286 on: 07 January, 2012, 05:57:20 »
0

If two calculators were connected via linkport and both running Axe programs, and 1 calculator wrote 1 into the Port, and the other wrote a 2 into the port, what would each calculator read the port as?  I know the result can be determined by some sort of binary combination of the two numbers but I can't remember which.
Logged

Darl181
Vy'o'us pleorsdtu tlh'e gjaemue.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Gender: Male
Last Login: Today at 09:37:15
Date Registered: 10 June, 2010, 00:32:08
Location: {I*9+L₁+1},{I*9+L₁+3}
Posts: 3298


Total Post Ratings: +269

View Profile WWW
« Reply #1287 on: 07 January, 2012, 06:07:01 »
0

So [AA00AA00AA00AA0032BB32BB32BB32BB] is equivalent to [AA00AA00AA00AA00][32BB32BB32BB32BB]?
Yes.
« Last Edit: 07 January, 2012, 06:07:45 by Darl181 » Logged




 
Spoiler for Stuff:



OS 2.43  Boot 1.02  Hardware Rev. B

OS 1.04.32

OS 3.1.0.392  Boot1 3.0.99  Boot2 3.10.16
Spoiler for Misc:
Quote
You'll understand / It's not a shame / To be always / Losing the game / Burma-Shave
"Dynamic userbars!"
Omnimaga radio
Our World of Text
Draw on websites
Then blow them up
In-browser flight simulator
Haxball: MMO soccer/air hockey game
  Draw with sand.  Yay?
The Game
You just lost the game
Zombo.com
light post color is #dfefff
dark post color is #cae4ff
quote box color is #6699ff
transparent color is...transparent 0.o
Spoiler for Forum search alternative (bookmarklet):
https://www.squarefree.com/bookmarklets/search.html
javascript:q=""+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);if(!q)q=prompt("No%20selected%20text;%20enter%20search%20term.").replace(/\s\+/g,"%252B");if(q!=null)location="http://www.google.com/search?q="+q.replace(/\s+/g,"+")+"+site:"+location.hostname;void(0);
jacobly
LV5 Advanced (Next: 300)
*****
Offline Offline

Last Login: Yesterday at 22:18:01
Date Registered: 09 October, 2011, 01:53:09
Posts: 200

Total Post Ratings: +150

View Profile
« Reply #1288 on: 07 January, 2012, 17:24:50 »
0

If two calculators were connected via linkport and both running Axe programs, and 1 calculator wrote 1 into the Port, and the other wrote a 2 into the port, what would each calculator read the port as?
0

I know the result can be determined by some sort of binary combination of the two numbers but I can't remember which.
(A or B) xor 3 or equivalently 3-(A or B)
Logged
parserp
Hero Extraordinaire
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: 28 May, 2013, 02:33:36
Date Registered: 08 September, 2011, 02:01:43
Location: Here.
Posts: 1421


Total Post Ratings: +80

View Profile WWW
« Reply #1289 on: 08 January, 2012, 08:04:53 »
0

Does axe have buffer support for text? Cause I can't do:


1
:Text(X,Y,"Stuff"[sup]r[/sup]
« Last Edit: 08 January, 2012, 08:05:46 by parser padwan » Logged

ticalc.org | Cemetech | TI-Freakware | casiocalc.org

My New Website!
Spoiler for The Rest:



A useful tool
Spoiler for bands:
Five Finger Death Punch
Disturbed
Slipknot
Linkin Park
Avenged Sevenfold
Breaking Benjamin
Skillet
30 Seconds to Mars
Pages: 1 ... 84 85 [86] 87 88 ... 110   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.278 seconds with 30 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.