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

Pages: 1 ... 12 13 [14] 15 16 ... 71
196
Axe / Re: [Axe] Plane deformations are fun
« on: January 28, 2014, 06:40:29 pm »
This is my attempt at converting it to assembly:
Code: [Select]
Asm(214093E50E08AF2A02805E160021(°Texture)1946CBC7CB402802CB872A028023220280CB270D20E1CB1FE17723E5114096B7ED5220D0E1)I have dissasembled it to see if I converted it to HEX correctly, and it was, but what I don't know is if my assembly code is fully correct, so backup your data just in case.

EDIT: the more readable source code:
Code: [Select]
Render:
  ld hl, plotsScreen
  push hl

RenderLoop:
  ld c, 8
  xor a
ByteLoop:
  ld hl, ($8002)
  ld e, (hl)
  ld d, 0
  ld hl, texture
  add hl, de
  ld b, (hl)
  set 0, a
  bit 0, b
  jr z, TexelEnd
  res 0, a
TexelEnd:
  ld hl, ($8002)
  inc hl
  ld ($8002), hl
  sla a ;optimization: add a, a
  dec c
  jr nz, ByteLoop
  rr a
  pop hl
  ld (hl), a
  inc hl
  push hl
  ld de, Plotsscreen+768
  or a
  sbc hl, de
  jr nz, RenderLoop
  pop hl
  ret

#comment
HEX:
214093E5 -> 4 bytes
RenderLoop:
0E08AF -> 3 bytes
ByteLoop:
2A02805E1600 -> 6 bytes
21(°Texture) -> 3 bytes ld hl, texture
1946CBC7CB40 -> 6 bytes
2802 -> 2 bytes jr z, TexelEnd
CB87 -> 2 bytes
TexelEnd:
2A028023220280CB270D -> 10 bytes
20E1 -> 2 bytes jr nz, ByteLoop
CB1FE17723E5114096B7ED52 -> 12 bytes
20D0 -> 2 bytes jr nz, renderLoop
E1 -> 1 byte

TOTAL COMMAND:
Asm(214093E50E08AF2A02805E160021(°Texture)1946CBC7CB402802CB872A028023220280CB270D20E1CB1FE17723E5114096B7ED5220D0E1)
#endcomment

197
Axe / Re: [Axe] Plane deformations are fun
« on: January 28, 2014, 04:59:57 pm »
You can optimize it by using only 1 loop:
Code: [Select]
:for(A,0,6144)
:plotsScreen[A] = texture[tlut[A]]
:End

198
Axe / Re: [Axe] Plane deformations are fun
« on: January 28, 2014, 04:07:11 pm »
Indeed. And neither is per-pixel drawing. But for assembly, bit unpacking runs at almost the same speed as reading unpacked bits. And with assembly, the usage of variables can be avoided as well, which should also give a speed boost when doing really repetitive stuff.

Would you prefer it if I convert my code to HEX? That may make it easier to test for you.

199
Axe / Re: [Axe] Plane deformations are fun
« on: January 28, 2014, 03:51:40 pm »
I just saw in the C source code that you seem to be storing the texture as an image with one byte for every pixel(64 bytes)?
My asm code expects a pointer to a sprite with 1 bit per pixel (8 bytes).

200
Axe / Re: [Axe] Plane deformations are fun
« on: January 28, 2014, 03:25:46 pm »
I'm sure you can make it at least twice faster with ASM, because if I had to make the drawing code in C it would be (direct translation from Axe) :
Code: [Select]
for(y = 0; y < 64; y++)
  for(x = 0; x < 96; x++)
    plotSScreen[y * 96 + x] = texture[ (ylut[y * 96 + x] & 7) * 8 + xlut[y * 96 + x] ];

Lemme get on my PC and I'll attach the source.

I hope this code is slightely faster, but I haven't been able to test it, so I'm not sure if it even works.

