Numerous game-breaking bugs, anyone able to help?

Non-platform specific questions.

Numerous game-breaking bugs, anyone able to help?

Postby bspeers » Mon Aug 06, 2012 3:17 pm

I'm having a ludicrous number of game-breaking bugs, and all my attempts to fix them have been for naught. I can't even seem to track down the source of most of these problems, and don't know enough about how game-editor parses to isolate one cause over another. Is there any experienced user who would be willing to help?

I'm using the examples for "advanced platforming" from the wiki, but have made some tweaks where certain aspects wouldn't work and where I wanted specific things. For example, I wanted to add ladders that you could climb through platforms only when going down and not climb through when at the bottom touching a platform. I have tossable objects (now a ball and a rock), floaty boots, and a few other items. I have a "zelda-style" scrolling background and levels with names.

Unfortunately, here are some of the errors:

- Running animation freezes and does not play
This only started recently. Climbing and jumping work fine, but running just freezes. I am using the example from the wiki, but nothing I do will make him animate.

- Character "stutters" when standing by a ladder and attempting to climb - this is a byproduct of how I've handled ladders, but I can't figure out a way to fix it. I've tried a lot of things, none of which work.

- When scrolling in mid-air (jumping from one screen to the next), the character flies at a violent rate. The same occurs when respawning from one level to another while jumping. You just fly off screen and die a second time. I have told the game "if hdir == 2" (jumping), that you stop, but it doesn't do anything different.

-When dying in a new room immediately after a scroll, you often get stuck with the view looking toward an empty room, not the room you respawned in. I even forced it to appear where you respawn. The view flickers and then returns to the wrong room.

- For no reason I can find, the character can no longer pick up rocks unless he's picked up a ball first. The codes are independent of each other (except for specifying they can't happen at the same time), and I haven't changed the code for those two objects--and yet, I can't pick up rocks any more.

I know none of this is solvable without the code, but there are many codes (draw actor being the most used), and I'm not sure if it would be more useful to post a .ged to download, or post all my code, or if anyone would be willing to lend some advice anyway.

Any direction or suggestions will be appreciated. I will post any code upon request.

Thanks, this is a great community!

As requested, here's the source code.

First, the coding relating to animation in Draw Actor. Most of the animation requests are handled here, as per the "advanced platformer" tutorial:

Code: Select all
if (key[KEY_DOWN]==1) {
    if ( strcmp(special, "carry") != 0)  {
    if ((vdir == 1) && (ladderon == 0)) {
        vdir = 0;
        strcpy (action, "lift");
        tspeed = 0;
                                        }
 
else if ((vdir == 2) && (ladderon == 0)){
    vdir = 0;
    strcpy (action, "lift");
    tspeed=speed;
                                        }
if (ladderon == 1){
    strcpy (action, "climb");
    Ed.y += 3;
    tspeed=1;
    vdir = 1;
                  }
                                         }
                      }

    if (key[KEY_UP]==1) {
 
if ((vdir != 0) && (ladderon == 1)){
    vdir = 1;
    strcpy (action, "climb");
    Ed.y -= 3;
    tspeed=1;
 
                                   }
                    }
 
 
    if ((key[KEY_SPACE] == 1) && (vdir!= 2)) {
        ladderon = 0;
    if (gravway == 1) {
Ed.xvelocity = jump*gravity;
strcpy (action, "jump");
jump = 0;
vdir = 2;

                      }

 else  if (gravway == 2) {
Ed.xvelocity = jump*gravity*-1;
strcpy (action, "jump");
jump = 0;
vdir = 2;
                      }
 else  if (gravway == 3) {
yvelocity = gravity*jump;
strcpy (action, "jump");
jump = 0;
vdir = 2;
                      }
 else  if (gravway == 4) {
Ed.yvelocity = jump*gravity*-1;
strcpy (action, "jump");
jump = 0;
vdir = 2;
                         }
                                             }
 
if (key[KEY_LEFT]==1) {
hdir =1;
if ((vdir==0) && (ladderon == 0)) {
    tspeed*=-1;
 
                                  }
else if ((vdir==0) && (ladderon == 1)) {
    tspeed=-speed;
    ladderon = 0;
 
                                  }
else if ((vdir>0) && (ladderon == 1)) {
    tspeed=-speed;
    ladderon = 0;
 
                                  }
else if ((vdir>0) && (ladderon == 0)) {
    tspeed=-speed;
    strcpy (facing, "left");
    strcpy (action, "run");
                                      }
                      }
 

