Amiga.org
Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: Omega Space Protons on November 01, 2010, 02:00:55 PM
-
HI guys, i am having problems again with my code. This time i am trying to move a ball so it bounces off the sides of the screen. However for some reason the ball isn't moving at all as if the application is frozen, but it isn't. I have double checked my code for typos and i can't seem to find any. Any help in this matter would be appreciated.
Omega Space Protons
-
Sorry to double post, but it seems 88 people have seen my thread yet not a single reply has been made.
Omega Space Protons
-
I don't know any C/C++, but have you tried posting on UtilityBase?
-
I don't know any C/C++, but have you tried posting on UtilityBase?
I'm glad you atleast Replied to my thread as having hundreds of people look at your thread and get no reply makes you want to have fits. Sorry to sound rude, it's just that when your developing games for an old system and no one is there to help you, you start to get depressed and think of quitting. Anyways what is UtilityBase and how do I access it?
Omega Space Protons
-
Here's a link: http://utilitybase.com/ (http://utilitybase.com/)
-
I'm glad you atleast Replied to my thread as having hundreds of people look at your thread and get no reply makes you want to have fits. Sorry to sound rude, it's just that when your developing games for an old system and no one is there to help you, you start to get depressed and think of quitting. Anyways what is UtilityBase and how do I access it?
Omega Space Protons
Could you be more of a whiner? ".. boohoo,... people have looked and havent automatically gone out of thier way to spend thier time to help me". What makes you so important that people should help at the drop of a hat ? You do realise that sulking like this isnt going to help your cause? I actually downloaded the sources last night and was going to help you when I got home today, but screw that,... not interetied in helping an ungrateful sulk now....
-
Could you be more of a whiner? ".. boohoo,... people have looked and haven't automatically gone out of their way to spend their time to help me". What makes you so important that people should help at the drop of a hat ? You do realise that sulking like this isn't going to help your cause? I actually downloaded the sources last night and was going to help you when I got home today, but screw that,... not interested in helping an ungrateful sulk now....
I apologise, I wasn't sulking just tired and frustrated as this system has been a pain to program. I didn't mean to take my frustration out on the Amiga community, i was just tired and cranky from trying to create my first Amiga game which I planned on releasing as open source so more games could be released for the Amiga to no avail.
Omega Space Projects
-
I've compiled this on my system and it tells me that the application is waiting for signals 0x40000000 to arrive.
Dave G
Edit: In fact if you comment out this line
signals = Wait(window_signal);
You will find the ball will bounce left and right as you wanted it to. BUT you can't close the window and on my OS3.9 4000D it will crash when killing the program.
-
You will find the ball will bounce left and right as you wanted it to. BUT you can't close the window and on my OS3.9 4000D it will crash when killing the program.
Before closing the window and freeing the associated resources, you should ReplyMsg() any IDCMP messages that have piled up using a simple while loop. If you want to be extra safe, you can also change your window's IDCMP flags first so that it can't receive any further messages.
-
That's weird cause the line:
signals = Wait(window_signal);
Is supposed to process all the signals a few lines after that there's a ReplyMsg() call which should cover the hanging 0x4000000000 signals problem. How do I reply to all IDCMP messages and also how do I prevent further IDCMP messages from occurring after the user closes the window?
Omega Space Protons
-
I think you need to call ModifyIDCMP(window, 0) to stop messages being sent to your window?
I am sure I saw an example for safe window closing in the "autodocs".
-
I think you need to call ModifyIDCMP(window, 0) to stop messages being sent to your window?
I am sure I saw an example for safe window closing in the "autodocs".
Asalaamu alaykum ya ukhti.
Long time! :)
-
That's weird cause the line:
signals = Wait(window_signal);
Is supposed to process all the signals a few lines after that there's a ReplyMsg() call which should cover the hanging 0x4000000000 signals problem. How do I reply to all IDCMP messages and also how do I prevent further IDCMP messages from occurring after the user closes the window?
Omega Space Protons
The problem is that the Wait command does just that - it sits and Waits - this is why your ball doesn't move.
The command you need to look into is GetMsg and the actual IDCMP flags you've got set.
Dave G :cool:
-
I think you need to call ModifyIDCMP(window, 0) to stop messages being sent to your window?
I am sure I saw an example for safe window closing in the "autodocs".
Sorry, I don't have the Autodocs on CD and don't have a link to the autodocs which provide examples only to the ones which have the function references :'(. Could you please post a link to the autodocs examples?
Omega Space Protons
P.S. Sorry for the late reply, I'm away at the moment and don't have access easy access to the Internet.
-
@Omega Space Protons
Buy this (http://www.softhut.com/cgi-bin/test/Web_store/web_store.cgi?page=catalog/software/development/new_amigadev.html&cart_id=8743296_30584). You won't regret it.
-
@Omega Space Protons
Buy this (http://www.softhut.com/cgi-bin/test/Web_store/web_store.cgi?page=catalog/software/development/new_amigadev.html&cart_id=8743296_30584). You won't regret it.
Done. Now I just have to wait for them to ship it and we're in business.
Omega Space Protons
-
Done. Now I just have to wait for them to ship it and we're in business.
Omega Space Protons
Well, it was certainly one of the best Amiga SW purchases I made. Even if you don't use the supplied IDE, the information on the CD is invaluable.
-
I'm glad you atleast Replied to my thread as having hundreds of people look at your thread and get no reply makes you want to have fits.
you should have chosen different title for thread, then.
-
Omega Space Protons
Congratulations on having the coolest user name ever. Ever.
-
It isn't really in the right forum, either. How about I move it to the development forum?
-
It isn't really in the right forum, either. How about I move it to the development forum?
Indeed, I first thought it was a medical complaint.
-
Oops sorry, didn't see the development forum. Thanks for the compliments about my username. By the way what is the correct way of using GetMsg() so the system doesn't wait for the dreaded 0x40000000 signal?
Omega Space Protons
-
I think the problem here is that you are waiting for the wrong stuff. You are waiting for an event to arrive. Under normal event-driven circumstances, that is the correct thing to do. However, your application is supposed to be constantly doing something, that is, animating the ball.
So, instead of waiting for an event to arrive, you should be waiting for the display refresh instead. Within that period, you iterate through the messages that have arrived at your port and perform any display updates that are required. There are a number of ways of doing this depending on whether or not you are running windowed, fullscreen or fullscreen with multibuffering.
For most fullscreen game applications, buffering is the norm since you don't want the user to ever see the items being drawn. There is a method of waiting using a "safe to switch buffers" message port that doesn't busy loop, unlike the somewhat simpler WaitBOVP() call (the latter doesn't always busy wait, in my experience, depends on the hardware it's running on).
Anyway, there is an example of how to use this type of buffering in the RKM on the developer CD that you have purchased.
-
Hey just an update, i just got an email message stating that my shipment is on the way. Is there any chance I could get a sneak peek of the "safe to switch double buffering" method, cause I would hate to wait a week for my CD to arrive before I can make any progress on my game.
Omega Space Protons