123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|713|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> Tilebased Platformer....

Thu, 19 Oct 2006, 12:22
mole
Hiya!

OK, so, i started on my long lost game, "The |edit| Chronicles... my game is the chronicles... |edit| of Huji" again.

I painfully managed to get the basic basics down... draw the tiles+pickups, handle picking up pickups, handle Huji stepping on a specail square (e.g. the exit square or th "four flowers" sqaure (you lose health if you step on the 4flower square because.... you eat them and it hurts you XD.. it was purely for testing the snazzy health bar..)

What is wrong, you may ask. Well, plenty

Player collisions *only* work if Huji is moving at 32 pixels (width and height of each tile) per frame. If it is not set to 32... well.. try and see for yourself, then fix pl0x

Scrolling the map.... :/ Yeah.... someone gonna tell me how I can implement this? I have seen planty of tutorials (Krylar's book for example) but i cannot do it to save my life...






I will upload the graphics etc. when i can, run now i have to leave, pretty quickly xD

cheers, mole
Thu, 19 Oct 2006, 12:33
magicman
this most likely wont help you, but when i do platformers(i dont, did once though) i make the tiles a type, that way you can have easy collisions, i think that might make it run slow however. i cant really look at your code at the moment, im in school.

-=-=-
Stuff... Yeah...
Thu, 19 Oct 2006, 15:20
Jayenkai
I'll take a look once you upload the graphics, since I'm not in the mood for tweaking together a few images

I must admit, you've done an awful lot of work!!


If your collision is only working when the player is at steps of 32, then why not create a kind of Grid-Based platformer..
If the player hits right, then the character takes 8*4 pixel steps, leaving him stood back at the 32nd pixel.
It's kind of a cheat, but if you look at Mario Vs Donkey Kong on the GBA it does that, and it's only about 3/4 years old. So there's nothing especially wrong with that method. So long as it fits in with the style of gameplay.

-=-=-
''Load, Next List!''
Thu, 19 Oct 2006, 16:01
mole
ahhh.. 8*4 steps... thats sneaky! I will have a crack at that tomorow...

Just gonna upload a .rar onto my new apache site

|edit| hmmm... not much point in putting it on my apache website seeing as it will probably be off when all the millions of people flood to download the .rar... but it is there anyway and also on my freewebs:
My apache one
Freewebs site, just add 'huji.rar' to get to the file.

Have fun fixing my dirty, horrible code for me
|edit|



Sat, 21 Oct 2006, 02:25
mole
I just posted this on devcrunch... it is a bit clearer.

jay: What you say about 8*4 steps... i tried a for.. next loop in the movement bits (update_player()) but it did not work. I am doing something wrong?

Media: huji.rar

Devcrunch post:
I tried what you suggested...[rob was saying i should try defining the y_pick and y variables in the load_level() function] (and also resetting all the variables involved to 0 and even changing the variable names in case that was the problem) but to no avail

The error for the level 2 pickups problem, according to blitz debug, is in the line



To help, i will plit up my code, showing the bits that are involved with the problems i have:

Movement is handled in my big sexy update_player() func, with help from the collide*****() functions, which simply return whether the square next to huij is unpassable. How can i get it to work properly as in moving in steps smaller than 32 (thats the tile size) per keyhit?

update_player() (i have removed the animation code... unneeded and not working):



Scrolling the map..... I have no idea howw to implement this basically. It involves updating offsetx and offsety, but where? How can i get it to scroll nicely (as of this point, i dont mind whther the map scrolls so you cannot see past the edge of the edge tiles, or whther you can)? How do i keep the collisions all working? Lots of questions XD

Hope thats a bit clearer,

mole
Sun, 22 Oct 2006, 02:42
mole
OK, so rob over at devcrunch helped me fix the level 2 pickups thing... i was missing a -1 in the for..next loop to load the pickups XD

Can anyone help with scrolling or movement?