if (key[KEY_RIGHT]==1) {
hdir =0;
if ((vdir==0) && (ladderon == 0)) {
    tspeed*=1;
 
                                  }
else if ((vdir==0) && (ladderon == 1)) {
    tspeed=speed;
ladderon = 0;
 
                                  }
else if ((vdir>0) && (ladderon == 1)) {
    tspeed=speed;
    ladderon = 0;
 
                                  }
else if ((vdir>0) && (ladderon == 0)) {
    tspeed=speed;
    strcpy (facing, "right");
     strcpy (action, "run");
                                      }
                       }

sprintf(anim, "%s%s%s%s", "player", special, action, facing);
if ((vdir==1) && (tspeed!= 0)) {
    if ((xvelocity==0) && (prevdir!=hdir)) {
     ChangeAnimation ("Ed", anim, FORWARD);
                                       }
    else {
 ChangeAnimation ("Ed", anim, NO_CHANGE);
         }
                               }
else {
ChangeAnimation ("Ed", anim, STOPPED);
animpos = 0;
     }


Here's the code for picking up a rock:
First, the bit in collide with the rock (called "ball" here)
Code: Select all
char * key = GetKeyState();
 
        if (ladderon!=1) {
 if (carrynumber == 49) {
        if (key[KEY_DOWN]==1) {
 if (item != 0) {
dEquip ();
                }
 
          if ((strcmp(facing, "right") == 0)) {
             ChangeAnimation("Ed", "playernormalliftright", FORWARD);
             ChangePath("Collide Actor", "liftright", BOTH_AXIS);
              prevgravity = gravity;
             item = 2;
             ChangeAnimation("feathericon", "carryicon", FORWARD);
             powerlevel = 1;
               gravity +=4;
             carrynumber = 0;
             carried[0] = 5;
                                              }
 
 else if ((strcmp(facing, "right") != 0)) {
             ChangeAnimation("Ed", "playernormalliftleft", FORWARD);
             ChangePath("Collide Actor", "liftleft", BOTH_AXIS);
             prevgravity = gravity;
             item = 2;
             ChangeAnimation("feathericon", "carryicon", FORWARD);
             powerlevel = 1;
             gravity +=4;
             carrynumber = 0;
             carried[0] = 5;
                                    }
                              }
                     }
                         }


Here;s the bit (repeated from above) when you push down in order to lift the ball up.

Code: Select all
if (key[KEY_DOWN]==1) {
    if ( strcmp(special, "carry") != 0)  {
    if ((vdir == 1) && (ladderon == 0)) {
        vdir = 0;
        strcpy (action, "lift");
        tspeed = 0;
                                        }
 
else if ((vdir == 2) && (ladderon == 0)){
    vdir = 0;
    strcpy (action, "lift");
    tspeed=speed;
                                        }
if (ladderon == 1){
    strcpy (action, "climb");
    Ed.y += 3;
    tspeed=1;
    vdir = 1;
                  }
                                         }
                      }


Here's what happens when you die. reSpawn is for dying when you still have available hp, reSpawn2 is when you restore to the last savepoint.
Code: Select all
void reSpawn ()
{

    hitpoints -=1;
    hitPointcheck ();
loadVars ("autosave.sav", "input");
loadVars ("autosave.sav", "flags");
loadVars ("autosave.sav", "counters");
loadVars ("autosave.sav", "move");
heartCheck ();
if (hitpoints > (hearttotal +1)) {
    hitpoints = hearttotal+1;
                                 }
Ed.x = spawnpoint.x;
Ed.y = spawnpoint.y;
screenmoving = 0;
ChangeAnimation("Ed", "playernormalrespawnright", FORWARD);
view.x = viewcheckpointx;
view.y = viewcheckpointy;
}

