Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
22 May, 2013, 01:06:25 *
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.

  Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 20
61  Calculator Community / TI Z80 Calculator Projects / Re: Bounce on: 30 September, 2012, 15:54:24
So Rect is 112 bytes larger than pt-on? Wow, that's huge. That means that I can save 112 bytes by using Pt-On for my paddle!
No, it isn't. Rect is 112 bytes large in total. The routines are only added to your program if they occur at least once in the source. So basically using two times Pt-Off will only add one Pt-Off to the program, and every times you need it, the function is called (like a subroutine).
You can save bytes by using only one type of routines (e.g. all Pt-Off or all Rect) instead of having different.
62  Calculator Community / ASM Language / Custom vertical line routine crashes on: 30 September, 2012, 12:45:32
Writing some program in axe, I needed a fast vertical line routine to substitute this:

1
Rect(X,22-E,1,E*2+1)

The routine should draw a vertical, at y=22 centered line expanding E pixels up and down to a total length of E*2+1 in column X.
This is my idea:

1
2
3
4
5
Axe
:X:asm(E5) ;push hl
:^8:asm(23E5) ;inc hl, push hl   (gets the number of rotating cycles needed)
:E
:asm(The routine)


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
Stack: #Rotation cycles,  X
HL : E

 pop bc     ; #Rotation cycles  , Stack: 1
 pop de     ; X       Stack: 0
 srl e      ; Div 8
 srl e
 srl e      ; DE: X/8
 ld a,l     ; A: E
 add hl,hl  ; 2E
 inc hl     ; 2E+1
 ld b,l     ; B: 2E+1, #Lines
 push bc    ; #Lines, #Rotation cycles ,  Stack: 1
 ld b,a     ; B: E
 ld a, 22   ; A: 22
 sub b      ; A: 22-E
 ld l,a     ; HL: 22-E
 ld c,l
 ld b,h     ; BC: 22-E   MUL 12
 add hl,hl  ; *2
 add hl,bc  ; *3
 add hl,hl  ; *6
 add hl,hl  ; *12
 add hl,de  ; HL:  (22-E)*12+(X/8)
 ld de, $9340 ; plotsscreen
 add hl,de  ; HL: Start byte
 pop bc     ; #Lines, #Rotation cycles   , Stack: 0
Lineloop:
 ld d,b     ; backup b
 ld b,c     ; #Rotation cycles
 ld a,(hl)  ; A: Byte to modify
Sloop1:
 rla        ; rotate
 djnz Sloop1
 scf        ; Pixel on
 ld b,c     ; #Rotation cycles
Sloop2:
 rra        ; rotate back
 djnz Sloop2
 ld (hl),a  ; restore modified byte
 ld b,d     ; Restore b
 ld de,12   ; DE: 12
 add hl,de  ; Next line
 djnz Lineloop  ; until #Lines-- = 0

I hope somebody can help me finding the error, I'm stuck Undecided

Edit: It doesn't crash immediately, it does it when the program returns. The error is before lineloop I think
63  Calculator Community / TI Z80 Calculator Projects / Re: Nemesis- a new axe 3d rpg on: 24 September, 2012, 18:26:51
what is more fast : an ion assembly prog or a noshell assembly prog ?

They are the same, just a different header I think. Both is z80 asm, but Ion gives compatibility to other shells.
64  Calculator Community / TI Z80 Calculator Projects / Re: [Axe] Bullet Proof on: 21 September, 2012, 17:17:32
Oh, it's looking pretty cool Cheesy

It's fun to play against your neighbors in our math course Smiley

Things planned atm:
  • Landmines as another powerup
65  Calculator Community / TI Z80 Calculator Projects / Re: [Axe] Bullet Proof on: 20 September, 2012, 07:30:49
The last screeny should be it except for the machine guns.
66  Calculator Community / TI Z80 Calculator Projects / Re: Nemesis- a new axe 3d rpg on: 19 September, 2012, 18:59:55
I think DJ meant the diagonal walls. Would it be faster if you could reduce your algorithm for only perpendicular walls?
67  Calculator Community / TI Z80 Calculator Projects / Re: [Axe] Bullet Proof on: 19 September, 2012, 18:17:45
I couldn't do much on this, I've been working on another "scientific useful" project for some time now, but nonetheless here is an update:  Smiley

Added:
  • Automatic Archive/Unarchive safe file (no big deal, but was missing before)

Changed:
  • Fixed phantom grenades / grenades exploding much too late / grenades disappearing (occurred when both players throw a grenade the same time)
  • Downgraded the machine gun: only 9 shots, fire rate reduced from 200% to 150% (recommended by a friend)
  • Reduced grenade timer by 20% (explodes after 80 frames)

