Search found 75 matches

by wolfwood2x
Sat May 23, 2009 3:51 pm
Forum: Coding Questions
Topic: sprite collision question
Replies: 5
Views: 1361

when you want a bounding wall, sprite collision is not the appropriate way to solve it.
you don't need the wall at all, you just stop by coordinates.


This would be a great solution if I only had 4 walls. But since it is intended to be a maze that seems like a daunting task. I guess I could make ...
by wolfwood2x
Sat May 23, 2009 2:37 am
Forum: Coding Questions
Topic: sprite collision question
Replies: 5
Views: 1361

sprite collision question

I am setting up walls for a 2d sprite to be bound in. The idea is to prevent the sprite from moving through a wall.

If KeyboardPushed(#PB_Key_A) Or KeyboardPushed(#PB_Key_Left)
Imagex= imagex-3
If SpriteCollision(0, imagex, imagey, 101, 103, 93)
imagex=imagex+3
EndIf
If SpriteCollision(0 ...
by wolfwood2x
Sat Aug 16, 2008 2:12 pm
Forum: Linux
Topic: Sprite problems in linux
Replies: 0
Views: 1319

Sprite problems in linux

So I am having a few issues using sprites in linux.
Specifically
Under pb 4.20 and ubuntu hardy

The issues I am having are:


useJPEGimageDecoder()

does not seem to work. If I try to load a sprite that works in windows it fails to load the sprite as if the image is not there. If I change the ...
by wolfwood2x
Fri Aug 15, 2008 7:33 pm
Forum: Coding Questions
Topic: n00b question: #Sprite Object not initialized
Replies: 21
Views: 4850

thanks again..
I appreciate all your assistance.
by wolfwood2x
Fri Aug 15, 2008 2:12 pm
Forum: Coding Questions
Topic: n00b question: #Sprite Object not initialized
Replies: 21
Views: 4850

There is no native linux client for irfanview and it does not natively run in wine either. You have to get a bunch of dll files from microsoft. I tried to accomplish the same feat using GIMP and I still have the same problem the decoder is unable to load the sprite successfully
:(

Also note that I ...
by wolfwood2x
Fri Aug 15, 2008 3:37 am
Forum: Coding Questions
Topic: n00b question: #Sprite Object not initialized
Replies: 21
Views: 4850

:shock: No... I just noticed I had not changed that. I moved the display into the loop and it showed up. Still have no idea why the jpeg wouldnt work.... thanks for your help
by wolfwood2x
Thu Aug 14, 2008 11:51 pm
Forum: Coding Questions
Topic: n00b question: #Sprite Object not initialized
Replies: 21
Views: 4850

Ok I tried a PNG and it did not display but I no longer got the error message. It is possible I was displaying it off screen. So is the jpg decoder bugged in linux?
by wolfwood2x
Thu Aug 14, 2008 6:53 pm
Forum: Coding Questions
Topic: n00b question: #Sprite Object not initialized
Replies: 21
Views: 4850

Alright I have verified that the issue is not the path to the image. I had it in the same directory with the pb file and even tried putting the full path to the image file there and I still get an error. If I use your code I get the no sprite man pop up message. I have also tried using a different ...
by wolfwood2x
Thu Aug 14, 2008 3:38 pm
Forum: Coding Questions
Topic: n00b question: #Sprite Object not initialized
Replies: 21
Views: 4850

Well the image and code worked under 3.9 I believe. But that was in windows and not linux. (you are correct I am working in linux now)I am porting over some old spike code to play with and re-learn this stuff. So unless it is no longer compatible the image should still be alright.

Since I am at ...
by wolfwood2x
Thu Aug 14, 2008 2:29 pm
Forum: Coding Questions
Topic: n00b question: #Sprite Object not initialized
Replies: 21
Views: 4850

4. Next time please provide more exactly problem information than "I am having a similar issue." Wink

Sorry I thought

The program dies on Display sprite and states that #Sprite Object not initialized.
Help me out here what am I doing wrong?

was pretty exact... What other details should I ...
by wolfwood2x
Thu Aug 14, 2008 3:26 am
Forum: Coding Questions
Topic: n00b question: #Sprite Object not initialized
Replies: 21
Views: 4850

the nitSprite was a cut and paste error it is actually correct in the code..

If I change it to OpenScreen instead it still does the same thing. The screen or window opens, it tries to load the sprite and then the program crashes and I get the error #Sprite object not initialized.
by wolfwood2x
Thu Aug 14, 2008 3:06 am
Forum: Coding Questions
Topic: n00b question: #Sprite Object not initialized
Replies: 21
Views: 4850

I am having a similar issue. It has been a while since I have tried to use graphics in PB and I am having a few issues remembering how to get this working.


nitSprite()
InitKeyboard()

OpenWindowedScreen(1, 2,2,800,600,0,0,0)

UseJPEGImageDecoder()

LoadSprite(1000, "image2.jpg", 0 ...
by wolfwood2x
Wed Aug 13, 2008 1:32 pm
Forum: Game Programming
Topic: linux linking errors?
Replies: 4
Views: 2671

:shock: Im a nub... i had the regular sdl lib installed and not the devel packages. Thanks guys
by wolfwood2x
Wed Aug 13, 2008 2:39 am
Forum: Game Programming
Topic: linux linking errors?
Replies: 4
Views: 2671

linux linking errors?

I tried to do some basic sprite spikes and when i have nothing more than
InitSprite()
OpenScreen(1024,768,16,"Window")

;--Sprite Loader--
LoadSprite(0,"level.jpg",0)
LoadSprite(2, "walls.jpg",0)

I get a linker error related to SDL_ShowCursor
I am using Ubuntu Hardy and PB 4.2 I double ...
by wolfwood2x
Sun Sep 16, 2007 11:57 pm
Forum: Coding Questions
Topic: problems multiselecting listview gadget
Replies: 1
Views: 873

problems multiselecting listview gadget

Hey guys. I am having trouble returning the value of multiple items that are selected in a list view gadget. I set coded this to spike out the listview gadget and it does not appear to function as I had thought after reading the description of it in the help file.


index=GetGadgetState(#list)
If ...