void reSpawn2 ()
{

hitpoints -= 1;
hitPointcheck ();
if (fileslot == 1) {
loadVars ("savepoint1.sav", "input");
loadVars ("savepoint1.sav", "flags");
loadVars ("savepoint1.sav", "counters");
loadVars ("savepoint1.sav", "move");
                   }
if (fileslot == 2) {
loadVars ("savepoint2.sav", "input");
loadVars ("savepoint2.sav", "flags");
loadVars ("savepoint2.sav", "counters");
loadVars ("savepoint2.sav", "move");
                   }
if (fileslot == 3) {
loadVars ("savepoint3.sav", "input");
loadVars ("savepoint3.sav", "flags");
loadVars ("savepoint3.sav", "counters");
loadVars ("savepoint3.sav", "move");
                   }

screenmoving = 0;
hitpoints = hearttotal + 1;
heartCheck ();
hitPointcheck ();
Ed.x = spawnsavepoint.x;
Ed.y = spawnsavepoint.y;
ChangeAnimation("Ed", "playernormalrespawnright", FORWARD);
spawnpoint.x = spawnsavepoint.x;
spawnpoint.y = spawnsavepoint.y;
view.x = viewsavex;
view.y = viewsavey;
}

void edgeMove ()
{
    Ed.yvelocity = velocityyprev;
     Ed.xvelocity = velocityxprev;

     if (screenmoving == 1) {
         if (vdir != 2) {
       Ed.x += 15;
                        }
 
    if (vdir == 2) {
       Ed.x += 15;
 
 
                        }
                           }
 
 
 
   if (screenmoving == 2) {
       if (vdir != 2) {
       Ed.x -= 15;
                      }
  if (vdir == 2) {
       Ed.x -= 15;
 
 
 
                        }
                           }
     if (screenmoving == 3) {
       Ed.y -= 9;
         if (iwasclimbingstupid == 1) {
             ladderon = 1;
            iwasclimbingstupid = 0;
                           }
                           }
   if (screenmoving == 4) {
       Ed.y += 7;
        if (iwasclimbingstupid == 1) {
             ladderon = 1;
            iwasclimbingstupid = 0;
                           }
                           }
 
}


This code is in draw actor. It may become a function soon, but it's what causes the view and HUD to move.

Code: Select all
if (Ed.x > (screenedge.x +618)) {
    if (screenmovetimer == 0) {
 
 
       MoveTo("screenedge", 640.000000, 0.000000, 11.000000, "screenedge", "");
              MoveTo("heart.1", 640.000000, 0.000000, 11.000000, "heart.1", "");
        MoveTo("heart.2", 640.000000, 0.000000, 11.000000, "heart.2", "");
        MoveTo("heart.3", 640.000000, 0.000000, 11.000000, "heart.3", "");
        MoveTo("heart.4", 640.000000, 0.000000, 11.000000, "heart.4", "");
        MoveTo("heart.5", 640.000000, 0.000000, 11.000000, "heart.5", "");
        MoveTo("heart.6", 640.000000, 0.000000, 11.000000, "heart.6", "");
         MoveTo("heart.7", 640.000000, 0.000000, 11.000000, "heart.7", "");
        MoveTo("heart.8", 640.000000, 0.000000, 11.000000, "heart.8", "");
        MoveTo("heart.9", 640.000000, 0.000000, 11.000000, "heart.9", "");
        MoveTo("heart.0", 640.000000, 0.000000, 11.000000, "heart.0", "");
      MoveTo("credit", 640.000000, 0.000000, 11.000000, "credit", "");
      MoveTo("Falltimer", 640.000000, 0.000000, 11.000000, "Falltimer", "");
      MoveTo("falltimer2", 640.000000, 0.000000, 11.000000, "falltimer2", "");
      MoveTo("falltimer3", 640.000000, 0.000000, 11.000000, "falltimer3", "");
      MoveTo("feathericon", 640.000000, 0.000000, 11.000000, "feathericon", "");
      MoveTo("healthmeter", 640.000000, 0.000000, 11.000000, "healthmeter", "");
      MoveTo("Inventory", 640.000000, 0.000000, 11.000000, "Inventory", "");
      MoveTo("levelname", 640.000000, 0.000000, 11.000000, "levelname", "");
 
 velocityyprev = Ed.yvelocity;
 velocityxprev = Ed.xvelocity;
    yvelocity = 0;
       xvelocity = 0;
       screenmoving = 1;
 level += 1;
 viewlevel += 1;
 levelLoad ();

       screenmovetimer = 70;
 
      EventDisable("Ed", EVENTANIMATION);
                              }
 
                       }

