dMZX Forums: Memory Problems - dMZX Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Memory Problems Good Advice Needed

#1 User is offline   Mr. Apol 

  • medica mechanica
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,206
  • Joined: 12-September 01
  • Gender:Male
  • Location:alefgard

Posted 07 March 2002 - 07:26 PM

In my game, I'm using a complicated rpg battle system.  It's almost done, but there's one problem:  not enough memory.  I have about 4% memory left, and a little left to do.  

So, any advice on freeing up some extra memory?

I'm already going into some of the robots and using dynamic naming and counters.  That should help a little.  Any other tips?
0

#2 User is offline   Xeirxes 

  • guitars still work
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,649
  • Joined: 05-November 01
  • Gender:Male
  • Location:Gardnerville, Nevada

Posted 07 March 2002 - 07:30 PM

Use the least robots you can to accomplish it. Maybe it will work better if you put it all in one robot.
Xeirxes

<Exophase> Way to be drunk on NOTHING Xeirxes
0

#3 User is offline   Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,960
  • Joined: 12-October 00
  • Gender:Male

Posted 07 March 2002 - 07:38 PM

Who said you had to stick with one board? =P ?Break it up into two boards. ?The first board will involve the beginning calculations (with all of the dex, HP, MP, str, etc. considerations put into any move) and the second board will deal with all of the in-battle junk (such as display/flash, actually modifying stats and the after-affects of some conditions like poison, paralysis or on fire ^^) then revert to the first board. ?The tricky thing is making the transition seamless.
angelic stream - shed sanguine - ill-adapt - avis - para/lyser - renaissance - dead tangent - phosphene blur - birth breeds death - ________ - painted glass - lagniappe

<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111
0

#4 User is offline   Revvy 

  • Jeez guys, there's no need to be narky.
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,520
  • Joined: 05-March 01
  • Gender:Male
  • Location:Ontario, Canada

Posted 07 March 2002 - 07:47 PM

I've got something like that to.  I'm down to 48% left of a battle engine I'm working on, and I've only coded two of the four players' attacks, not to mention summons, escaping and items.  Basically, use loops anywhere you can, and find ways to shorten code.
<+AFK> Bringing whisky to my mother is like irrigating a lake.

<+AFK> dormando's apathy is palpable.
* AFK palpates
<dormando> stop that

<Malwyn> undressing with revvy a little over a metre away. new definition of awkward.
0

#5 User is offline   Mr. Apol 

  • medica mechanica
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,206
  • Joined: 12-September 01
  • Gender:Male
  • Location:alefgard

Posted 07 March 2002 - 08:03 PM

Terryn, on Mar. 07 2002,19:38, said:

Who said you had to stick with one board? =P ?Break it up into two boards. ?The first board will involve the beginning calculations (with all of the dex, HP, MP, str, etc. considerations put into any move) and the second board will deal with all of the in-battle junk (such as display/flash, actually modifying stats and the after-affects of some conditions like poison, paralysis or on fire ^^) then revert to the first board. ?The tricky thing is making the transition seamless.

I actually thought about that a while back.  How exactly could I go about that?
0

#6 User is offline   Mr. Apol 

  • medica mechanica
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,206
  • Joined: 12-September 01
  • Gender:Male
  • Location:alefgard

Posted 07 March 2002 - 08:05 PM

To Rev: Coolness..  I've got it all programmed, with overlay text boxes, animations, and all the good stuff.  All I've got to do is program the 4th character's spells, and the two minor abilities that the 2nd and 3rd chars have.  All in all it's almost done.
0

#7 User is offline   Exophase 

  • Laughing on the inside.
  • Group: DigiStaff
  • Posts: 7,155
  • Joined: 23-October 00
  • Gender:Male
  • Location:Cleveland, OH

Posted 07 March 2002 - 10:52 PM

Partial char sets. Char edits use up a lot of memory. There a lot of other tricks but I don't feel like divulging without knowing anything about your engine. Gimme it and I'll tell what you can do to probably bring it down to under 50% usage.