Code: [Select]
;°xlut -> A
;°ylut -> B

Render:
  ld hl, plotsScreen
  push hl

RenderLoop:
  ld c, 8
  xor a
ByteLoop:
  ld hl, (A)
  ld b, (hl)
  ld hl, (B)
  ld e, (hl)
  ld d, 0
  ld hl, texture
  add hl, de
  ld d, (hl)
  inc b
TexelLoop:
  sra d
  djnz TexelLoop
  set 0, a
  jr c, TexelEnd
  res 0, a
TexelEnd:
  ld hl, (A)
  inc hl
  ld (A), hl
  ld hl, (B)
  inc hl
  ld (B), hl
  sla a
  dec c
  jr nz, ByteLoop
  rr a
  pop hl
  ld (hl), a
  inc hl
  push hl
  ld de, Plotsscreen+768
  or a
  sbc hl, de
  jr z, RenderLoop
  pop hl
  ret

201
TI Z80 / Re: Racing game (revived)
« on: January 24, 2014, 11:35:13 am »
Wow I haven't played this in a while. I remember the controls were quite akward but I didn't remember line clipping being so weird. I'm sure Ben_g would be able to do much better, especially with every doc available compared to back in 1999-2000. GlassCars was really the first 3D racing game for calcs I think, though.
The line clipping is already much better (thank TheMachine for that), and it seems that - while the glasscars engine does support a bit of elevation - glasscars doesn't support full 3D tracks with bridges etc. (But I've never played it since my calc can't run it, so correct me if I'm wrong) And I'm now working a lot on a new format that allows full 3D tracks.
The controls will probably be similar to the previous version (but with acceleration/decelleration). And I also have some plans to make it a bit more fun, but those remain secret for now because I don't know yet if the game will run at a good enough speed to implement them.

202
I'm not completely sure what you want. Do you want to be able to edit them in a text format on multiple lines (meaning that "1/2" appears as 1/2), or do you want to edit them in multiple lines in a mathprint-like mode (meaning that "1/2" appears as )? If you want the former, many calculators will be able to do that, but I don't really know much model names. The 83+/34+ series do that, though, and iirc the 83/83+ calculators don't have an other input mode. Your TI-89 may be capable of this as well.
If you want multiple lines in a mathprint-like mode, then I don't know a single calculator that lets you do that, but someone else might know one.

203
Forum Arcade Games / Re: Final Omni Arcade highscores (top 3)
« on: January 23, 2014, 08:01:25 am »
Wow I actually accidentally a high score once :o

RIP arcade, maybe we should go make games ourselves now >.>
I use to have highscores.

Making our own wouldn't be a terrible idea, but to be honest, other sites have way better arcades that should be used ;) (armorgames anyone?). If we have some cool team projects that can be embedded though that would be great though.
What would be cool is if we had an arcade that supported, HTML5, Flash and Java games, so if anyone here use those languages, then maybe they could remake some calc classics and Omni could get a small custom arcade again, and that arcade could maybe bring back the biggest classics we had in the old arcade.

However, there's still the issue about how to block cheating 100% successfully and how long it would take to make such arcade. I don't think Omni upgrade should focus on a new arcade for the time being, so that it won't delay the upgrade.
If that would be possible, then I could port some calculator classics to java for the arcade, and I'm sure some other members with experience in computer programming would do the same.

For the cheating: I think it's hard to completely block it. It's always possible to decompile the game and just make it submit a really high score, unless the games are run server-side, but that would demand a lot of server resources.

