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

Pages: 1 2 [3] 4 5 ... 52
31
The world of Escheron is currently being populated and scripted. I've been taking care of the general area scripting while Geekboy has been working on the various cutscenes that helps greatly in the narrative.

We will have a closed alpha available once enough of the game is scripted such that it can be reasonably played from start to (hopefully) finish and feel comfortable enough in the ability to get to that content. The battle system has nothing coded in it apart from a debug display that dumps current encounter state, so that will be a whlie yet, tho thankfully, is not a necessary element to test the events.

32
Oh. You'd think that they would've had some sort of relay device that expedites the screen drawing considering the disparity there. I personally figured there was a draw buffer that was accessed by bankswitching then pushed to the screen. I'm not an engineer yet, so I don't even know if that'd be the most efficient. That's too bad though, I'd hoped the problem was software side. To me it seems odd to run a 16-bit device with an 8-bit processor though.

Apart from the CE, no calculator of the TI-84+ line or lower has had memory mapping, which is pretty much what you just described. And even then, the rest of the hardware is simply ancient. There's only so much you can do with a 15MHz processor where even the fastest instruction requires 4 clock cycles to complete, and to trying to drive 75K 16-bit color pixels with that is just not going to work very well, even with memory-mapping.

And why 16-bit? TI wanted a color calculator to deal with some of their competition, and that's what they could come up with without radically changing the basics of how the calculator is programmed (since their OS still has to run with little modification).

Even though you don't need a supercomputer to do basic addition and multiplication, you still need some minimum specs to make the whole thing work. From what I understood, too many people complained about the CSE's slowness, and so TI responded some time later by releasing the CE, which ran significantly faster due to its use of an ez80 processor with having memory-mapped (almost) everything.

Do remember that these devices were never meant to be used to play games, and so were never built with that capability in mind. The fact that it's possible at all is a testament to the programming community as a whole. I find it nothing short of a miracle that TI-Boy will run with any kind of speed on the CSE.

33
It's close to an alpha/early beta release. Over the past month or so, quite a few additions were made:

EDIT: For clarification purposes, some of the equipment/magic is not available in the actual storyline. The screenshots were made using a special save file crafted for debugging purposes. This includes any spell that has 0 cost and the "Circuit" series items.

* Magic menu fully functional and descriptive, including the "Teleport" spell (where applicable).


* Shops now have prices.
* Inns now supported. They can't remove status effects nor revive people, but those who are still alive will benefit.


* Vehicular travel fully supported.


Not shown:
* Equip logic in place, so there's limits to what you can equip where.
* Enemy bitmaps and stat data in place.
* The world of Escheron is fully interconnected. It is possible to explore most of the world now.
* The world of Escheron is fully stocked on treasures.
* Tons and tons of tweaks to collision and maps.

TODO:
* Figure out if the cutscene script system is actually usable.
* Airship-as-NPCs for overworld atmospheric effect and cutscenes.
* Battle system.
* Maybe an actual title screen? I dunno.


34
-Why are the graphical drivers so sluggish for the colour screen as many have pointed out? Could they be replaced?
When we speak of "driver" in this context, we're really talking about the combination of hardware and firmware that sits somewhere between the calculator's CPU and the actual glass. More information about the screen found in the TI-84+CSE is found here . Replacing that sort of thing is out of the question. It's generally assumed that all our programs use custom software designed to interact as directly as possible with the screen. The LCD is just much too slow to do it any other way.