if (Ed.x < screenedge.x - 8) {
    if (screenmovetimer == 0) {

 
       MoveTo("screenedge", -640.000000, 0.000000, 11.000000, "screenedge", "");
       MoveTo("heart.1", -640.000000, 0.000000, 11.000000, "heart.1", "");
        MoveTo("heart.2", -640.000000, 0.000000, 11.000000, "heart.2", "");
        MoveTo("heart.3", -640.000000, 0.000000, 11.000000, "heart.3", "");
        MoveTo("heart.4", -640.000000, 0.000000, 11.000000, "heart.4", "");
        MoveTo("heart.5", -640.000000, 0.000000, 11.000000, "heart.5", "");
        MoveTo("heart.6", -640.000000, 0.000000, 11.000000, "heart.6", "");
         MoveTo("heart.7", -640.000000, 0.000000, 11.000000, "heart.7", "");
        MoveTo("heart.8", -640.000000, 0.000000, 11.000000, "heart.8", "");
        MoveTo("heart.9", -640.000000, 0.000000, 11.000000, "heart.9", "");
        MoveTo("heart.0", -640.000000, 0.000000, 11.000000, "heart.0", "");
        MoveTo("credit", -640.000000, 0.000000, 11.000000, "credit", "");
             MoveTo("Falltimer", -640.000000, 0.000000, 11.000000, "Falltimer", "");
      MoveTo("falltimer2", -640.000000, 0.000000, 11.000000, "falltimer2", "");
      MoveTo("falltimer3", -640.000000, 0.000000, 11.000000, "falltimer3", "");
      MoveTo("feathericon", -640.000000, 0.000000, 11.000000, "feathericon", "");
      MoveTo("healthmeter", -640.000000, 0.000000, 11.000000, "healthmeter", "");
      MoveTo("Inventory", -640.000000, 0.000000, 11.000000, "Inventory", "");
      MoveTo("levelname", -640.000000, 0.000000, 11.000000, "levelname", "");
 
 velocityyprev = Ed.yvelocity;
 velocityxprev = Ed.xvelocity;
    yvelocity = 0;
       xvelocity = 0;
 
 
             screenmoving = 2;
 
                  screenmovetimer = 70;
 
 level -= 1;
 viewlevel -= 1;
 levelLoad ();
            EventDisable("Ed", EVENTANIMATION);
                       }

                       }
 
if (Ed.y < screenedge.y - 8) {
    if (screenmovetimer == 0) {
 
        if (ladderon == 1) {
            iwasclimbingstupid = 1;
                           }

 
       MoveTo("screenedge", 0.000000, -480.000000, 11.000000, "screenedge", "");
       MoveTo("heart.1", 0.000000, -480.000000, 11.000000, "heart.1", "");
        MoveTo("heart.2", 0.000000, -480.000000, 11.000000, "heart.2", "");
        MoveTo("heart.3", 0.000000, -480.000000, 11.000000, "heart.3", "");
        MoveTo("heart.4", 0.000000, -480.000000, 11.000000, "heart.4", "");
        MoveTo("heart.5", 0.000000, -480.000000, 11.000000, "heart.5", "");
        MoveTo("heart.6", 0.000000, -480.000000, 11.000000, "heart.6", "");
         MoveTo("heart.7", 0.000000, -480.000000, 11.000000, "heart.7", "");
        MoveTo("heart.8", 0.000000, -480.000000, 11.000000, "heart.8", "");
        MoveTo("heart.9", 0.000000, -480.000000, 11.000000, "heart.9", "");
        MoveTo("heart.0", 0.000000, -480.000000, 11.000000, "heart.0", "");
        MoveTo("credit", 0.000000, -480.000000, 11.000000, "credit", "");
             MoveTo("Falltimer", 0.000000, -480.000000, 11.000000, "Falltimer", "");
      MoveTo("falltimer2", 0.000000, -480.000000, 11.000000, "falltimer2", "");
      MoveTo("falltimer3", 0.000000, -480.000000, 11.000000, "falltimer3", "");
      MoveTo("feathericon", 0.000000, -480.000000, 11.000000, "feathericon", "");
      MoveTo("healthmeter", 0.000000, -480.000000, 11.000000, "healthmeter", "");
      MoveTo("Inventory", 0.000000, -480.000000, 11.000000, "Inventory", "");
      MoveTo("levelname", 0.000000, -480.000000, 11.000000, "levelname", "");
 
 velocityyprev = Ed.yvelocity;
 velocityxprev = Ed.xvelocity;
    yvelocity = 0;
       xvelocity = 0;
 
 
             screenmoving = 3;
 
                  screenmovetimer = 50;
 
  level += 10;
 viewlevel += 10;
 levelLoad ();
      EventDisable("Ed", EVENTANIMATION);
                       }

                       }
 