- Exo
~ ex0 has a kickass battle engine, without it you sux0rz! without it you sux0rz! ~

"The fact that I say I've one of the best, is called honesty." -Akwende
"Megazeux is not ment to be just ASCII, it is ANSI!" - T-bone6
"I hate it when you get all exo on me." - emalkay

Exophase can what Rubi-cant.
exoware is ware ur ware is exoware
ps. not loking 4 new membrs kthx
0

#8 User is offline   Exophase 

  • Laughing on the inside.
  • Group: DigiStaff
  • Posts: 7,155
  • Joined: 23-October 00
  • Gender:Male
  • Location:Cleveland, OH

Posted 07 March 2002 - 10:53 PM

Terryn, on Mar. 08 2002,00:38, said:

Who said you had to stick with one board? =P ?Break it up into two boards. ?The first board will involve the beginning calculations (with all of the dex, HP, MP, str, etc. considerations put into any move) and the second board will deal with all of the in-battle junk (such as display/flash, actually modifying stats and the after-affects of some conditions like poison, paralysis or on fire ^^) then revert to the first board. ?The tricky thing is making the transition seamless.

I don't really see how you can break it up that way, but the overhead necessary in carrying things over in counters would easily not make it worth it. No MZX RPG battle engine spends a lot of time on calculations.... one thing that _can_ go well on other boards are specific animations, like special attacks or whatever.

- Exo
~ ex0 has a kickass battle engine, without it you sux0rz! without it you sux0rz! ~

"The fact that I say I've one of the best, is called honesty." -Akwende
"Megazeux is not ment to be just ASCII, it is ANSI!" - T-bone6
"I hate it when you get all exo on me." - emalkay

Exophase can what Rubi-cant.
exoware is ware ur ware is exoware
ps. not loking 4 new membrs kthx
0

#9 User is offline   apage43 

  • Veteran Member
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,199
  • Joined: 13-November 00
  • Gender:Male

Posted 08 March 2002 - 12:10 AM

Ive heard a little about partial charsets, How exactly would i go about making one?
0

#10 User is offline   Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,960
  • Joined: 12-October 00
  • Gender:Male

Posted 08 March 2002 - 12:19 AM

Exophase, on Mar. 07 2002,16:53, said:

Terryn, on Mar. 08 2002,00:38, said:

Who said you had to stick with one board? =P ?Break it up into two boards. ?The first board will involve the beginning calculations (with all of the dex, HP, MP, str, etc. considerations put into any move) and the second board will deal with all of the in-battle junk (such as display/flash, actually modifying stats and the after-affects of some conditions like poison, paralysis or on fire ^^) then revert to the first board. ?The tricky thing is making the transition seamless.

I don't really see how you can break it up that way, but the overhead necessary in carrying things over in counters would easily not make it worth it. No MZX RPG battle engine spends a lot of time on calculations.... one thing that _can_ go well on other boards are specific animations, like special attacks or whatever.

- Exo

This is considering that the RPG's main memory-sucker is in the graphics as opposed to the computations. ?If so, then all you need to do is Exo's method by all means.

If not then this is how you'll have to do it: Carry over is a move tag (for instance, the special move "Blank Codex" could be move #54 in the move counter, so the animation screens know which move to execute by looking at the counter smove.) ?The specific graphical work is done on the special move screens.

Your attack computations would go one one board. ?Your move's effects will be calculated before the move to the second board, so the only counters that need carrying over are the move number and the effect counters (which vary in number depending on the move's parameters (whether it saps attributes or HP or MP or changes status or a combination of all of these factors) and the number of enemies invovled (usually up to five). ?In Cresent RPG (now dead) the most convoluted attack used up to 20 counters (strength, speed, accuracy and HP drop on all enemies). ?At max there could be 84 temp counters but this was unlikely.To account for dying enemies on a single attack, either place an exception (doing 0 damage after a positive check on other enemy HP; technically, a miss) or divert the attack onto another monster (checking to see if Monster2HP is > 0 then Monster3HP, etc.)

