Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

Click here to join us on IRC (#charas on irc.freenode.net)!



  • Charas-Project »
  • Game Creation »
  • Requests »
  • Tutorials »
  • ABS coding problem
« previous next »
  • Print
Pages: [1]

Author Topic: ABS coding problem  (Read 5724 times)

Offline Roland_Deschain

  • Batman.
  • Agent
  • *
  • Posts: 892
  • I'm... BATMAN.
ABS coding problem
« on: November 17, 2008, 12:20:53 AM »
I can get the system to work properly, hits register, enemies don't kill you fast or drain health constantly, but my main problem is the health bar. I'm using a frame to set up the HUD, and using pictures for the different sections of the bar. My problem is, the game lags EXCESSIVELY if I have more than 5 pictures on screen at a time, although they all show up, it's virtually unplayable. Is there an easier way to do this with a frame as the HUD setup?
Logged

Offline Desimodontidae

  • Registered July 13, 2004, 10:41:19 AM (+1692 post counts)
  • Agent
  • *
  • Posts: 892
  • ghost host
    • perpetual massacre
Re: ABS coding problem
« Reply #1 on: November 17, 2008, 01:17:06 AM »
Simple solution, put "wait 0.0s" BEFORE EVERY "show image" command. That should take care of it. Also make sure you erase the previous pic before you put the show next pic, at least thats what works for my abs.

Edit: You don't have to do that last part, it just makes it run a little cleaner I think. But putting a wait always fixes the lag problem. I don't know why...
« Last Edit: November 17, 2008, 01:36:37 AM by Desimodontidae »
Logged
My MGS3 main character sprites

Offline DragonBlaze

  • A Wild DB Appeared!
  • Royal
  • *
  • Posts: 3,329
Re: ABS coding problem
« Reply #2 on: November 17, 2008, 04:12:52 PM »
It does that because rpg maker was programmed poorly. If you don't put the wait 0.0 seconds, rpg maker tries displaying the pictures as fast as it can, which slows down the whole program. The wait 0.0 seconds won't be noticable on the users end, but it'll prevent rpg maker from trying to display these pictures rapidly.

Another tip to reduce lag is to limit the amount of parallel process events you use. The less there are the smoother your game will run. There are ways to make an ABS with only 1 parallel process event ;) though that might be a little too over the edge.
Logged
Hell Yeah! Just recovered all my old rm2k/3 games from my 10 year old, broken laptop hard drive that had been formatted and had a new OS installed on it. Oh, and I did all of this from my phone. WIN

Offline Roland_Deschain

  • Batman.
  • Agent
  • *
  • Posts: 892
  • I'm... BATMAN.
Re: ABS coding problem
« Reply #3 on: November 17, 2008, 04:24:42 PM »
It only has 2, one for the health setup and one for the CMS teleporting.
Logged

Offline DragonBlaze

  • A Wild DB Appeared!
  • Royal
  • *
  • Posts: 3,329
Re: ABS coding problem
« Reply #4 on: November 17, 2008, 05:09:01 PM »
Quote from: Roland_Deschain on November 17, 2008, 04:24:42 PM
It only has 2, one for the health setup and one for the CMS teleporting.

Oh, so the enemy events themselves take care of all the attacking and damage stuff?
Logged
Hell Yeah! Just recovered all my old rm2k/3 games from my 10 year old, broken laptop hard drive that had been formatted and had a new OS installed on it. Oh, and I did all of this from my phone. WIN

Offline Roland_Deschain

  • Batman.
  • Agent
  • *
  • Posts: 892
  • I'm... BATMAN.
Re: ABS coding problem
« Reply #5 on: November 17, 2008, 05:43:25 PM »
Yeah. It may not be the best way to set it up but the combat works surprisingly well.
Logged

Offline DragonBlaze

  • A Wild DB Appeared!
  • Royal
  • *
  • Posts: 3,329
Re: ABS coding problem
« Reply #6 on: November 17, 2008, 09:00:06 PM »
Nah, its an okay way to set it up, the only problem with that is if you decide to modify the code in those events, you'll have to edit all of the events or start over with new ones.
Logged
Hell Yeah! Just recovered all my old rm2k/3 games from my 10 year old, broken laptop hard drive that had been formatted and had a new OS installed on it. Oh, and I did all of this from my phone. WIN

Offline Roland_Deschain

  • Batman.
  • Agent
  • *
  • Posts: 892
  • I'm... BATMAN.
Re: ABS coding problem
« Reply #7 on: November 17, 2008, 09:28:40 PM »
Well I have a template enemy set up, all I need to do in the event of an overhaul is fix it's coding, delete all the other enemies, and repaste template man everywhere, fixing graphic and variables. The bosses would ~SUCK~ to recode though.
Logged

Offline Roland_Deschain

  • Batman.
  • Agent
  • *
  • Posts: 892
  • I'm... BATMAN.
Re: ABS coding problem
« Reply #8 on: November 18, 2008, 02:06:35 AM »
Sorry to doublepost, but I need a bit more help on this topic. I can't get my pictures to show up anymore. Here's the coding I use now:


It works as far as dying goes, but the health no longer appears on the screen anymore.
Logged

Offline Desimodontidae

  • Registered July 13, 2004, 10:41:19 AM (+1692 post counts)
  • Agent
  • *
  • Posts: 892
  • ghost host
    • perpetual massacre
Re: ABS coding problem
« Reply #9 on: November 18, 2008, 02:58:18 AM »
Maybe instead of using the same 2 pics over in different places, make many pictures representing what health you would have. For example, say you make a box with your transparent color just blank and call that 0. Then put the half heart in the place where it should be, then name it .5, then make the whole heart, name it 1, etc, etc. That way you can keep the same picture number, just change the actual picuture that is show. That way you're not showing a bunch of pics, instead you're always showing 1 pic. I hope that wasn't too confusing, here is what my code looks like that is pretty much what I just described
Logged
My MGS3 main character sprites

Offline Roland_Deschain

  • Batman.
  • Agent
  • *
  • Posts: 892
  • I'm... BATMAN.
Re: ABS coding problem
« Reply #10 on: November 18, 2008, 11:34:19 AM »
Working now, thanks. And it worked with my last set of code, like displaying the pictures and all, but damage never registered. >_<
Logged

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • Tutorials »
  • ABS coding problem
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum