Author Topic: The Quest RPG: Programming progress  (Read 7498 times)

0 Members and 1 Guest are viewing this topic.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: The Quest RPG: Programming progress
« Reply #30 on: December 20, 2011, 02:02:52 pm »
Try to replace
:...random code...
:[0101010101010101010110101010101010101010101010101010101010101010101101010101010101→K
:...random code...
:[0202020202020202020220202020202020202020202020202020202020202020202202020202020202→K

with
:[0101010101010101010110101010101010101010101010101010101010101010101101010101010101→GDB1
:[0202020202020202020220202020202020202020202020202020202020202020202202020202020202→GDB2
:...random code...
:GDB1→K
:...random code...
:GDB2→K

I recommend to backup before (in case that doesn't arrange anything) if you want to try.

edit: I added colors so you see what replaces what, and what is added
« Last Edit: December 20, 2011, 02:05:40 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: The Quest RPG: Programming progress
« Reply #31 on: December 20, 2011, 02:11:22 pm »
But that wouldn't prevent that I have to re-type the hole map instead of just changing one byte in ram.

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: The Quest RPG: Programming progress
« Reply #32 on: December 20, 2011, 02:16:09 pm »
No, the problem (I think) is that you can't (I think) do
[...]→K
[...]→K

I know you can't do
[...]→GDB1
[...]→GDB1

But with K, I don't know. So I thought your problem could come from that.


And with my "solution", once you made the GDB2→K, it is the same as having done
:[0202020202020202020220202020202020202020202020202020202020202020202202020202020202→K
And then you can do 51→{K+20}
« Last Edit: December 20, 2011, 02:16:17 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: The Quest RPG: Programming progress
« Reply #33 on: December 20, 2011, 02:21:33 pm »
I don't really get what you mean....sorry :/

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: The Quest RPG: Programming progress
« Reply #34 on: December 20, 2011, 02:50:39 pm »
:P too much "I think"s ?

You can't do
[hex]→GDB1
[hex]→GDB1


Now the question is, can you do
[hex]→K
[hex]→K


Because this is exactly what you do.

So if you can't, I proposed
[hex]→GDB1
[hex]→GDB2
...
GDB1→K
...
GDB2→K
« Last Edit: December 20, 2011, 02:50:53 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: The Quest RPG: Programming progress
« Reply #35 on: December 20, 2011, 03:28:09 pm »
and then I change GDB1 etc. ? I'll try that, but I can't until tomorrow, still have a lot of other stuff to do :/

EDIT: WHait a sec, that wouldn't do it as I sometimes still need the original map........ I think I really don't understand what you mean, sorry. If you gave me your email I could send you all the files and you could try it out. :D
« Last Edit: December 20, 2011, 03:29:43 pm by Sorunome »

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: The Quest RPG: Programming progress
« Reply #36 on: December 21, 2011, 03:51:59 am »
GDB1 is a static pointer (a value that can't change)
K is a variable (a value that can change)

Now the problem is that hex data must be stored to a pointer. I even want to say "stored at a pointer" so we understand more that the pointer becomes untouchable (not modifiable). This is why you can't store data at a pointer then store data again at the same pointer. You can't do
[11]->GDB1
[22]->GDB1

But in your prog, what you do is not storing twice at a pointer but storing twice at a variable, and I don't know if that is doable. This is why I proposed to store the first data at GDB1 and the second one at GDB2. And when you need the first one, you do GDB1->K . And when you need the second one, you do GDB2->K.

and then you can do 51->{K+20} ;)


EDIT: Wait a sec, that wouldn't do it as I sometimes still need the original map
??? So every change must be undoable ?
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: The Quest RPG: Programming progress
« Reply #37 on: December 21, 2011, 06:15:53 am »
This looks great!

The reason your original code didn't work is because you compiled it to an app.  This means that all data in your program is read-only since the program is put in flash rom.  Now that said, you can still keep your program as an app, but you have to manipulate your levels in ram.

You were on the right track before when you did "Copy(K,L1,714)" to put the level data in ram then make changes like "5->{L1+20}" for instance.  The last statement where you copy it back to rom is not going to work though.  Instead, use "L1" as the pointer when you render the graphics instead of K since L1 holds the correct data with the correct modifications.  If you need L1 for other things though or you need more space than L1 can possibly provide, you can create an appvar in ram any size you want and use that pointer instead.

What Hayleia is talking about is that its generally a good idea to store data to static pointers instead of variables because the code optimizes better and uses less memory.

Also I saw on your Cemetech post that you had Dispgraphr in a loop with getkey.  If you want a better quality grayscale, you should not use the super slow "getkey" command.  Also you should turn interrupts off.  Using the direct getkey(#) is recommended instead.  This gives you consistant timing between frames.  You might even need to add some more pause back in.  I know on hardware the 4 level grayscale is almost completely out of sync if constantly updating unless a small pause is added.
« Last Edit: December 21, 2011, 06:18:05 am by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: The Quest RPG: Programming progress
« Reply #38 on: December 21, 2011, 09:27:03 am »
Ok, thanks for your help,
so if I understood it correctly greyscale works out better if I put a pause in?

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: The Quest RPG: Programming progress
« Reply #39 on: January 06, 2012, 11:05:33 pm »
a correctly timed pause. See, the actual lcd refreshes at 60 FPS, so you want to match that. Any faster and you miss some frames being shown, any slower and you show the same frame twice, both of which cause flickering.

Also, the front sprite looks exactly like the one from the tilemap example in BBC Basic. Is that where you got it? I could see it ending up looking the same by coincidence, though, since it's only 8x8. :P

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: The Quest RPG: Programming progress
« Reply #40 on: January 07, 2012, 02:06:04 am »
Yeah, thats where i got it, but i still have to make one facing the otjer direcions than down :P

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: The Quest RPG: Programming progress
« Reply #41 on: July 03, 2012, 03:09:00 pm »
bump.

I randomly saw this topic in the board, and it looks awesome! Any progress/plans on finishing it?

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: The Quest RPG: Programming progress
« Reply #42 on: July 03, 2012, 03:21:14 pm »
No, sorry, it's dead. If you'd like to continue I could send you the files :D

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!