Since it isn't an update with changed graphics / major changes on game mechanics, I won't add a screeny.

Download:
68  General Discussion / Miscellaneous Discussion / Re: My new internet speed on: 18 September, 2012, 14:08:45
Could be better, but it's enough for me Smiley

69  Calculator Community / TI Z80 Calculator Projects / Re: Nemesis- a new axe 3d rpg on: 15 September, 2012, 17:19:39
If you have a second memory location to store the sorted array, this might be useful:

Pseudocode:

1
2
3
4
5
6
7
8
ptr = 0
For each element
Look for largest element
Write that data to (ptr)
Make original element 0
ptr++
Next element
Copy new array to original array

70  Calculator Community / TI Z80 Calculator Projects / Re: AxeDCS on: 09 September, 2012, 10:10:25
Awesome! Text input and custom buttons! Can't wait to try it out
71  Calculator Community / Axe Language / Re: How to create 4 level greyscale in Axe? on: 05 September, 2012, 22:27:22
Ooh, thanks, it works now, Time to go see If i can remove flicker now.
What flicker? There shouldn't be any flickering except when your loop is two slow. Can you post your code?
72  Calculator Community / Axe Language / Re: How to create 4 level greyscale in Axe? on: 05 September, 2012, 21:16:04
I meant the "..." also why is it pt-off instead of pt-on?

Yeah, remove the dots (you can add other code in there, like movement)
Make sure to initialize X and Y or replace them with constants.

Pt-Off is slightly faster than Pt-On (when X is a multiple of 8 ), so that's why I used that for the example. But doesn't really matter.

Hex:
[FFFFC3C3C3C3FFFF] for front buffer
[FF81BDA5A5BD81FF] for back buffer

That should be a neat little box with all colors!
73  Calculator Community / Axe Language / Re: How to create 4 level greyscale in Axe? on: 05 September, 2012, 20:36:52
Here is a more in-depth how-to:

The TI-83 series doesn't support grayscale natively, but axe has some functions to alternate checkerboard patters, but that is so fast (and the screen is blurry too), so that it looks for the human eye like it is gray.

Because one buffer can only store data for two colors, you'll need two buffers for 2² = 4 level grayscale. Depending on the pixel combination of both buffers you can get black, dark gray, light gray and white. The easiest way (for me) to remember the combinations is, that the main buffer has a higher "priority" or "level" than the back buffer, so if you change a pixel on the front buffer, it'll cause the result to change more than when you do it on the back buffer.
Here are the combinations for 4 level grayscale:

Front buffer: 
Back buffer:
Result:
off
off
white 
off
on
light gray 
on
off
dark gray 
on
on
black 

In order to display a 4-level sprite, you have to create two 8x8 sprites, one for the front buffer, one for the back buffer. With the table above as reference, you can make your 2 sprites out of the one desired gray sprite.

To display them, you need two Pt-commands:


1
2
3
4
5
6
7
8
9
10
11
12
13
[Hex for Front buffer]→Pic1A  ; you can use other names for pointers if you want
[Hex for Back buffer]→Pic1B
...
ClrDrawrr  ; clears both buffers at the same time
While 1
...
Pt-Off(X,Y,Pic1A)   ; X and Y are the coordinates
Pt-Off(X,Y,Pic1B)r
...
DispGraphClrDrawrr   ; for 4 level you need two radian r's
...
EndIf getkey(15)

For 3 level grayscale you need DispGraphr, for 4-level you need rr. Same when you use the DispGraphClrDraw.

Every time the DspGraphrr is passed, the checkerboard pattern is changed.

That should be it.
74  Calculator Community / Axe Language / Re: Enemies Freezing after another enemy is shot? (UPDATED) on: 04 September, 2012, 18:33:49
Also would the arithmetic logic be a good optimization for speed on a ti84+SE?
For "+" always, but for the multiplying I have to admit that runer's right. Take the bitwise "and" when you compare booleans.


Note:
"2 and 1" would be true in boolean, but you have to use multiplication because the bitwise "and" would return zero.
75  Calculator Community / Axe Language / Re: Enemies Freezing after another enemy is shot? (UPDATED) on: 04 September, 2012, 18:03:19
Only applies if the pointer is not a constant! Tongue L2 is a constant, so that part of his code is fine.
Whoa, didn't know that!  Smiley

Remember, the syntax to create a list of data in Axe is different from that in TI-BASIC:
Data(0,1,4,9,16,25,36,49,64,81,100,121,144,169,196,225)→GBD1
Stupid mistake  Frustrated

And for the "3"-key mistake: I just copied from the source, but you can blame me for not checking it Grin

Thanks runer, you make me always learn new things!
Pages: 1 ... 3 4 [5] 6 7 ... 20
Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.224 seconds with 27 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.