Bomberman in xlib

A forum where you can announce your awesome project(s).

Moderator: MaxCoderz Staff

katmaster
Sir Posts-A-Lot
Posts: 252
Joined: Tue 09 Aug, 2005 9:34 pm
Location: south of the north pole
Contact:

Bomberman in xlib

Post by katmaster »

i just started making a bomberman in xlib. i would put up some screens but i cant figure out how to post them to the web. its my first real game for 83+ and any suggestions or ideas would be nice
cheese=yum
Image
User avatar
crzyrbl
Calc Wizard
Posts: 518
Joined: Wed 06 Jul, 2005 4:56 pm
Location: 3rd rock....

Post by crzyrbl »

good luck, and never use the bottom 8 pixels for sprites. i did that once :x ask if you nd any help :P
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.

Image
katmaster
Sir Posts-A-Lot
Posts: 252
Joined: Tue 09 Aug, 2005 9:34 pm
Location: south of the north pole
Contact:

Post by katmaster »

ok heres a screen of lvl 1. yah. im still working on movement and if all goes well, should be done tommorow. im not sure how to make sure he cant go though walls yet. any suggestions?

Image
cheese=yum
Image
necro
Calc King
Posts: 1619
Joined: Sat 26 Mar, 2005 2:45 am
Location: your shadow

Post by necro »

check using the [A](Column,row)->Variable to find out if what your character is moving into is a wall, open air, a bomb, ect. and if neede, prevent him from moving though it
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

are you using a matrix for the map, if so, do what necro said

Code: Select all

[A](x,y)->B
if b(doesnotequal)0
then
go back to pos before
end
hm i didnt really explain that well. if you dont get it, try me tomorrow when im coherent.
Image
necro
Calc King
Posts: 1619
Joined: Sat 26 Mar, 2005 2:45 am
Location: your shadow

Post by necro »

in basic, the matrices go y,x as opposed to x,y...a source of many errors I have recieved over the time I have been programming[/quote]
User avatar
crzyrbl
Calc Wizard
Posts: 518
Joined: Wed 06 Jul, 2005 4:56 pm
Location: 3rd rock....

Post by crzyrbl »

or better yet...

Code: Select all

........your code......
getkey->K
X+(K=34)-(K=25->A
Y+(K=26)-(K=24->B
if 0 = [A](A,B
then
A->X
B->Y
end
.......your code......
Last edited by crzyrbl on Tue 16 Aug, 2005 6:09 am, edited 1 time in total.
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.

Image
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

bahleted cause what i wrote is now obselete. and i response to the post below (wierd) i avoid x and y cause they can get messed up by the graph screen. i use z and theta.
Last edited by threefingeredguy on Tue 16 Aug, 2005 6:11 am, edited 1 time in total.
Image
User avatar
crzyrbl
Calc Wizard
Posts: 518
Joined: Wed 06 Jul, 2005 4:56 pm
Location: 3rd rock....

Post by crzyrbl »

i use x,y in basic...
y 1 16
x
1



8
Last edited by crzyrbl on Tue 16 Aug, 2005 6:44 am, edited 1 time in total.
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.

Image
necro
Calc King
Posts: 1619
Joined: Sat 26 Mar, 2005 2:45 am
Location: your shadow

Post by necro »

crzyrbl wrote:or better yet...

Code: Select all

........your code......
getkey->K
X+(K=34)-(K=25->A
Y+(K=26)-(K=24->B
if 0 = [A](A,B
then
A->X
B->Y
end
.......your code......
if he is using xlib app, and he used your code, his map would be read at a 90 degree difrent form what the screen would show because Xlib reads row/column but the matrice comands are column/row


getkey->K
X+(K=34)-(K=25->A
Y+(K=26)-(K=24->B
0=[A](B,A->C
X+A(C->X
Y+B(C->Y

by the way, that is bigger but I believe it is faster (wish there was some kind of definative way to clock a routine in a basic program)
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

put a pause at the beginning of the routine and a Pause "Done" at the end and time it on a stop watch.
Image
DarkerLine
Calc Wizard
Posts: 526
Joined: Tue 08 Mar, 2005 1:37 am
Location: who wants to know?
Contact:

Post by DarkerLine »

getkey->K
X+(K=34)-(K=25->A
Y+(K=26)-(K=24->B
0=[A](B,A->C
X+A(C->X
Y+B(C->Y
Won't work. When A is 0, you end up using X and Y twice, what you should do is
(K=34)-(K=25->A
(K=26)-(K=24->B
not([A](Y+B,X+A->C
X+AC->X
Y+BC->Y

And keep in mind that this works in the generic situation, but there will probably be a way to optimize this given the code around it.
just try to be nice to people.
_________________
My TI Blog - http://mpl.unitedti.org/
katmaster
Sir Posts-A-Lot
Posts: 252
Joined: Tue 09 Aug, 2005 9:34 pm
Location: south of the north pole
Contact:

Post by katmaster »

i didnt use the tilemap thing on it due to the fact i dont totally understand how how the matrices work with it. is it like: 0=dont draw and 1=draw tile or what?
cheese=yum
Image
necro
Calc King
Posts: 1619
Joined: Sat 26 Mar, 2005 2:45 am
Location: your shadow

Post by necro »

DarkerLine wrote:
getkey->K
X+(K=34)-(K=25->A
Y+(K=26)-(K=24->B
0=[A](B,A->C
X+A(C->X
Y+B(C->Y
Won't work. When A is 0, you end up using X and Y twice, what you should do is
(K=34)-(K=25->A
(K=26)-(K=24->B
not([A](Y+B,X+A->C
X+AC->X
Y+BC->Y

And keep in mind that this works in the generic situation, but there will probably be a way to optimize this given the code around it.
yeah, little mess up...and the code executes to fast to time it with a watch very well...I suppose I could try to run two pindurs and start them simulataneously (via virtual link) and see which is faster that way...

and katmaster, a matrice is where you store the tile map info for Xlib...it has columns that go up and down, and rows across. You 'ask' the player (via Getkey) if they would like to move a direction (which it sounds like you allready have done) and you can check the matrice (wich the data to draw your screen) to see what variable you character will move onto, and prevent him from walking through walls...so, player signals character to move, you check matrice, if the matrice has a wall where your char is moving, he doesn't move
DarkerLine
Calc Wizard
Posts: 526
Joined: Tue 08 Mar, 2005 1:37 am
Location: who wants to know?
Contact:

Post by DarkerLine »

Sir Robin a.k.a. DarkerLine's ULTIMATE 1337 TI-Basic Comparison Timer

Disp "Timing Routine 1
For(I,1,1000
FOO
End
Pause "Routine 1 Ended
Disp "Timing Routine 2
For(I,1,1000
BAR
End
"Routine 2 Ended


Get yourself a stopwatch.

P.S. There's no such thing as a 'matrice'. It's called a matrix.
just try to be nice to people.
_________________
My TI Blog - http://mpl.unitedti.org/
Post Reply