if (Ed.y > screenedge.y + 480) {
    if (screenmovetimer == 0) {
  if (ladderon == 1) {
            iwasclimbingstupid = 1;
                           }
 
       MoveTo("screenedge", 0.000000, 480.000000, 11.000000, "screenedge", "");
       MoveTo("heart.1", 0.000000, 480.000000, 11.000000, "heart.1", "");
        MoveTo("heart.2", 0.000000, 480.000000, 11.000000, "heart.2", "");
        MoveTo("heart.3", 0.000000, 480.000000, 11.000000, "heart.3", "");
        MoveTo("heart.4", 0.000000, 480.000000, 11.000000, "heart.4", "");
        MoveTo("heart.5", 0.000000, 480.000000, 11.000000, "heart.5", "");
        MoveTo("heart.6", 0.000000, 480.000000, 11.000000, "heart.6", "");
         MoveTo("heart.7", 0.000000, 480.000000, 11.000000, "heart.7", "");
        MoveTo("heart.8", 0.000000, 480.000000, 11.000000, "heart.8", "");
        MoveTo("heart.9", 0.000000, 480.000000, 11.000000, "heart.9", "");
        MoveTo("heart.0", 0.000000, 480.000000, 11.000000, "heart.0", "");
        MoveTo("credit", 0.000000, 480.000000, 11.000000, "credit", "");
             MoveTo("Falltimer", 0.000000, 480.000000, 11.000000, "Falltimer", "");
      MoveTo("falltimer2", 0.000000, 480.000000, 11.000000, "falltimer2", "");
      MoveTo("falltimer3", 0.000000, 480.000000, 11.000000, "falltimer3", "");
      MoveTo("feathericon", 0.000000, 480.000000, 11.000000, "feathericon", "");
      MoveTo("healthmeter", 0.000000, 480.000000, 11.000000, "healthmeter", "");
      MoveTo("Inventory", 0.000000, 480.000000, 11.000000, "Inventory", "");
      MoveTo("levelname", 0.000000, 480.000000, 11.000000, "levelname", "");
 
 
 velocityyprev = Ed.yvelocity;
 velocityxprev = Ed.xvelocity;
    yvelocity = 0;
       xvelocity = 0;
 
             screenmoving = 4;
 
                  screenmovetimer = 50;
  level -= 10;
 viewlevel -= 10;
 levelLoad ();
      EventDisable("Ed", EVENTANIMATION);
                       }

                       }
               }
 


That should be most of the relevant parts.

I also have several other functions that dont' seem to have too many problems.

Thanks!
Code: Select all




Here's the ged: http://ubuntuone.com/4PkVj9qoAgFls18jbLnxsD
Last edited by bspeers on Fri Aug 10, 2012 1:38 pm, edited 3 times in total.
bspeers
 
Posts: 15
Joined: Thu Jun 21, 2012 2:18 am
Score: 0 Give a positive score

Re: Numerous game-breaking bugs, anyone able to help?

Postby Fojam » Mon Aug 06, 2012 4:27 pm

2 things. 1, you should post your source code. 2, you should make a log in your game. It's very helpful when tracking down bugs
CLICK TO GIVE ME POINTS

My Latest Projects:
Super Smash Bros: viewtopic.php?f=6&t=12307 PLEASE help by making sprites!
User avatar
Fojam
 
Posts: 513
Joined: Thu Mar 19, 2009 10:02 pm
Location: under your bed!!!
Score: 69 Give a positive score

Re: Numerous game-breaking bugs, anyone able to help?

