Jump to content


Photo

Need Help With Platformer


  • Please log in to reply
26 replies to this topic

#1 Burbruee

Burbruee

    GP32 Hardcore

  • Member
  • PipPipPipPip
  • 199 posts

Posted 27 July 2008 - 10:39 PM

Hello,

Last night I started work on (sort of) a remake of the old Amiga P.D game Platman in Fenix.

I'm still new to Fenix and programming, and I used a platform example written in spanish by shaggylish to start building from. Although my Spanish isn't great, I think I understand all the comments and variable names.
So anyway, the solution I came up with for changing from one room to the other was by using the hardness map and painting a different color over the so called exit, then another color on the other side to be able to travel back and forth between two rooms.

It works, but might not be the best way since I use one color for each door and can be hard to keep track on. Also you COULD run out of colors, but I doubt it would happen since I'm doing 16-bits. wink.gif

Anyway, moving from one room to the other either by moving left or right works fine. But there are cases where you need to enter a room by falling into it (I'm remaking all of the original levels) and that's where I'm having problems. Although I paint a line in a color like I would when changing rooms horizontally, it won't detect it when moving vertically. Most likely the condition where I put the if part is wrong, which is why I request a little help to figure this one out.


Here's the part that works (changing rooms horizontally)

CODE

IF (vel_x > 0)
   FOR(incremento=0;incremento<vel_x;incremento++)
      color = map_get_pixel(fpg_niveles,mapa_dureza,(x+10),(y-1));
      IF (color == rgb(255,0,0))
         BREAK;
         estado_x = PARADO;
         vel_x = 0;
      END;
      
      IF (color == rgb(0,0,255))
         //BREAK;
         start_scroll(id_scroll, fpg_niveles, 9, 0, 0, 0);
         mapa_dureza = 10;
         x = 15;
         y = 116;
      END;
      IF (color == rgb(0,0,240))
         //BREAK;
         start_scroll(id_scroll, fpg_niveles, 11, 0, 0, 0);
         mapa_dureza = 12;
         x = 15;
         y = 448;
      END;                    
      x++;
   END;
ELSE
   FOR(incremento=0;incremento>vel_x;incremento--)
      color = map_get_pixel(fpg_niveles,mapa_dureza,(x-10),(y-1));
      IF (color == rgb(255,0,0))
         BREAK;
         estado_x = PARADO;
         vel_x = 0;
      END
      
      IF (color == rgb(0,255,0))
         //BREAK;
         start_scroll(id_scroll, fpg_niveles, 7, 0, 0, 0);
         mapa_dureza = 8;
         x = 622;
         y = 118;
      END;
      IF (color == rgb(0,240,0))
         //BREAK;
         start_scroll(id_scroll, fpg_niveles, 9, 0, 0, 0);
         mapa_dureza = 10;
         x = 623;
         y = 432;
      END;
      x--;        
   END
END

The fpg_niveles is the fpg where I have all the graphics for the levels/rooms. Two of each, one normal, one hardness map.
So generally, the method I use for the illusion of going from one room to another is to do a new start_scroll and give it a new value for the background graphic to use (the new room) then I change mapa_dureza as well (this is the hardness map, and also a value from the fpg file), lastly I alter the x and y values.

Now, for the vertical movement:
CODE

//Tecla y gravedad se inicializa
IF(key(_x)  AND estado_y <> SALTANDO)
   gravedad = -limite_gravedad;
   estado_y = SALTANDO;
   play_wav(snd_salto, 0);
END
//Gravedad va cambiando en cada frame
IF (gravedad < limite_gravedad)
   gravedad++;
END
/*Se averigua si está tocando el suelo cuando esté bajando
sino, nunca dejaría de tocar el suelo*/            

color = map_get_pixel(fpg_niveles,mapa_dureza,x,y);            
   IF (color == rgb(255,0,0) AND gravedad>0)
      gravedad = 0;
      estado_y = PARADO;
      ELSE
      estado_y = SALTANDO;
   END              
            
IF(gravedad>0)
   FOR(incremento=1;incremento<gravedad;incremento++)
      color = map_get_pixel(fpg_niveles,mapa_dureza,x,y);            
      IF (color == rgb(255,0,0))            
         BREAK;
      END;
      y++;
   END
   ELSE
      y+=gravedad;
END


I haven't translated the spanish variables, yet. But most of them are easy to figure out, such as gravedad = gravity, limited by limite_gravedad. This is defined earlier in the player process and controls how high the character can jump. The constants PARADO, SALTANDO and also ANDANDO has to do with the character animation and whether he is standing or jumping etc.

Either way, with the horizontal stuff I could just add my simple code to the right (incremento++ FOR part) or left (incremento-- FOR part)
This doesn't work so easy for the vertical movement, I've tried to put my code in different places but he just keeps falling forever and does not change to the new room.

I was hoping I could get some help figuring this one out as I don't know what needs to be done.
Thanks.

Edited by Burbruee, 27 July 2008 - 10:42 PM.


#2 WhiteFalcon

WhiteFalcon

    Mega GP Mania

  • GP Guru
  • 728 posts
  • Gender:Male
  • Location:Czech Republic
  • Interests:Games, Music, Composing, Programming, Audiobooks, GP32, GP2X..

Posted 28 July 2008 - 08:17 AM

QUOTE(Burbruee @ Jul 28 2008, 12:39 AM) View Post

...
So anyway, the solution I came up with for changing from one room to the other was by using the hardness map and painting a different color over the so called exit, then another color on the other side to be able to travel back and forth between two rooms.
...


I am not sure if I really understand what you want to do and I admit knowing nothing about Fenix, but I presume you have a map of the screens so why not just keep info on where to every side of every screen leads? I mean like it was made in old text adventure games, you have a room number and also other four room numbers assigned to it (and then just detect when the player leaves the screen in any direction). Assuming you either have only one exit in every direction at most or they lead to the same room at correcponding places.
Another approach could be using special tiles that sign the room exit, but you would still need the info on where to go then.
If my hints are totally beyond what you asked, just ignore me wink.gif

#3 Burbruee

Burbruee

    GP32 Hardcore

  • Member
  • PipPipPipPip
  • 199 posts

Posted 28 July 2008 - 12:36 PM

QUOTE(WhiteFalcon @ Jul 28 2008, 10:17 AM) View Post

QUOTE(Burbruee @ Jul 28 2008, 12:39 AM) View Post

...
So anyway, the solution I came up with for changing from one room to the other was by using the hardness map and painting a different color over the so called exit, then another color on the other side to be able to travel back and forth between two rooms.
...


I am not sure if I really understand what you want to do and I admit knowing nothing about Fenix, but I presume you have a map of the screens so why not just keep info on where to every side of every screen leads? I mean like it was made in old text adventure games, you have a room number and also other four room numbers assigned to it (and then just detect when the player leaves the screen in any direction). Assuming you either have only one exit in every direction at most or they lead to the same room at correcponding places.
Another approach could be using special tiles that sign the room exit, but you would still need the info on where to go then.
If my hints are totally beyond what you asked, just ignore me wink.gif

Like this, you can enter a room from the left to the right:
IPB Image
IPB Image

And you can also travel back to the previous room:

IPB Image

I'm using hardness maps to detect where there is an exit:
IPB Image
(there's a green line at the bottom left exit)

But I can't figure out how to do the same thing when falling down into another room: (just ends up not changing rooms and falling forever)
IPB Image

I hope that explains my problem better.

#4 WhiteFalcon

WhiteFalcon

    Mega GP Mania

  • GP Guru
  • 728 posts
  • Gender:Male
  • Location:Czech Republic
  • Interests:Games, Music, Composing, Programming, Audiobooks, GP32, GP2X..

Posted 30 July 2008 - 09:08 AM

I see your point, you use pixel collision for determining when the player is leaving a screen and in which direction. I cannot see the reason why it should not work with vertical transitions. But your images look like you really could use a tilemap (if you are not using it already). I will try to explain what seems to be a "cleaner" approach to that.
Provided the player can leave the screen only at specific places, i.e. all other sides are blocked by non-passable tiles, you would simply have a large array (map) with each cell representing a room and when the player leaves a screen (overlaps any of the screen boundaries - there should be no need for colored lines to determine that), you just find out which direction it was and change the screen according to the map. If your screens are not build from tiles then it is a different matter probably. I have only experience with tile-based platformers so that might be why I insist on using tiles smile.gif

If this is more Fenix-related than I think, hopefully someone with knowledge of Fenix will reply.

#5 iprice

iprice

    Mega GP Mania

  • GP Guru
  • 1167 posts
  • Gender:Male
  • Location:MK. UK. OK.

Posted 30 July 2008 - 09:22 AM

It sounds as though your pixel detetion routine while falling is actually missing the hardness map. You could make the sprite do multiple pixel checks - both less than and more than the current Y value (x,y-1 x,y x,y+1 etc.) You could use something like this
CODE

// THIS IS NOT FENIX CODE, BUT SHOULD BE EASILY ADAPTABLE

b=0

For n=PlayerY-4 to PlayerY+4
  b=ReadPixel (image, PlayerX, n)
Next

If b=(specific colour) Then fall_into_next_room=1


I would definitely go with a map array (as mentioned above) if the tiles are all square/rectangular - with no slopes etc. It's both cleaner and quicker than pixel checking.

However, as long as you're not testing too many pixels at a time, then it should be OK and fast enough.

BUT - bare in mind that if you intend to distribute your game as a pc executable, that certain graphics cards use slightly different values for colours, so accuracy may be affected. Obviously all GP2Xs will give the same values.

I should also add that tile based games are both quicker to create (once you've got a good editor), and save masses of memory than games that use pre-rendered imagery for levels and hardness files. The data from tiles can be used for multiple reasons - not just for player location/platforms etc.

Edited by iprice, 30 July 2008 - 09:26 AM.


#6 WhiteFalcon

WhiteFalcon

    Mega GP Mania

  • GP Guru
  • 728 posts
  • Gender:Male
  • Location:Czech Republic
  • Interests:Games, Music, Composing, Programming, Audiobooks, GP32, GP2X..

Posted 04 August 2008 - 07:36 AM

QUOTE(iprice @ Jul 30 2008, 11:22 AM) View Post

I would definitely go with a map array (as mentioned above) if the tiles are all square/rectangular - with no slopes etc. It's both cleaner and quicker than pixel checking.


And you can even combine both methods. I once started programming a Dizzy Remake for the GP32 with a tile engine and pixel-perfect collision detection (slopes etc.) and it worked like a charm and fast and that on the old GP32.

#7 Goity

Goity

    VIP Sleaze

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 5598 posts
  • Gender:Not Telling
  • Location:Isle of Ewe
  • Interests:Video Games, Comparing people to Madonna, not quite fun, more specifically funny times.

Posted 11 August 2008 - 11:23 AM

Make the line on your hardness map bigger. When going vertically your character will be going too fast, and miss the collision by going straight past.

#8 Burbruee

Burbruee

    GP32 Hardcore

  • Member
  • PipPipPipPip
  • 199 posts

Posted 23 November 2008 - 03:35 PM

QUOTE(iprice @ Jul 30 2008, 10:22 AM) View Post
I would definitely go with a map array (as mentioned above) if the tiles are all square/rectangular - with no slopes etc. It's both cleaner and quicker than pixel checking.

I should also add that tile based games are both quicker to create (once you've got a good editor), and save masses of memory than games that use pre-rendered imagery for levels and hardness files. The data from tiles can be used for multiple reasons - not just for player location/platforms etc.

Sorry for the late reply, but I found this really interesting. But I've never used map arrays or tiles in a game before.

I found this video on youtube:
It's SDL, but you can see that he uses an array to create his map.
I want to learn how I can do that, I don't know how. ^^

Help? smile.gif

#9 Burbruee

Burbruee

    GP32 Hardcore

  • Member
  • PipPipPipPip
  • 199 posts

Posted 28 November 2008 - 07:48 PM

Sorry for the double, but I need your help with making a tile-based platformer..
I want to start simple, so no level editor for now, levels will be hardcoded by using arrays in the sourcecode.

Take a look at my _very_ simple code here. tongue.gif

CODE
PROGRAM TROLLET_IV;
GLOBAL
    int i, j, map;
    int TILE_SIZE = 16;
    int level1[20][15] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
BEGIN;

    set_title("TROLLET IV: UNDERTITLE TO BE DECIDED");
    set_mode(320,240,8,256);
    map = new_map(16,16,8);
    map_clear(0, map, rgb(255,0,0));
    
    for(i=0; i<20; i++)
       for(j=0; j<15; j++)
          if(level1[i][j] == 1) put(0,map, i*TILE_SIZE, j*TILE_SIZE); end;
       end;
    end;
    
    loop
        if(key(_esc)) exit("",0); end;
        frame;
    end;
    
END;


Who can help me spot the error in my way of thinking? Because it does not look as I expected it to look. ^^

IPB Image

Thanks, and please answer, it would mean a lot.

#10 iprice

iprice

    Mega GP Mania

  • GP Guru
  • 1167 posts
  • Gender:Male
  • Location:MK. UK. OK.

Posted 29 November 2008 - 12:21 AM

It looks like the X and Y are being read the wrong way around.

Try reversing your X (I) and Y (J)placement of the tiles so that it's

For J=
For I=

Order of the X & Y tiledrawing function is important.


[EDIT] YEP, that's exactly it. I've just used your data in BlitzMax and got EXACTLY the same map as you. Switching the X and Y creates the map as you'd expect.
IPB Image

IPB Image

Edited by iprice, 29 November 2008 - 12:39 AM.


#11 Burbruee

Burbruee

    GP32 Hardcore

  • Member
  • PipPipPipPip
  • 199 posts

Posted 29 November 2008 - 02:52 AM

QUOTE(iprice @ Nov 29 2008, 01:21 AM) View Post

It looks like the X and Y are being read the wrong way around.

Try reversing your X (I) and Y (J)placement of the tiles so that it's

For J=
For I=

Order of the X & Y tiledrawing function is important.


[EDIT] YEP, that's exactly it. I've just used your data in BlitzMax and got EXACTLY the same map as you. Switching the X and Y creates the map as you'd expect.
http://www.iprice.re...stuff/map01.PNG

http://www.iprice.re...stuff/map02.PNG

Thanks!
Good thing we got the same problem at first, but something is still not right for me even after reversing the order..

I changed the for to this: (also named the variables x & y so it's easier to follow)
CODE
for(y=0; y<15; y++)
       for(x=0; x<20; x++)
          if(level1[y][x] == 1) put(0,map, x*TILE_SIZE, y*TILE_SIZE); end;
       end;
end;

But it now looks like this:
IPB Image

I even found this valuable information (look at the very bottom code snippet, it's for C/C++ [SDL], but should be exactly the same for Fenix)
http://www.parallelr.../tutorial11.php
It looks to me like I'm doing the same thing, so it's a bit of a mystery for me at the moment.
I've even tried changing the x and y's at different places out of desperation, it creates different patterns..
Everything but the right one. tongue.gif

Could you share a bit more detail please?

Thanks again.

Edited by Burbruee, 29 November 2008 - 02:43 PM.


#12 iprice

iprice

    Mega GP Mania

  • GP Guru
  • 1167 posts
  • Gender:Male
  • Location:MK. UK. OK.

Posted 29 November 2008 - 03:26 PM

I didn't get the same problem first at all - I knew what the problem was and wanted to replicate your example to prove my theory was correct. It was.


I know exactly what is happening here - you are trying to draw the screen taller than it is wide because you've reversed ALL X and Y variables.

The level map should still use "level1[x][y]"



Here is my Blitzmax code, which doesn't differ dramatically to yours, but does what it's supposed to do.
CODE

' Set up screen 640x480 pixels
Graphics 640,480

' Data for map
DefData 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
DefData 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
DefData 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
DefData 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
DefData 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
DefData 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
DefData 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
DefData 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
DefData 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
DefData 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
DefData 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
DefData 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
DefData 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
DefData 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
DefData 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1

' Set the map array maximum dimensions
Global map[20,15]

' Read the data into the array
For y=0 To 14
For x=0 To 19
ReadData map[x,y]
Next
Next

' Loop until ESC pressed
While Not KeyHit(KEY_ESCAPE)

' Draw map
For y=0 To 14
For x=0 To 19
If map[x,y]=1 Then DrawRect x*16,y*16,16,16
Next
Next

' Show screen
Flip

' Clear the backbuffer screen
Cls

Wend

End

Edited by iprice, 29 November 2008 - 03:49 PM.


#13 Burbruee

Burbruee

    GP32 Hardcore

  • Member
  • PipPipPipPip
  • 199 posts

Posted 29 November 2008 - 04:04 PM

Okay, I looked at your code, but apart from the Blitz-specific code and that you used another for loop to read the data into the array I couldn't spot many differences.

Here's my current code:
CODE

PROGRAM TROLLET_IV;
CONST
    SCREEN_X     = 320;
    SCREEN_Y     = 240;
    SCREEN_BPP    = 8;
    TILE_SIZE     = 16;
GLOBAL
    map;
    int level1[20][15] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
BEGIN;
    set_title( "TROLLET IV: UNDERTITLE TO BE DECIDED" );     
    set_mode( SCREEN_X, SCREEN_Y, SCREEN_BPP );    
    map = new_map( TILE_SIZE, TILE_SIZE, SCREEN_BPP );    
    map_clear( 0, map, rgb( 255, 255, 255 ));        
    
    for( y=0; y<15; y++ )
       for( x=0; x<20; x++ )
          if( level1[x][y] == 1 ) put(0, map, x * TILE_SIZE, y * TILE_SIZE ); end;
       end;
    end;
    
    loop
        if( key( _esc )) exit( "", 0 ); end;
        frame;
    end;
END;


And now if I run it it looks exactly the same as in my first post again, or your replication of my problem.

#14 iprice

iprice

    Mega GP Mania

  • GP Guru
  • 1167 posts
  • Gender:Male
  • Location:MK. UK. OK.

Posted 29 November 2008 - 04:37 PM

OK retry reversing the X and Y in the Level1 array, but instead of using x<20 use 15 and vice versa with Y.

CODE

    for( y=0; y<20; y++ )
       for( x=0; x<15; x++ )


See how that displays.



BTW which version of Fenix are you running and which IDE/ - I've tried compiling and running your code in Fenix 0.92 and FBMX, but just get error mesasges and the compiler option keeps switching to Bennu. Obviously I've not set something up correctly. Any advice on setting it up, so that I can then help you properly.

Edited by iprice, 29 November 2008 - 04:40 PM.


#15 Burbruee

Burbruee

    GP32 Hardcore

  • Member
  • PipPipPipPip
  • 199 posts

Posted 29 November 2008 - 04:41 PM

QUOTE(iprice @ Nov 29 2008, 05:37 PM) View Post

OK retry reversing the X and Y in the Level1 array, but instead of using x<20 use 15 and vice versa with Y.

CODE

    for( y=0; y<20; y++ )
       for( x=0; x<15; x++ )


See how that displays.

Tried that, it looks like this:

IPB Image

(changed it to 640x480, so you can see things better)