Or rather, it's not that the LCD itself is slow. It's actually quite fast (as there's no need to delay between in/out), but the problem stems from three facts:
(1) The screen is a 16-bit device while the calc's CPU is 8-bit, so any and all communications require two separate read/write cycles.
(2) Every pixel must be addressed individually in each write, as opposed to groups of 8 per write in the context of monochrome.
(3) Related to the first two, there's no hardware acceleration of any type, including memory-mapping, which is often taken for granted.

Trying to update just the screen area required for the Game Boy screen alone requires 1/29th of the total CPU's time, and that's not even considering any logic whatsoever, not even any actual update logic. It's the single greatest bottleneck on the TI-84+CSE with respect to writing any decent program, and everything has to be coded around it.

35
TI-BASIC / Re: Collision Detection
« on: September 18, 2015, 05:38:00 pm »
You'd need string concatenation to manually piece together a string to its final form. Its syntax in TI-BASIC is very much like addition:
Code: [Select]
Str1+Str2->Str3
So long as all objects in the end are strings, you can do something like this:
Code: [Select]
Str2+sub(Str1,1+(16*B)+A,1)->Str2
All string variables have to exist if you're concatenating them. If you need to start with an empty string:
Code: [Select]
""->Str2
Strings can also be used in conditionals as direct comparisons. It tells you whether or not the two strings are identical.
Code: [Select]
If sub(Str2,1+(16*B)+A,1)="1"
## run code whatever chr at A,B is 1
Since these comparisons are being done on strings, it doesn't need to be "1".

Now, to display everything all at once, we're going to take advantage of a particular behavior of the Output() command. If the current string goes past the end of the line, it wraps to the start of the next line. You can use this to write the entire string out to the screen all at once, and it'll completely fill the screen so long as the string is exactly the size of the screen and no more (otherwise you'll end up scrolling).
Code: [Select]
Output(1,1,Str2

Hope this helps.


36
TI-BASIC / Re: Collision Detection
« on: September 17, 2015, 09:32:53 am »
Instead of a matrix, you can use strings to store map and collision data. It's just a little extra math to convert an X and Y coordinate to something you can use to look up things in the string (usually: (Y*width)+X).

For more info, try looking here.

37
Changes and additions, in order of appearance:

* Revised character status summary, also now able to display status effects
* Status effects show up on status menu top area
* Consumable item use and context-sensitive character selection
* Equip from inventory menu
* Resistance indicators in status menu (and that the logic works)
* Paging through equipment information
* Tossing items and attempting to toss items you can't part with



Todo:

* Get equipping logic so you can't do things like equip four swords
* Make magic functional
* Probably improve equipping starting from Equip rather than inventory.
* Start planning a cutscene script system
* Maybe think about the battle system
EDIT, note for self: * Put in additional weapon type and update all equipment stats

38
TI Z80 / Re: Curse of the Minotaur[TI-BASIC]
« on: August 30, 2015, 11:53:57 am »
Updated shop mockup. Also finished a new font shown off here:


I feel that I must mention that (the more recent versions of) CaDan had a custom font routine that supported kerning , which would be perfect for what you're doing (unless your character set has more than 64). If you want, I could extract that routine and make it a standalone.

39
Quick question, can armour be weak to certain elements? So basically negative resist?
Indeed, it can. It indicates that by showing a '0' under the element instead of a '+'

EDIT: This is no longer true. Some discussion on IRC later, and it was decided that weakness is denoted as '-' and a no-effect as '.'

40
For the past week or two (or three???), I've been hammering out additional details about the inventory menu, along with rearranging pieces of the project so I'll have enough space on page 0 to put all of this and more.

Equipment now has additional properties, such as elemental resistances, weaknesses, and attack. The confirm prompt in the shop is being reused to show item details in the inventory menu, and that confirm prompt is being upgraded to show off this information.

The screenshot below is not fully representative of what the final interface will be like. The confirm prompt is supposed to be paged, but I haven't gotten that far yet, so for now it just shows equipment properties. In the future, you'll be able to push up/down to cycle through equipment information.



If you've noticed, weapons show an "ATTACK" string, while non-weapons show a "RESIST" string. This is because weapons are not allowed to have a resistance, and thus, have no need to show a RESIST alongside it. Likewise, armor/accessories are not allowed to have an attack affinity (not even shields) so they have no need to show an ATTACK.

Not shown: Some equipment, when used as an item in battle (Final Fantasy (1) style), can unleash spells for free. Unlike FF1, this will be listed on the 3rd page. Also, the game has eight affinities total, but only five are shown. It's up to the player to figure out what those are and what equipment has them, either via experimentation, or by reading the manual.

41
It's moving so fast the water looks gray xD

Anyhow, looking awesome as usual ^^
I suppose it does, though I think it's more of an illusion provided by how the water's dithered. Kudos to Escheron/Zera for that.

So what was the point with trying the bresenham technique versus the original one? The original one seems to pan much more smoothly than the new one.

Hindsight's 20/20, I guess. None of us would really know what it would look like until it happened, and now that it did, Geekboy isn't exactly sure this is any better either. We have the old panning algorithm sitting around in case that needs to be used once more, but we're also going to keep the bresenhammy thing in case we do so we'll have something if or when this project goes full smoothscrolling. I'm convinced that it would look far better there.

42
The original non-bresenham based algorithm produced this result:

The algorithm that I called this done with, reposted here for visual comparison:

The code from the post above (code below)
Code: [Select]
    ld b,1             ;use this to check if we bresenhammed
    ld hl,(_cam_acc)
    bit 7,h            ;sign check
    jr nz,_br_xfail    ;skip if acc less than zero
    ld a,(_cam_yx+0)   ;xpos
    ld c,a
    ld a,(_end_yx+0)
    cp c
    jr z,_br_xfail     ;skip if x1==x2
    ld a,(_cam_mover+0)
    add a,c
    ld (_cam_yx+0),a
    ld de,(_cam_dy)    ;negate this in the setup code
    inc b
    add hl,de
    inc b
    jr c,_br_yfail     ;skip if acc is non-negative.
_br_xfail:
    ld a,(_cam_yx+1)   ;ypos
    ld c,a
    ld a,(_end_yx+1)
    cp c
    jr z,_br_yfail     ;skip if y1==y2
    ld a,(_cam_mover+1)
    add a,c
    ld (_cam_yx+1),a
    ld de,(_cam_dx)
    add hl,de          ;acc+dx
    inc b
_br_yfail:
    ld (_cam_acc),hl
    dec b
    ret
Produced this result:


That wasn't exactly the results I was looking for, tho since I dropped that in, I might have messed up somewhere?

When I transcribed the BASIC program into assembly, I did it to the best of my knowledge. The additional check that I added to determine if the bresenhammer did something that cycle was not of paranoia, but of an actual bugfix when the loop never exited. The loop exits when it sees that (x1,y1)==(x2,y2). I saw that no matter how many times the thing ran, it never reached y1==y2 and the sign on the accumulator was wrong so that would never get checked, so I added code that would flip that sign  to force the routine to do *something* so the external coordinate check might eventually exit.

As for the positional values themselves, they're all 8-bit unsigned with the range 0-255 (7bit map + 1bit subtile), which is part of the reason why the accumulator, and delta x/y are kept as words instead of bytes.

----
And in other news, minor work was done to slightly re-arrange the shop's buy-confirm prompt to make buying consumable items more meaningful and provide slight consistency between equipment and consumable purchases in light of that change:

43
TI Z80 / Re: Really fast 9-level grayscale
« on: August 06, 2015, 09:31:32 am »
This definitly sound interesting. I wonder however how the r register is used. It look like you manually set it up with your value (46h). However, won't that cause some part of RAM to stop refreshing and goes random ?
That only applies to DRAM. The calculator uses SRAM which maintains state without the need to refresh.

----
I just d/l'd the file and sent it to the emulator. Looks pretty nice with steady freq settings, though you can see the patterns. I know this isn't representative and I should endeavor to get it onto actual hardware ... as soon as I can pry the cable from my brother, who is using it on his PS3 controller to keep it charged.

44
Thank you very much Xeda112358, that TI-BASIC code translated to assembly works great, though I did have to add in some extra logic that would prevent the routine from locking if the accumulator is the wrong sign for the final iteration (it just flips it if the routine did nothing that cycle).

The calling routine pretty much did exactly what you did in the BASIC code. The only thing I had to change was where the "ld (_cam_acc),hl" instruction was located.

The actual algorithm, tho. This is what I got:
Code: [Select]
res did_it_bresenhamming,(iy+stateflags)
 ld hl,(_cam_acc)
 bit 7,h  ;sign check
 jr nz,_br_xfail ;skip if acc less than zero
 ld a,(_cam_yx+0) ;xpos
 ld c,a
 ld a,(_end_yx+0)
 cp c
 jr z,_br_xfail  ;skip if x1==x2
 ld a,(_cam_mover+0)
 add a,c
 ld (_cam_yx+0),a
 ld de,(_cam_dy)
 or a
 sbc hl,de ;acc-dy
 set did_it_bresenhamming,(iy+stateflags)
_br_xfail:
 bit 7,h  ;sign check
 jr z,_br_yfail ;skip if acc is non-negative.
 ld a,(_cam_yx+1) ;ypos
 ld c,a
 ld a,(_end_yx+1)
 cp c
 jr z,_br_yfail ;skip if y1==y2
 ld a,(_cam_mover+1)
 add a,c
 ld (_cam_yx+1),a
 ld de,(_cam_dx)
 add hl,de ;acc+dx
 set did_it_bresenhamming,(iy+stateflags)
_br_yfail:
 bit did_it_bresenhamming,(iy+stateflags)
 jr nz,_br_nofail
 ld a,h
 xor $80  ;flip sign bit to force next iter to do something
 ld h,a
 ld (_cam_acc),hl
; call _cmp_cur_to_end_pos
 jr nz,_iterateBresenham  ;reiterate bresenhammer.
_br_nofail:
 ld (_cam_acc),hl
 ret

The end result:


45
My latest jaunt into bresenhamming kinda failed. I got this algo from Xeda which, from what I understood, basically does this:
Code: [Select]
;NOTE: these are comments in the main source
;setup: dx = 2*(x2 - x1) , dy= 2*(y2 - y1). Use (camera_pos) for x1y1 dir.
;do:
;if (acc >= dy) && (y1 <= y2):
;  y++
;  acc = acc - dy
;  if acc < 0:
;    acc = acc + dx
;elseif (acc >= dx) && (y1 <= y2):
;  x++
;  acc = acc - dx
;  if acc < 0:
;    acc = acc + dy
The wrapper looks like this:
Code: [Select]
ld (camera_pos_goto),hl
 scf
 rl L
 scf
 rl H  ;shift in 1's for each to extend to new mapping
 ld (_end_yx),hl
 ex de,hl  ;DE=dest
 ld hl,(camera_pos)
 ld a,(camera_subxy)
 rrca  ;shift out x
 rl L  ;put X into low
 rrca  ;shift out Y
 rl H  ;put Y into low
 ld (_cam_yx),hl ;CURRENT POSITION
 push hl
   push de
     ld h,0  ;x1 = L
     ld d,h  ;x2 = E. High bytes zero.
     or a
     ex de,hl
     sbc hl,de
     add hl,hl  ;dx=2*(x2-x1)
     ld a,1
     jr nc,{+}
     call _negHL
     ld a,-1  ;if carry, moving in negative direction
+:   ld (_cam_mover+0),a
     ld (_cam_dx),hl
   pop de
 pop hl
 ld e,H
 ld l,D  ;quick exchange instead of having to do ex de,hl. set high to low.
 ld H,0
 ld d,H
 or a
 sbc hl,de
 add hl,hl ;dy=2*(y2-y1)
 ld a,1
 jr nc,{+}
 call _negHL
 ld a,-1
+:
 ld (_cam_mover+1),a
 ld (_cam_dy),hl
 ld hl,0
 ld (_cam_acc),hl
-:
 call _iterateBresenham
 call key_input_mapper._test_variable_delay
 ld hl,(_cam_yx)
 push hl
   xor a
   rr h
   rla
   rr L
   rla
   ld (camera_pos),hl
   ld (camera_subxy),a
   call showMapFrameRoutine
 pop hl
 ld de,(_end_yx)
 or a
 sbc hl,de
 jr nz,{-}
 ret
Note: delta x and y are always positive. The increment/decrement is kept in _cam_mover high and low bytes (y an x respectively)

The actual implementation is as thus:
Code: [Select]
_iterateBresenham:
 ld hl,(_cam_acc)
 ld de,(_cam_dx) ;handle (acc >=dy) condition
 push hl
   or a
   sbc hl,de  ;carry if condition doesn't hold up
 pop hl
 jr c,_iBr_skip_to_elseif
 push hl
   ld hl,(_cam_yx)
   ld a,(_end_yx+1)
   sub H      ;handle (y2 >= y1). Carry if condition doesn't hold.
 pop hl
 jr c,_iBr_skip_to_elseif
 push hl
   ld hl,_cam_yx+1
   ld a,(_cam_mover+1)
   add a,(hl)
   ld (hl),a  ;y++ (or y-- if running negative y)
 pop hl
 ld de,(_cam_dy)
 or a
 sbc hl,de  ;acc = acc-dy
 jr nc,_iBr_collect
;if made it here, run if acc < 0
 ld de,(_cam_dx)
 add hl,de
 jr _iBr_collect
_iBr_skip_to_elseif:
 push hl
   ld hl,(_cam_yx)
   ld a,(_end_yx+0)
   sub L      ;handle (x2 >= x1). Carry if condition doesn't hold.
 pop hl
 jr c,_iBr_collect
 push hl
   ld hl,_cam_yx+0
   ld a,(_cam_mover+0)
   add a,(hl)
   ld (hl),a  ;x++ (or x-- if running negative x)
 pop hl
 ld de,(_cam_dx)
 or a
 sbc hl,de  ;acc = acc-dx
 jr nc,_iBr_collect
;if made it here, run if acc < 0
 ld de,(_cam_dy)
 add hl,de
_iBr_collect:
 ld (_cam_acc),hl
 ret

I was told that the implementation is supposed to get me a line going from point A to point B. What I actually get is a straight line going down, then a straight line going right. The loop never terminates since the algo doesn't advance to the final x,y coordinate (I examined it being just 1 off).




Pages: 1 2 [3] 4 5 ... 52