Postby bspeers » Mon Aug 06, 2012 7:23 pm

Fojam wrote:2 things. 1, you should post your source code. 2, you should make a log in your game. It's very helpful when tracking down bugs


I did 1 just now, thanks for the suggestion. Number 2 I don't know how to do--is it a simple process?
bspeers
 
Posts: 15
Joined: Thu Jun 21, 2012 2:18 am
Score: 0 Give a positive score

Re: Numerous game-breaking bugs, anyone able to help?

Postby happyjustbecause » Tue Aug 07, 2012 5:07 am

I probably can't really help you, but I would post the .ged and data for other people that want to help you. It would just be a lot easier for people to really understand the problem so they can help you fix it.
For small creatures such as we the vastness is bearable only through love.
-Carl Sagan

Night Knight Development Thread
User avatar
happyjustbecause
 
Posts: 267
Joined: Tue Jul 26, 2011 3:10 pm
Location: Frazier Park, Ca
Score: 15 Give a positive score

Re: Numerous game-breaking bugs, anyone able to help?

Postby Fojam » Tue Aug 07, 2012 4:14 pm

I'm not home right now and I only have an iPod touch but I'll post my debug logger code when I get home. You really should actually post the GED when you ask for help, though
CLICK TO GIVE ME POINTS

My Latest Projects:
Super Smash Bros: viewtopic.php?f=6&t=12307 PLEASE help by making sprites!
User avatar
Fojam
 
Posts: 513
Joined: Thu Mar 19, 2009 10:02 pm
Location: under your bed!!!
Score: 69 Give a positive score

Re: Numerous game-breaking bugs, anyone able to help?

Postby bspeers » Wed Aug 08, 2012 2:25 pm

I'm about to head off to work, but I will do as you suggest and post the .ged. I'm also revamping the scrolling system in a way that I think will solve a couple of the problems, but there are still other bugs I can't seem to isolate.

I'm newish to the community, learning how folks do things here, and will do as you suggest once I've implemented those changes.

Thanks!
bspeers
 
Posts: 15
Joined: Thu Jun 21, 2012 2:18 am
Score: 0 Give a positive score

Re: Numerous game-breaking bugs, anyone able to help?

Postby AliceXIII » Wed Aug 08, 2012 2:43 pm

just to throw it out there you don't have to post the .ged if your game is of a sensitive nature to you, as in your trying to keep the source private from everyone..

generally people do post the .ged's though cause most people here aren't making commercial games, if you do post the .ged post it with the data folder to in a .zip or something because we'll need that to :)

also if your game is of the sensitive nature then i suggest pm'ing your source to skydereign or myself or anyone else you trust not to steal your game, i suggest myself or skydereign because i wont steal it because programmings fun for me so that would defeat the purpose and skydereign has a good track record of helping individuals privately and he also has no reason to want to steal the source either.

note that if you pm it to skydereign let him know ahead of time that you will before you do so that way yall have a mutual agreement that he'll help, not that i think he'll care, but i just don't want to advertise his services like that!

these are the two ways of getting help around here buddy :wink:
"Taking a breath of fresh air."
User avatar
AliceXIII
 
Posts: 325
Joined: Fri Sep 17, 2010 2:36 am
Location: victoria, texas
Score: 37 Give a positive score

Re: Numerous game-breaking bugs, anyone able to help?

Postby bspeers » Thu Aug 09, 2012 2:25 am

Oh, I don't mind sharing my file, I would be very surprised if there were anything in it anyone would want to emulate (my code is rather badly organized, and my graphics are barely functional).

I just A) am getting used to how things are done here and B) Want to spend another day or so trying to work out the bugs myself before I put the whole thing up and potentially waste somebody's time.

Trust me when I say I am going to depend on this community for help--bugs bug me.
bspeers
 
Posts: 15
Joined: Thu Jun 21, 2012 2:18 am
Score: 0 Give a positive score

Re: Numerous game-breaking bugs, anyone able to help?

Postby AliceXIII » Thu Aug 09, 2012 1:07 pm

Well we have alot of users needing answers to there questions so theres a good user help base on these forums we have several very helpful members on here so you wouldn't be wasting are time so when your ready im sure you'll get the answers you seek :)
"Taking a breath of fresh air."
User avatar
AliceXIII
 