After this, the temp counters are wiped and the other half of the computations are undertaken on the other board. After all, the str and dex and MP and such of each side is used in an entirely different way, so two sets of computations are needed (offensive comp. and defensive comp.) so splitting them up into two distinct groups depending on battle mode (and I may be refuted for this =/) makes sense.

In short it goes like this:

~Formulate attack results (with many possible individual counters)
~Put results in temp result counters
~Display your attack on separate graphics boards
~Apply temp counters to real counters on other computational board
~Wipe temp counters
~Repeat steps 1-5 with enemies' attacks on second board meant for enemy calculations.
~Do status condition rolls at end of turn.

Coding is like this:

Board 1: Main party attack comp, main party damage comp.
Board 2: Enemy party attack comp, enemy party damage comp.
Misc: Graphics and flash.

Indeed a lot of work but necessary for technically complex RPG systems.
angelic stream - shed sanguine - ill-adapt - avis - para/lyser - renaissance - dead tangent - phosphene blur - birth breeds death - ________ - painted glass - lagniappe

<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111
0

#11 User is offline   Exophase 

  • Laughing on the inside.
  • Group: DigiStaff
  • Posts: 7,155
  • Joined: 23-October 00
  • Gender:Male
  • Location:Cleveland, OH

Posted 08 March 2002 - 05:28 AM

I REALLY don't think many people are doing very complicated calculations for things. Even taking several stats into account I cannot really imagine a move taking more than a couple dozen lines at most, for calculations. And most people will probably use the same calculations for several moves.

Of course, if you want to be that complex, you can. I just don't think it's common.

- Exo
~ ex0 has a kickass battle engine, without it you sux0rz! without it you sux0rz! ~

"The fact that I say I've one of the best, is called honesty." -Akwende
"Megazeux is not ment to be just ASCII, it is ANSI!" - T-bone6
"I hate it when you get all exo on me." - emalkay

Exophase can what Rubi-cant.
exoware is ware ur ware is exoware
ps. not loking 4 new membrs kthx
0

#12 User is offline   Revvy 

  • Jeez guys, there's no need to be narky.
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,520
  • Joined: 05-March 01
  • Gender:Male
  • Location:Ontario, Canada

Posted 08 March 2002 - 01:27 PM

apage43, on Mar. 08 2002,01:10, said:

Ive heard a little about partial charsets, How exactly would i go about making one?

Yes, Exo, tell us!  Charcon won't read those char sets from Torn Creation, and I want to know how to make them!
<+AFK> Bringing whisky to my mother is like irrigating a lake.

<+AFK> dormando's apathy is palpable.
* AFK palpates
<dormando> stop that

<Malwyn> undressing with revvy a little over a metre away. new definition of awkward.
0

#13 User is offline   Exophase 

  • Laughing on the inside.
  • Group: DigiStaff
  • Posts: 7,155
  • Joined: 23-October 00
  • Gender:Male
  • Location:Cleveland, OH

Posted 08 March 2002 - 05:37 PM

You need to truncate them with something. MZX will still load them.

You can use a hex editor, or make a very simple program in any language to do it for you.

Like this very simple one I did in C a long time ago. That I'm attaching.

- Exo

Attached File(s)


~ ex0 has a kickass battle engine, without it you sux0rz! without it you sux0rz! ~

"The fact that I say I've one of the best, is called honesty." -Akwende
"Megazeux is not ment to be just ASCII, it is ANSI!" - T-bone6
"I hate it when you get all exo on me." - emalkay

Exophase can what Rubi-cant.
exoware is ware ur ware is exoware
ps. not loking 4 new membrs kthx
0

#14 User is offline   Revvy 

  • Jeez guys, there's no need to be narky.
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,520
  • Joined: 05-March 01
  • Gender:Male
  • Location:Ontario, Canada

Posted 08 March 2002 - 07:26 PM

Thanks exo.
<+AFK> Bringing whisky to my mother is like irrigating a lake.

<+AFK> dormando's apathy is palpable.
* AFK palpates
<dormando> stop that

<Malwyn> undressing with revvy a little over a metre away. new definition of awkward.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users