204
Forum Arcade Games / Re: Final Omni Arcade highscores (top 3)
« on: January 22, 2014, 04:41:46 pm »
Too bad it had to go... :(

But at least I have a final highscore  ;D

205
TI-Nspire / Re: nGL - a fast (enough) 3D engine for the nspire
« on: January 21, 2014, 04:46:04 pm »
Minecraft with raycasting would probably be way to slow. It would require a ray for every pixel on the screen, which would be slow. IIRC Minecraft 4K uses a technique similar to raycasting to render it's world, and it is very limited (world size of 64x64x64) and runs at a decreased resolution (856x480 pixels, but at half resolution) on a computer.
You can always try, but as polygon-based graphics and not voxel-based graphics are the current standard for 3D computer graphics, I don't think a raycasting-based voxel renderer would be feasable.

You may be able to 'cheat' a bit with polygons tough, as when rendering blocks all the faces are parallel.

206
TI Calculators / Re: Is it possible to run a TI-84+ OS on a TI-84+CSE?
« on: January 17, 2014, 11:00:20 am »
okay FINE. x.x
no emulate!  <_<
my original question was this:
can i run a ti84 os on a ti84 +c se directly? :hyper:

[can someone please scratch my back?!?!?]
That would require a modified OS updating all of the graphics of the OS. This is essentially what the CSE OSes are ;)
Added to that: Once you have a modded 84+ OS that works on the CSE, It will only be able to run BASIC programs correctly, and it will still run slower than the 84+ because it has to send more data to the screen. Assembly, axe, hybrid basic and probably also grammmar programs will still display garbage because they use their own routines to display stuff.

207
TI Z80 / Re: Racing game (revived)
« on: January 17, 2014, 10:43:36 am »
I hope you can make it better and faster graphically than GlassCars on ticalc.org.
I'll try to make it as good as I can, but I don't know how good and fast GlassCars is because it doesn't seem to work on an 84+ and I can't find an annimated screenshot.

208
TI Z80 / Re: 3D racing game (revived)
« on: January 16, 2014, 03:46:12 pm »
I know this is a necropost, but I just wanted to let you guys know that I'm working on this again.
It's a complete recode, and now it uses axe and GLib, instead of assembly and my own engine. Because of this reason, it is now again in a very early stage, but I'll give you guys a screenshot anyway:

As you see in the screenshot, I've let out the diagonal lines and used simpeler, clearer models. And I think it actually looks better that way. And the models are smaller and faster this way too.

There is still a lot of work to do, but the speed is good (20fps at 6MHz, the previous version ran at 18fps at 15MHz in it's final stage), which should enable me to put some more stuff.

Spoiler For Some technical details:
The visible area supported by the current map renderer is 16 by 16 tiles, and tiles are 32 by 32 units. This makes the visible area 512 units large, or (since the tilemap will be centered around the player to prevent overflows) 256 units in every direction. In the screenshots, the road used there is 16 units wide.
The tilemap contains models as tiles, and each tile can be elevated between 0 and 255 units (based on a heightmap). Overlapping roads will be done by having a special tile that represents a bridge.
At the start (and in the future: when the tilemap is moved/updated), the tilemap is converted to one big model that represents the entire visible area. Because of this, models can have a different, smaller format (only 3 bytes per vertex, instead of 6) witouth slowing down the rendering. The code that generates that big model is still rather fast, and it still gets 17fps when it's generated every frame. This will be slower in future versions, though, but it also won't run evrey frame.
The rest is still only planned, and thus lickely to change.

209
TI Calculators / Is it possible to run a TI-84+ OS on a TI-84+CSE?
« on: January 15, 2014, 10:22:02 am »
A virtual machine can only emulate devices with lower specs than the machine you run it on. The ti-84+CSE has the same specs as the 84+ (apart from the larger archieve), so it won't be able to run the normal 84+ OS.

210
Web Programming and Design / Re: What if YouTube worked on the 83+?
« on: January 15, 2014, 08:33:46 am »
It depends on the video. Sometimes, it seems to work almost instant, for other videos you need to wait a while.

BTW: I wonder if something like this would be possible on an 84+ using GCN (when you also connect a computer to the same network to do most of the calculations)

Pages: 1 ... 12 13 [14] 15 16 ... 71