Posts: 325
Joined: Fri Sep 17, 2010 2:36 am
Location: victoria, texas
Score: 37 Give a positive score

Re: Numerous game-breaking bugs, anyone able to help?

Postby bspeers » Fri Aug 10, 2012 4:49 am

Hit another wall, I can't seem to get those bugs fixed.

Here's the ged: http://ubuntuone.com/4PkVj9qoAgFls18jbLnxsD
bspeers
 
Posts: 15
Joined: Thu Jun 21, 2012 2:18 am
Score: 0 Give a positive score

Re: Numerous game-breaking bugs, anyone able to help?

Postby Fojam » Fri Aug 10, 2012 5:19 pm

Ill take a look at it when I get back on Sunday
CLICK TO GIVE ME POINTS

My Latest Projects:
Super Smash Bros: viewtopic.php?f=6&t=12307 PLEASE help by making sprites!
User avatar
Fojam
 
Posts: 513
Joined: Thu Mar 19, 2009 10:02 pm
Location: under your bed!!!
Score: 69 Give a positive score

Re: Numerous game-breaking bugs, anyone able to help?

Postby bspeers » Sat Aug 11, 2012 4:34 am

Thanks muchly.

You'll notice that the scrolling script doesn't quite work as I discussed, that's because since posting this originally, I've started to rewrite it. I should be able to solve most of the scrolling issues now.

The issue of not being able to pick up rocks every time, animations not playing and the character "stuttering" before they go to climb ladders still elude me. For the latter, I have some idea, but can't figure out how to fix it without breaking something else.

Also, please excuse my awful code, any help or advice on getting stuff better organized, working, or anything else whatsoever is greatly appreciated. It's a great program, and I love that it runs as well as it does in linux.
bspeers
 
Posts: 15
Joined: Thu Jun 21, 2012 2:18 am
Score: 0 Give a positive score

Re: Numerous game-breaking bugs, anyone able to help?

Postby Fojam » Sun Aug 12, 2012 1:54 pm

heres my code for debug logging. just call writeLog(char*) whenever you want to write something in the log

Code: Select all
FILE*logFile;
int logging=1;

void openLog()
{
    if(logging==1)
    {
        stTime t=getTime();
        char currentTime[30];
        logFile=fopen("log.txt", "a+");
        sprintf(currentTime,"%i/%i/%i, %i:%i:%i",t.mon,t.mday,t.year,t.hour,t.min,t.sec);
        fprintf(logFile,"\n\n %s \n",currentTime);
        fclose(logFile);
    }
}

void writeLog(const char*logText)
{
    if(logging==1)
    {
        logFile=fopen("log.txt","a+");
        fprintf(logFile,logText);
        fclose(logFile);
    }
}
CLICK TO GIVE ME POINTS

My Latest Projects:
Super Smash Bros: viewtopic.php?f=6&t=12307 PLEASE help by making sprites!
User avatar
Fojam
 
Posts: 513
Joined: Thu Mar 19, 2009 10:02 pm
Location: under your bed!!!
Score: 69 Give a positive score

Re: Numerous game-breaking bugs, anyone able to help?

Postby Fojam » Sun Aug 12, 2012 2:00 pm

Also, its very difficult to debug your game because there are literally no comments
CLICK TO GIVE ME POINTS

My Latest Projects:
Super Smash Bros: viewtopic.php?f=6&t=12307 PLEASE help by making sprites!
User avatar
Fojam
 
Posts: 513
Joined: Thu Mar 19, 2009 10:02 pm
Location: under your bed!!!
Score: 69 Give a positive score

Re: Numerous game-breaking bugs, anyone able to help?

Postby Fojam » Sun Aug 12, 2012 2:00 pm

Try using the log
Last edited by Fojam on Sun Aug 12, 2012 2:46 pm, edited 1 time in total.
CLICK TO GIVE ME POINTS

My Latest Projects:
Super Smash Bros: viewtopic.php?f=6&t=12307 PLEASE help by making sprites!
User avatar
Fojam
 
Posts: 513
Joined: Thu Mar 19, 2009 10:02 pm
Location: under your bed!!!
Score: 69 Give a positive score

Next

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest