Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
23 May, 2013, 13:07:05 *
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.

Poll
Question: I would like to expand some drawing commands! What syntax do you prefer for:   [1] Horizontal and vertical lines? [2] White and xor drawing?   Please pick ONE [1] option and ONE [2] option.
[1] Prefix with letters:   HLine(Y,X1,X2)  and  VLine(X,Y1,Y2) - 16 (26.7%)
[1] Overload shift commands:   Horizontal(Y,X1,X2)  and  Vertical(X,Y1,Y2) - 3 (5%)
[1] Use Horiz and G-T:   Horiz(Y,X1,X2)  and  Vert(X,Y1,Y2) - 6 (10%)
[1] Use LinReg(a+bx)  and LinReg(ax+b) :   HLine(Y,X1,X2)  and  VLine(X,Y1,Y2) - 4 (6.7%)
[1] Use LinReg(a+bx)  and LinReg(ax+b) :   Horiz(Y,X1,X2)  and  Vert(X,Y1,Y2) - 2 (3.3%)
[1] Other:   Please specify in a post! - 0 (0%)
[2] Use letter modifiers W and X:   e.g.  WHLine(Y,X1,X2),  WRect(X,Y,W,H),  XLine(X1,Y1,X2,Y2),  XCircle(X,Y,R) - 20 (33.3%)
[2] Use symbol modifiers ! and i:   e.g.  !HLine(Y,X1,X2),  !Rect(X,Y,W,H),  iLine(X1,Y1,X2,Y2),  iCircle(X,Y,R) - 9 (15%)
[2] Other:   Please specify in a post! - 0 (0%)
Total Voters: 32

Pages: 1 ... 87 88 [89] 90 91 ... 146   Go Down
  Print  
Author Topic: Axe Parser -  (Read 121678 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: Today at 03:56:01
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7813


Total Post Ratings: +706

View Profile WWW
« Reply #1320 on: 04 October, 2010, 04:08:16 »
0

D'oh! I could have used that to save like fifty bytes off Simul Tongue
Logged




DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Today at 07:29:18
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50226


Total Post Ratings: +2615

View Profile WWW
« Reply #1321 on: 04 October, 2010, 05:58:35 »
0

I use DS<() a lot in Supersonic Ball, because the animation speed for sprites/tiles varies from a level to another.
Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
Runer112
Project Author
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 06:53:04
Date Registered: 02 July, 2009, 06:38:05
Posts: 1680


Total Post Ratings: +493

View Profile
« Reply #1322 on: 04 October, 2010, 21:54:38 »
0

While we're on the topic of optimizations... Would something like A-128≥≥0 be more optimized than A≥≥128? And if so, why is the ≥≥CONST entry in Auto Opts.txt listed as taking a whole 11 bytes more than ≥≥0?
« Last Edit: 04 October, 2010, 21:55:35 by Runer112 » Logged
Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: Today at 03:56:01
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7813


Total Post Ratings: +706

View Profile WWW
« Reply #1323 on: 04 October, 2010, 22:00:09 »
0

≥≥0 doesn't really require any code at all in ASM. Every other test really does what you did above: it subtracts the value to test for, and see how the answer compares to zero.
Logged




Runer112
Project Author
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 06:53:04
Date Registered: 02 July, 2009, 06:38:05
Posts: 1680


Total Post Ratings: +493

View Profile
« Reply #1324 on: 04 October, 2010, 22:21:53 »
0

≥≥0 definitely requires code, as it needs to check the sign bit and return it's inverse. And I'm also wondering why ≥≥CONST is 11 bytes larger than ≥≥0, because it seems to me that it could be optimized to just combine -CONST and ≥≥0 and only be 4 bytes larger.
« Last Edit: 04 October, 2010, 22:23:42 by Runer112 » Logged
calc84maniac
Epic z80 roflpwner
Coder Of Tomorrow
LV11 Super Veteran (Next: 3000)
*
Offline Offline

Gender: Male
Last Login: 20 May, 2013, 21:27:24
Date Registered: 28 August, 2008, 05:09:05
Location: Right behind you.
Posts: 2735


Total Post Ratings: +373

View Profile
« Reply #1325 on: 04 October, 2010, 22:24:31 »
0

While we're on the topic of optimizations... Would something like A-128≥≥0 be more optimized than A≥≥128? And if so, why is the ≥≥CONST entry in Auto Opts.txt listed as taking a whole 11 bytes more than ≥≥0?
A-128≥≥0 will fail for 128 values close to -32768. That's because after you subtract 128, they become positive and then the comparison will think it is greater. The ≥≥CONST routine takes this into account.
Logged

"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman
Runer112
Project Author
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 06:53:04
Date Registered: 02 July, 2009, 06:38:05
Posts: 1680


Total Post Ratings: +493

View Profile
« Reply #1326 on: 04 October, 2010, 22:55:57 »
0

Ah right, I didn't think of that...
Logged
Darl181
Vy'o'us pleorsdtu tlh'e gjaemue.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Online Online

Gender: Male
Last Login: Today at 12:42:34
Date Registered: 10 June, 2010, 00:32:08
Location: {I*9+L₁+1},{I*9+L₁+3}
Posts: 3280


Total Post Ratings: +267

View Profile WWW
« Reply #1327 on: 09 October, 2010, 04:51:50 »
0

I'm kind of new to programming, and there are a few things I'm unfamiliar with.
1. What is a nibble?
2. What can you do with nibbles?
3. In what kind of situation would nibbles be useful?
4. How are nibbles used?
« Last Edit: 09 October, 2010, 04:52:12 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
Interactive 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);
Quigibo
The Executioner
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: 21 May, 2013, 02:03:21
Date Registered: 22 January, 2010, 05:02:37
Location: Los Angeles
Posts: 2022


