Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
20 May, 2013, 18:13:39 *
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 ... 72 73 [74] 75 76 ... 110   Go Down
  Print  
Author Topic: Axe Q&A -  (Read 59394 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
saintrunner
Custom Spriter: You ask it! I'll Make it!
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: 09 March, 2013, 02:00:40
Date Registered: 27 October, 2011, 21:52:46
Location: Right here....I think?
Posts: 1776


Total Post Ratings: +97

View Profile WWW
« Reply #1095 on: 28 November, 2011, 01:24:35 »
0

How do I put parts of a code as an appvar?
Logged

My Sprites Thread   :Updated often Smiley for your viewing pleasure

GAMES:
jacobly
LV4 Regular (Next: 200)
****
Offline Offline

Last Login: Today at 05:21:49
Date Registered: 09 October, 2011, 01:53:09
Posts: 199

Total Post Ratings: +149

View Profile
« Reply #1096 on: 28 November, 2011, 01:43:42 »
0

I'm pretty sure it's like that, just have the second line of hex under/part of the first one.

...
Ok, I was optimizing last night and wrote down a bunch of Q's as I went.

Do the ?/?? conditionals save space in the executable in relation to conventional If loops?  How about speed?

Can they be nested?  like B?(A++5?-1→A),→A works, nvm that

Which is faster: If (commonly true) / If (sparsely true) ?

So it's optimized to put the constants at the end...what if it's like L2+2?  Would a different order influence anything?

1. ? and ?? are just convenience notation, so they are probably the same as If statements.
2. The speed of an If statement depends on what conditionals you use. However, for If / Else statements, the Else is generally faster due to one fewer jump. This is why I generally put the commonly true branch in the else part.
3. L₂+2 and 2+L₂ both optimize to 35388 Smiley
Logged
parserp
Hero Extraordinaire
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: 16 May, 2013, 23:40:53
Date Registered: 08 September, 2011, 02:01:43
Location: Here.
Posts: 1420


Total Post Ratings: +80

View Profile WWW
« Reply #1097 on: 28 November, 2011, 01:47:38 »
0

How do I put parts of a code as an appvar?
lol I was just about to ask that, I need it for some optimizations Cheesy
does anyone have an answer?
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
Darl181
Vy'o'us pleorsdtu tlh'e gjaemue.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

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


Total Post Ratings: +267

View Profile WWW
« Reply #1098 on: 28 November, 2011, 02:01:56 »
0

If you mean something like external levels, you could create a new appvar then copy to it.
Say you have the stuff to be stored to the appvar in L1:
"appvNAME"→Str1
GetCalc(Str1,768)→P
Copy(L1,P,768)

and now you have an external appvar that has the contents of whatever was in L1 Smiley
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);
mrmprog
LV7 Elite (Next: 700)
*******
Offline Offline

Last Login: 28 September, 2012, 05:58:25
Date Registered: 15 February, 2011, 01:35:36
Location: Somewhere
Posts: 559


Total Post Ratings: +34

View Profile
« Reply #1099 on: 28 November, 2011, 02:12:02 »
0

How do I put parts of a code as an appvar?
Do you mean "run" code in an appv?
Logged

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

Gender: Male
Last Login: Today at 11:52:38
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5642


Total Post Ratings: +589

View Profile
« Reply #1100 on: 28 November, 2011, 02:12:11 »
0

How do I put parts of a code as an appvar?

This is extremely difficult to get working, because of the way assembly works.  Assembly code only works at a specific location, if it is moved to anywhere else in memory, it will cause horrible crashes.  The issue with running code in an appvar, is that you need to copy that code to $959D, which is where your current program is!  It becomes a bit easier if your current program is an appvar, but even then it requires custom asm and Bcall knowledge.  I am not an expert on getting it to work, so I can't provide the details.  So the most I can say is try to fit all your code in 1 program, and use a program like Fullrene or Crabcake to surpass the execution limits. 
Logged

saintrunner
Custom Spriter: You ask it! I'll Make it!
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: 09 March, 2013, 02:00:40
Date Registered: 27 October, 2011, 21:52:46
Location: Right here....I think?
Posts: 1776


Total Post Ratings: +97

View Profile WWW
« Reply #1101 on: 28 November, 2011, 02:17:40 »
0

ok so what I meant was, How do I save a level in one of my games as an appvar, and how do I get it into my games main program later? In Axe?

but I figured it out
« Last Edit: 28 November, 2011, 02:17:50 by saintrunner » Logged

My Sprites Thread   :Updated often Smiley for your viewing pleasure

GAMES:
epic7
Chopin!
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 04:26:36
Date Registered: 22 October, 2011, 01:45:43
Location: Northeast US
Posts: 2162


Total Post Ratings: +118

View Profile
« Reply #1102 on: 28 November, 2011, 04:05:47 »
0

Problem that's had me stuck for a few days:

I honestly cant find what's wrong with it Big frown

