Forum

> > Off Topic > Blitzmax Framework
Forums overviewOff Topic overviewLog in to reply

English Blitzmax Framework

7 replies
To the start Previous 1 Next To the start

old Blitzmax Framework

DannyDeth
User Off Offline

Quote
Hi all, wanted to know if anyone knows a Blitzmax platformer framework, as coding one yourself is really time consuming ( I have been trying for idk how many hours/days ).

old Re: Blitzmax Framework

SQ
Moderator Off Offline

Quote
What exactly you want to know about BMax?
I'm not quite sure what you want to say by "Blitzmax platformer framework"

old Re: Blitzmax Framework

DC
Admin Off Offline

Quote
it's not really hard to do that. write a simple tile engine with collision and that's it. you can do this in one day (or even one hour if you know what to do).

google for tile engine and jump and run tutorials.

or use something easier like game maker if you don't manage to do it with blitzmax.

old Re: Blitzmax Framework

DannyDeth
User Off Offline

Quote
GrandMyth has written
What exactly you want to know?

I don't need much, I just need a framework that allows you to use Platformer game physics, like jumping, detecting walls, etc. I have tried writing it myself, but it takes ages, and my game is just a starting prototype. So i don't want to bust my head on mathematics, i already had to break out the high-school math to use the mouse to aim a gun thingy ( Atan2 ).

EDIT: @DC:
Yeah that's a good idea. Noob moment there. But GAme Maker is not very good, it's to... GUI'ish. I prefer BlitzMax. PLus after paying the 80 bucks for it I'm keepin it

EDIT #2: I have been googling my eyes off, and i can't find anything. I think I'm stuck to figuring it out myself.
edited 2×, last 22.09.10 01:23:37 pm

old Re: Blitzmax Framework

archmage
User Off Offline

Quote
I think BMax supports it's own collision detection. ImageOverlap, RectsOverlap?

You said you have the IDE it has a command reference. Search through it.

old Re: Blitzmax Framework

DannyDeth
User Off Offline

Quote
Dark Byte has written
I think BMax supports it's own collision detection. ImageOverlap, RectsOverlap?

You said you have the IDE it has a command reference. Search through it.

I ahve, but trust me the BlitzMax Reference manual is HUGE. But it's ok i wrote a ( extremely ) crude script that works with ImagesCollide. Needless to say it doesn't work very well, you can go off a platform adn hit it's side and you won't fall anymore. Lol. Btw, DC. I guess that I will write a tile engine as it is easyier than i thought. Just gotta think How I will stop someone from doing the thing with the sticking to the sides of the platforms. Oh eyah and you can walk through vertical walls, since once the collision is detected it by-passes everything else. I need to get 'round that too. But it's fun so I'm going to do it anyways.

old Re: Blitzmax Framework

DC
Admin Off Offline

Quote
the collision principle is simple:
the trick is to avoid that your object gets stuck!
move your objects in a loop in the smallest unit possible (1 pixel in 2d games) and check for collision each time (so your loop will loop 5 times if you want to move 5 pixels for example). set the object to the previous position (-1 pixel) when a collision occured + cancel the movement loop. that's it.

do this for x and y movement.

old Re: Blitzmax Framework

DannyDeth
User Off Offline

Quote
DC has written
the collision principle is simple:
the trick is to avoid that your object gets stuck!
move your objects in a loop in the smallest unit possible (1 pixel in 2d games) and check for collision each time (so your loop will loop 5 times if you want to move 5 pixels for example). set the object to the previous position (-1 pixel) when a collision occured + cancel the movement loop. that's it.

do this for x and y movement.

Ok thanx for that. I was thinking of that as i refreshed page But doesn;t it make it jump a little? Nvmd thnat actually I'll just russel up some test code and check out what you are saying. I have one small question though. What you are saying will not only work if the terrain is flat, correct? But as well as when the terrain has deformations in it. So what you have is great consept. Im typing out some prototype code now. Thnx again for the advice. By head has just kept spinning over that question.

EDIT: I am having trouble with the part where you have to check the collision on the different axes. How would you do that? I am only really know how to check the collions with ImagesCollide and RectsOverlap functions, and I am not aware of how you could check on each axe.

EDIT2: Could i maybe use this? I re-wrote it from some thing a while ago and found it in another epic fail version of my would-be tile engine.

1
2
3
4
5
Function Distance#( X1, Y1, X2, Y2 )
Local DX# = X2 - X1
Local DY# = Y2 - Y1
Return Sqr( Dx*DX + Dy*Dy )
EndFunction

EDIT3: I needed some more help and it is pointless to create another thread, so Im just gonna post this question here:

Is there a way to find the individual colors in a bitmap, so that you could make an array containing each pixel's value? I wanted to know this because Im implementing a 'destructible terrain' thingy in a small project of mine.

Thnx in advance
~DannyDeth
edited 3×, last 29.09.10 05:17:57 pm
To the start Previous 1 Next To the start
Log in to replyOff Topic overviewForums overview