Topic starter
Total Post Ratings: +1019

View Profile
« Reply #1328 on: 09 October, 2010, 05:00:24 »
0

A one or zero is a bit.
4 bits = 1 nibble
8 bits = 1 byte
16 bits = 1 word

Get it!? Half of a bite!  Grin  It's hilarious how so many terms in computer and electrical engineering are either about food or sex.  It just shows what goes on in the mind of a programmer...

You can hold 2 nibbles in 1 byte so they're mostly used for compression if you don't need 256 possible values and can use just 16 then you're using half the memory.
« Last Edit: 09 October, 2010, 05:02:22 by Quigibo » Logged

___Axe_Parser___
Today the calculator, tomorrow the world!
Darl181
Vy'o'us pleorsdtu tlh'e gjaemue.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Online Online

Gender: Male
Last Login: Today at 12:42:34
Date Registered: 10 June, 2010, 00:32:08
Location: {I*9+L₁+1},{I*9+L₁+3}
Posts: 3280


Total Post Ratings: +267

View Profile WWW
« Reply #1329 on: 09 October, 2010, 05:04:40 »
0

So you could theoretically halve the space a variable takes?
4. How are nibbles used? commands list, right?
« Last Edit: 09 October, 2010, 05:05:31 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
Interactive 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);
tloz128
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 03 October, 2011, 03:48:39
Date Registered: 19 March, 2010, 04:19:08
Location: Hyrule
Posts: 317


Total Post Ratings: +52

View Profile
« Reply #1330 on: 09 October, 2010, 05:18:30 »
0

Um... what computer terms get their names from sex?
Logged

Naaa... Na Nah Na Nana Na Nah... Hey Jude!
Quigibo
The Executioner
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: 21 May, 2013, 02:03:21
Date Registered: 22 January, 2010, 05:02:37
Location: Los Angeles
Posts: 2022


Topic starter
Total Post Ratings: +1019

View Profile
« Reply #1331 on: 09 October, 2010, 11:08:25 »
+2

Its mostly electrical terms.  Like male and female connectors, wire strippers, tickler coil, screws, nuts, etc.

You don't "halve" a variable unless you can actually do it.  If the variable has to hold more than 16 possible unique values then a nibble is not sufficiently large enough to hold your data so you would have to use a byte or word instead.  Some tile mappers for instance might always use 16 or fewer tiles per room and so you can load a palette for each group of rooms and then compress the maps to half the size.

Another example is if your character is always aligned to an 8x8 grid, then the X,Y coordinates can be written to a single byte rather than a separate byte for each variable since there are only 12 X possibilities and 8 Y possibilities.  Keep in mind though, that you should only do this if memory is a problem.  Accessing bytes, and sometimes words, is actually fastest and smallest in the program when it comes to reading memory even though the actual data is bigger.
« Last Edit: 09 October, 2010, 11:13:58 by Quigibo » Logged

___Axe_Parser___
Today the calculator, tomorrow the world!
Darl181
Vy'o'us pleorsdtu tlh'e gjaemue.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Online Online

Gender: Male
Last Login: Today at 12:42:34
Date Registered: 10 June, 2010, 00:32:08
Location: {I*9+L₁+1},{I*9+L₁+3}
Posts: 3280


Total Post Ratings: +267

View Profile WWW
« Reply #1332 on: 09 October, 2010, 18:06:04 »
0

That makes sense.  Thanks!

quote author=tloz128 link=topic=1453.msg72139#msg72139 date=1286594310]
Um... what computer terms get their names from sex?
[/quote]
Can't say I've looked into that much...
« Last Edit: 09 October, 2010, 18:06:19 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
Interactive 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);
Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: Today at 03:56:01
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7813


Total Post Ratings: +706

View Profile WWW
« Reply #1333 on: 10 October, 2010, 00:35:02 »
0

FOOD ... j/k Grin

Btw, here's an example where nibbles are really useful.
Logged




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

Gender: Male
Last Login: Today at 12:42:34
Date Registered: 10 June, 2010, 00:32:08
Location: {I*9+L₁+1},{I*9+L₁+3}
Posts: 3280


Total Post Ratings: +267

View Profile WWW
« Reply #1334 on: 14 October, 2010, 06:07:00 »
0

Another question.
The game I've been working of, TWHG, currently has a basic and space-consuming way of naming the levels.

1
2
3
4
5
6
7
8
9
"appvWHGLVL1"→Str01
"appvWHGLVL2"→Str02
"appvWHGLVL3"→Str03
...And so on
"appvWHGLVL9"→Str09

.A is the level number
.↓Reference like this
Str01+(A*9)

I tried optimizing it.

1
2
3
"appvWHGLVL0"→Str0V
.A is the level number
A→{Str0V+7}
Ideally, this would change the number in the Str0V and so reference a different appvar.
So far, I haven't had much luck with it.
Does anybody have any ideas how to get this to work? Huh?
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
Interactive 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);
Pages: 1 ... 87 88 [89] 90 91 ... 146   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 2.307 seconds with 34 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.