The beginning part that works.
Spoiler for Hidden:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
:.AAHOOK
:DiagnosticOff
:[1028103854382828]➔Pic1
:[102A123C50B82828]
:[FFFFFFFFFFFFFFFF]➔Pic2
:1➔R−1➔H➔Q➔B➔P
:256➔X
:12288➔Y
:Fix 5
:Repeat getKey(15)
:ClrDraw
:If X∕256<<1
:256➔X
:End
:If X∕256>88
:22528➔X
:End
:If (H=0) or (H=1)
:If getKey(3)
:X+256➔X
:1➔R
:End
:If getKey(2)
:X−256➔X
:0➔R
:End
:End
:If H>40
:If getKey(2)
:0➔R
:End
:If getKey(3)
:1➔R
:End
:End
:For(A,0,11)
:Pt-On(A∗8,1,Pic2
:Pt-On(A∗8,56,Pic2)
:End
Where it starts to not work

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
:If (getKey(54))∗((H=0)+(H>40))∗(B=0) ;works
:If Y∕256=48 ;works
:1➔H
:Else
:2➔H
:End
:End
:If H=1 ;works
:Y−256➔Y
:If Y∕256=26
:2➔H
:End
:End
:If H=2
:X∕256➔S
:Y∕256➔T
:R➔θ
:Repeat pxl-Test(S,T) ;all this works
:T++
:If θ
:S++
:Else
:S−−
:End
:End
:If H>1
:If H≤40
:1➔P ;works
:Line(X∕256+7,Y∕256,S,T) ;this flashes on, but just once, so doesn't work much
:Else
:0➔P
:End
:If H<15
:Y+256➔Y ;doesnt work
:If θ
:X+256➔X ;but this does (1 time)
:Else
:X−256➔X
:End
:H++ ;i think this only works once.
:If Y∕256=48
:0➔H➔P➔S➔T
:10➔B
:End
:End
I cant tell if this part works or not.
Spoiler for Hidden:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
:If H≥15 and (H≤25)
:If H<21
:Y+(256−((H−15)∗25))➔Y
:Else
:Y−((H−15)∗25)➔Y
:End
:H++
:End
:If H≥25 and (H≤40)
:If θ
:X+256➔X
:Else
:X−256➔X
:End
:Y−256➔Y
:If Y∕256<9
:56➔H
:0➔P
:End
:H++
:End
:!If H≤40
:If H≤50
:H++
:If θ
:X+(384−(H−40)∗10)➔X
:Else
:X−(384+(H−40)∗10)➔X
:End
:If Y∕256<9
:56➔H
:0➔P
:End
:Y−−
:ElseIf (H≥50)∗(H≤60)
:H++
:If H<56
:Y+(256−((H−50)∗25))➔Y
:Else
:Y−((H−50)∗25)➔Y
:End
:End
:If θ
:X+256➔X
:Else
:X−256➔X
:End
:End
:If H>55
:If Y∕256<48
:Y+256➔Y
:If θ
:X+256➔X
:Else
:X−256➔X
:End
:Else
:0➔H➔S➔T
:End
:End
:End
:End

1
2
3
4
5
6
7
Then just
:Pt-On(X∕256,Y∕256,P∗8+Pic1)
:If B
:B−−
:End
:DispGraph
:End
(which works)
Logged



Current Projects:
TitleLanguageProgressStatus
DrillMiner    C (ndless)   35%         Active
?     C (ndless)   0%        Unconfirmed

Spoiler for Programming languages I currently know:
Java (Learning in AP Comp Sci)
C (Specifically Ndless)
Unity JavaScript
LabView (For FIRST robotics)
z80 ASM (Just a little bit Tongue)
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Today at 11:52:38
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5642


Total Post Ratings: +589

View Profile
« Reply #1103 on: 28 November, 2011, 04:09:05 »
0

It would help a lot if you told us what wasn't working.  Throwing a whole bunch of code into a post and asking us what is wrong is not going to help much Big frown
Logged

epic7
Chopin!
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 04:26:36
Date Registered: 22 October, 2011, 01:45:43
Location: Northeast US
Posts: 2162


Total Post Ratings: +118

View Profile
« Reply #1104 on: 28 November, 2011, 04:14:29 »
0

Good idea Tongue

In the middle section, the guy jumps into the air and freezes. I believe that H gets stuck at 3 even though I have an H++.
At the line,
:1➔P ;works
:Line(X∕256+7,Y∕256,S,T) ;but this only flashes on for 1 frame!

The guy is supposed to move, here
By the time it gets here, H is succesfuly at 2, so it works
(If H>1 is also here)

:If H<15
:Y+256➔Y ;doesnt work
:If θ
:X+256➔X ;but this does, but only 1 time for some reason
:Else
:X−256➔X
:End
:H++ ;This H++ only works once, to get H to 3. Its supposed to take it up to 15, though.
:If Y∕256=48 ;This is if the guy hits the ground early, but not really important right now.
:0➔H➔P➔S➔T
:10➔B
:End
:End

Afterwards, there is

:If H≥15 and (H≤25)

But I obviously cant get that to work since H gets stuck at 3 Undecided
I don't know if there is something preventing it from changing
« Last Edit: 28 November, 2011, 04:17:16 by epic7 » Logged



Current Projects:
TitleLanguageProgressStatus
DrillMiner    C (ndless)   35%         Active
?     C (ndless)   0%        Unconfirmed

Spoiler for Programming languages I currently know:
Java (Learning in AP Comp Sci)
C (Specifically Ndless)
Unity JavaScript
LabView (For FIRST robotics)
z80 ASM (Just a little bit Tongue)
mrmprog
LV7 Elite (Next: 700)
*******
Offline Offline

Last Login: 28 September, 2012, 05:58:25
Date Registered: 15 February, 2011, 01:35:36
Location: Somewhere
Posts: 559


Total Post Ratings: +34

View Profile
« Reply #1105 on: 28 November, 2011, 04:54:01 »
0

You may have already tried this, but whenever I get stuck like that, I just slow down the main loop a ton, and then have it display the value of the var in question. Can I see a full download of the source?
Logged

epic7
Chopin!
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 04:26:36
Date Registered: 22 October, 2011, 01:45:43
Location: Northeast US
Posts: 2162


Total Post Ratings: +118

View Profile
« Reply #1106 on: 28 November, 2011, 05:09:25 »
0

I tried exactly that Wink

I can't get to a computer right now, so I'll have to upload the calc file Tommorow. However, the full code is posted above.
Logged



Current Projects:
TitleLanguageProgressStatus
DrillMiner    C (ndless)   35%         Active
?     C (ndless)   0%        Unconfirmed

Spoiler for Programming languages I currently know:
Java (Learning in AP Comp Sci)
C (Specifically Ndless)
Unity JavaScript
LabView (For FIRST robotics)
z80 ASM (Just a little bit Tongue)
Stefan Bauwens
Creator of Myst 89 - סטיבן
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Today at 12:52:28
Date Registered: 25 February, 2011, 15:41:10
Location: Belgium
Posts: 1697


Total Post Ratings: +132

View Profile WWW
« Reply #1107 on: 29 November, 2011, 12:43:34 »
0

In my game I added interrupts.
I put 'it' to 6(slowest speed 118 times a second).
My interrupt label is this:

1
2
3
lbl m
text(doesnt matter)
dispgraphrr
But this way the grayscale is very pretty but my games goes insanely slow. Am I doing something wrong?
Logged

aeTIos
You got stair'd!
LV12 Extreme Poster (Next: 5000)
************
Online Online

Gender: Male
Last Login: Today at 17:52:35
Date Registered: 15 September, 2010, 06:00:00
Location: Netherlands, Overijssel
Posts: 3110


Total Post Ratings: +120

View Profile
« Reply #1108 on: 29 November, 2011, 15:49:53 »
0

Try removing your text?
Logged

If something above sounds rude, feel free to vote it down, it was not meant to be rude<<lolol
--Always stay relAXEd!--


Spoiler for Hidden:


[







Spoiler for Still Alive:
This was a triumph.
I'm making a note here: HUGE SUCCESS.
It's hard to overstate my satisfaction.

Aperture Science:
We do what we must because we can.
For the good of all of us
Except the ones who are dead.

But there's no sense crying over every mistake
You just keep on trying till you run out of cake
And the science gets done and you make a neat gun
For the people who are still alive.

I'm not even angry.
I'm being so sincere right now.
Even though you broke my heart and killed me.
And tore me to pieces.
And threw every piece into a fire.
As they burned it hurt because
I was so happy for you.

Now these points of data make a beautiful line
And we're out of beta we're releasing on time.
So I'm GLaD I got burned think of all the things we learned
For the people who are still alive.

Go ahead and leave me.
I think I prefer to stay inside.
Maybe you'll find someone else to help you.
Maybe Black Mesa -
THAT WAS A JOKE. HA HA, FAT CHANCE.
Anyway, this cake is great:
It's so delicious and moist.

Look at me still talking when there's science to do.
When I look out there it makes me GLaD I'm not you.
I've experiments to run there is research to be done
On the people who are still alive

And believe me I am still alive.
I'm doing science and I'm still alive.
I feel FANTASTIC and I'm still alive.
While you're dying I'll be still alive.
And when you're dead I will be still alive.

Still alive
Still alive
Stefan Bauwens
Creator of Myst 89 - סטיבן
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Today at 12:52:28
Date Registered: 25 February, 2011, 15:41:10
Location: Belgium
Posts: 1697


Total Post Ratings: +132

View Profile WWW
« Reply #1109 on: 29 November, 2011, 16:00:15 »
0

Nope Sad
It helps a bit i think but moving left and right is really slow and I think it's because it has to draw a part of the map then.
Logged

Pages: 1 ... 72 73 [74] 75 76 ... 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.359 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.