Author Topic: Metroid Chozo Mission  (Read 92130 times)

0 Members and 1 Guest are viewing this topic.

Offline Ti-DkS

  • Project Author
  • LV4 Regular (Next: 200)
  • ****
  • Posts: 143
  • Rating: +21/-1
  • In retro, we trust !
    • View Profile
Re: Metroid Chozo Mission
« Reply #255 on: February 17, 2011, 04:21:36 pm »
Okay... I think I really have a problem of optimization with my tilemapper  :banghead: ... Does anyone knows a very fast and optimized 16x16 tiles grayscaled tilemapper (4lvl will be the best !) ? Or maybe there are optimizations remaining on my own tilemapper :) Here is the code :
Code: [Select]
.DRAWING
ClrDraw
StorePic
.BKG
conj(Pic1BK,L3,768)                                       // back-buffered background
conj(Pic2BK,L6,768)                                       // buffered background
G^16→F
V^16→U
For(B,0,4                                                     // screen height
For(A,0,6                                                     // screen width
{G/16+B*O+(V/16)+A+{97+L4}r+GDB0}→C        // the number of the tile to display
If C≠0
.BLOCK1                                                      // first part of the 16x16 tile
Pt-Off(A*16-U,B*16-F,C*32+Pic0
Pt-Off(A*16-U,B*16-F,C*32+Pic0)r
.BLOCK2                                                     // second part of the 16x16 tile
Pt-Off(A*16+8-U,B*16-F,C*32+Pic0+8
Pt-Off(A*16+8-U,B*16-F,C*32+Pic0+8)r
.BLOCK3                                                     // third part of the 16x16 tile
Pt-Off(A*16-U,B*16+8-F,C*32+Pic0+16
Pt-Off(A*16-U,B*16+8-F,C*32+Pic0+16)r
.BLOCK4                                                    // last part of the 16x16 tile
Pt-Off(A*16+8-U,B*16+8-F,C*32+Pic0+24
Pt-Off(A*16+8-U,B*16+8-F,C*32+Pic0+24)r
End
End
End

.HUD
0→L
For(I,0,11)
Pt-Off(I*8,0,Pic3HD+L
Pt-Off(I*8,0,Pic4HD+L)r
L+8→L
End
« Last Edit: February 18, 2011, 04:10:02 pm by Ti-DkS »

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Metroid Chozo Mission
« Reply #256 on: February 19, 2011, 03:09:06 am »
this should do the exact same thing a bit faster. some reworking of your code structure in general would likely give you even more speed, though.
make sure you back up your current version before testing this out, in case i did something horribly wrong =D.

Code: [Select]
//variables Q-V are used as temp vars. if you need their values to be preserved for some other part of your code just reassign them to other vars/spots
.DRAWING
ClrDraw
StorePic
.BKG
conj(Pic1BK,L3,768)                                       // back-buffered background
conj(Pic2BK,L6,768)                                       // buffered background
G^16→S
V^16→T
V/16+{97+L4}r+GDB0→Q
0→BRepeat0
G/16+B*O+Q→R
B*16-S→U
0→ARepeat0
If {R+A}
A*16-T→V
{R+A}*32+Pic0→C
.BLOCK1                                                      // first part of the 16x16 tile
Pt-Off(V,U,C
Pt-Off(V,U,C)r
.BLOCK2                                                     // second part of the 16x16 tile
Pt-Off(V+8,U,C+8
Pt-Off(V+8,U,C+8)r
.BLOCK3                                                     // third part of the 16x16 tile
Pt-Off(V,U+8,C+16
Pt-Off(V,U+8,C+16)r
.BLOCK4                                                    // last part of the 16x16 tile
Pt-Off(V+8,U+8,C+24
Pt-Off(V+8,U+8,C+24)r
End
End!If A+1→A-7
End!If B+1→B-5

.HUD
0→L
For(I,0,11)
Pt-Off(I*8,0,Pic3HD+L
Pt-Off(I*8,0,Pic4HD+L)r
L+8→L
End
« Last Edit: February 19, 2011, 07:26:02 pm by shmibs »

Offline Ti-DkS

  • Project Author
  • LV4 Regular (Next: 200)
  • ****
  • Posts: 143
  • Rating: +21/-1
  • In retro, we trust !
    • View Profile
Re: Metroid Chozo Mission
« Reply #257 on: February 19, 2011, 06:30:40 am »
Thanks ! But it seems don't working : the app freezes :( I think there is an infinite loop in your code and I tried many things to correct that but that still don't working... Do you have an idea ?

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Metroid Chozo Mission
« Reply #258 on: February 19, 2011, 07:25:30 pm »
sorry about that :P
i realised what i screwed up about 15 minutes after my father got on, meaning there was no way i could do anything about it until now. this actually *should* work. just make sure that none of the temp vars i use are over-writing values you need somewhere else, and, if so, reassign them. good luck.

post above edited.

Offline Ti-DkS

  • Project Author
  • LV4 Regular (Next: 200)
  • ****
  • Posts: 143
  • Rating: +21/-1
  • In retro, we trust !
    • View Profile
Re: Metroid Chozo Mission
« Reply #259 on: March 01, 2011, 04:47:23 pm »
Thanks a lot for your help !! I'll see that later ;D

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Metroid Chozo Mission
« Reply #260 on: March 02, 2011, 02:27:20 am »
Good luck Ti-DkS. I hope you don't give up on this!

Offline Ti-DkS

  • Project Author
  • LV4 Regular (Next: 200)
  • ****
  • Posts: 143
  • Rating: +21/-1
  • In retro, we trust !
    • View Profile
Re: Metroid Chozo Mission
« Reply #261 on: March 07, 2011, 09:35:13 am »
Don't worry, I'm still working on that :)
For those who want to see what I'm doing now, screenie just below !
And a not-so-secret game I worked on during my few free time ;)

... and I also have a question : I read some stuff about interrupts and I want to know if they are stopped or if they crash when leaving the app... It would be very interesting if it was possible to schedule background tasks on the calculator executing normally the Ti-OS ???
« Last Edit: March 07, 2011, 09:51:52 am by Ti-DkS »

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Metroid Chozo Mission
« Reply #262 on: March 07, 2011, 10:10:49 am »
Interrupts are kept when you leave the app, although you will almost certainly crash your calc very badly unless you're extremely careful with them. The OS often doesn't play nice with multiple interrupts.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline jmaster797

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 101
  • Rating: +7/-0
    • View Profile
    • Codemaster Gaming
Re: Metroid Chozo Mission
« Reply #263 on: March 07, 2011, 11:01:51 am »
This game looks incredible! Keep up the great work.
<a href="http://www.ticalc.org/archives/files/authors/98/9811.html"><img src="http://codemastergaming.webs.com/images/ticalcbar.gif" /></a>
<a href="http://www.omnimaga.org/index.php?"><img src="http://codemastergaming.webs.com/images/omnimagabar.gif" /></a>

<u>Current Projects:</u>

1. <a href="http://www.omnimaga.org/index.php?topic=1226.0">Monopoly v3.0</a>: 94% (Fixing Errors, Working on Property Management)

2. <a href="http://www.omnimaga.org/index.php?topic=1601.0">Texas Hold'em v1.0</a>: 60% (Project Halted to Focus on Monopoly)

Offline Ti-DkS

  • Project Author
  • LV4 Regular (Next: 200)
  • ****
  • Posts: 143
  • Rating: +21/-1
  • In retro, we trust !
    • View Profile
Re: Metroid Chozo Mission
« Reply #264 on: March 08, 2011, 12:08:16 pm »
@Qwerty.55 : Okay ;) I just wanted to know if it was possible, I don't want to try now else there are 99.9% possibilities I crash my calc :D

@jmaster797 : Thanks a lot ;D I try to work the most I can !
« Last Edit: March 08, 2011, 12:09:15 pm by Ti-DkS »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Metroid Chozo Mission
« Reply #265 on: March 08, 2011, 12:13:59 pm »
Nice, I'm glad this is still progressing Ti-DkS. I also like the Metroid sprite. :D

In this game, will Samus spin when jumping diagonally like in other Metroid games by the way? She usually jumped slightly slower but farther (and you didn't have to hold down an arrow key to make her continue going in the same direction, although it was harder to jump vertically that way).

Also is your other screenshot a Sim City clone? It looks pretty great. :D

Offline Ti-DkS

  • Project Author
  • LV4 Regular (Next: 200)
  • ****
  • Posts: 143
  • Rating: +21/-1
  • In retro, we trust !
    • View Profile
Re: Metroid Chozo Mission
« Reply #266 on: March 11, 2011, 12:33:19 pm »
Thank you alot DJ ;D Yes it's foreseen that Samus spins when jumping diagonally but I'va not had the time to do that :)
And the other screenie is one of a Advance Wars clone test !

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Metroid Chozo Mission
« Reply #267 on: March 11, 2011, 01:02:11 pm »
Ti-DkS, that's looks awesome!

I know you've been told this before >1 time, but a walking animation would make this pure, pure, pure epic! It would completely change the way the game looks. Hope you can do that :D

Ashbad

  • Guest
Re: Metroid Chozo Mission
« Reply #268 on: March 11, 2011, 01:37:32 pm »
yeah, a walking animation would be nice, but also better gravity to fall by more than 1 pixel per frame.

other than that, sheerly awesome :D  keep it up!

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Metroid Chozo Mission
« Reply #269 on: March 11, 2011, 01:38:44 pm »
yeah, a walking animation would be nice, but also better gravity to fall by more than 1 pixel per frame.

other than that, sheerly awesome :D  keep it up!

I have to agree with you on the gravity, it sometimes looks like Samus is floating, but he has been asked that and I think he said it was impossible to change gravity in the engine. Let's hope I am mistaken, though.