Author Topic: BYO games plugin :)  (Read 41384 times)

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: BYO games plugin :)
« Reply #30 on: June 16, 2006, 09:39:38 pm »
I'll try to do all updates / fixes after weekend because my friend is going to marry tomorrow.
It's time to party  8)

Hello,

Congratulations to your friend :).

I have tried on Ubuntu Dapper (rev2577, wxGTK 2.6.1, GCC 4.0.3) and it does not work too (only the P for Pause works).

Anyway, enjoy the party and do not stress too much for an update. We can wait some days, or :)?

Best wishes,
Michael

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5188
Re: BYO games plugin :)
« Reply #31 on: June 16, 2006, 10:11:45 pm »
same problem on suse 10.1 (64bit)
- here I even have more problems (maybe driver of graphics card)
- blocks leave a trail (they color every position they passed)
- background is not black

note : Cb itself does not look that sparkling on suse (well at least in my install)

Question : how do I create a screenshot of the active window/application ??

screenshot added : does not look so nice :-(

[attachment deleted by admin]
« Last Edit: June 16, 2006, 10:27:18 pm by killerbot »

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: BYO games plugin :)
« Reply #32 on: June 16, 2006, 10:14:28 pm »
Question : how do I create a screenshot of the active window/application ??

Hello,

I do not know on Suse, but on Gentoo and Ubuntu there is under Desktop a Take Screenshot. Never try it, anyway :).

Best wishes,
Michael

Offline TheTuxKeeper

  • Regular
  • ***
  • Posts: 293
  • daniel2000
Re: BYO games plugin :)
« Reply #33 on: June 16, 2006, 10:15:24 pm »
Question : how do I create a screenshot of the active window/application ??
You can use ksnapshot. It provides three or four options what to get on the screenshot.

EDIT: It should be, if installed, under Utilities/Desktop in the K-menu
EDIT2: It's part of the kdegraphics3 package ;)
« Last Edit: June 16, 2006, 10:19:03 pm by daniel2000 »
Nightly builds for openSUSE

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Re: BYO games plugin :)
« Reply #34 on: June 16, 2006, 10:29:29 pm »
And bugs with keyboard handling on linux may be caused by unusual keyboard processing. I use ::wxGetKeyState() for arrows which should work fine. But processing is started fomr EVT_CHAR event and here may be the problem. In windows wxWANTS_CHARS flag had to be added to process extra keys. wxGTK may be incompatible with wxMSW here. Does anyone have any experience with processing Char/Key events for arrow keys ? (I tried EVT_KEY_DOWN but it seemed not to process extra keys or use internal system key codes, but it may also be my bug becuase it was 2.00 AM ;))
I don't think that the keyboard processing is the problem. I just replaced the wxGetKeyState calls by a call to event.GetKeyCode() and used the keys A, S, D and W for navigation instead of the arrow keys. Nothing changed - the game respondes to the key P but not the others. As the way the keycode is checked was the same for alle 5 keys I don't think that the keyboard processing causes the problems. Anyway, I don't know what it is yet, too...
After more investigation I found out that wxGetKeyState doesn't work on Linux. I have no idea why but this seems to be the problem.
This is not difficult to solve in byoCBTrisContent::OnChar because wxGetKeyState(WXK_UP) can be replaced by event.GetKeyCode() == WXK_UP and so on - this works. But the real problem exists in byoCBTrisContent::UpdateChunkPos: How could these call to wxGetKeyState be replaced?
« Last Edit: June 16, 2006, 11:21:49 pm by Der Meister »
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

Offline BordRider

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: BYO games plugin :)
« Reply #35 on: June 17, 2006, 12:08:50 am »
P4 3.2G w/2G RAM, WinXP Pro:

30% processor usage
wow

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: BYO games plugin :)
« Reply #36 on: June 17, 2006, 07:04:58 am »
Offtopic about CPU usage:

P4 3.2G w/2G RAM, WinXP Pro:

30% processor usage
wow

1.6 Pentium M w/1GB Ram, Ubuntu Drapper

Spikes to 100% usage while editing text:  wow

Neither Scite or wxStEdit text editor have usage that bad.  The wxStEdit  editor is hard on the processor but not as bad as CB.  For comparison its faster to edit text file in Eclipse than in CB!

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: BYO games plugin :)
« Reply #37 on: June 17, 2006, 12:17:35 pm »
Neither Scite or wxStEdit text editor have usage that bad.  The wxStEdit  editor is hard on the processor but not as bad as CB.  For comparison its faster to edit text file in Eclipse than in CB!
I believe the previous post related to the tetris game rather than editing. ;)

Anyway, it's been said before, but I'll repeat this any time. Many weeks ago, I suspected that this CPU usage may come from many update_ui messages (which seems plausible if you look at their number). I made a patch and asked the people who were suffering from particularly high CPU usage to test it and verify if the patch made anything better. Michael even made a binary build for everybody's convenience.

User follow-up was ZERO.

Thus, if everybody just keeps saying "this sucks" but nobody is willing to invest 3 minutes to help confirm a probable cause, then honestly, I can only reply "well, then it is not important".

Code::Blocks uses update_ui messages to keep the state of the menu items and toolbars in sync. The code changes necessary to do without these would be massive. You will understand that I am not starting such an endeavour based merely on a vague idea that it might possibly have to do with a problem.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: BYO games plugin :)
« Reply #38 on: June 17, 2006, 04:40:18 pm »
Thomas, if you are talking about this post.  I tried that and it has no effect.  Which kind of makes sense because I don't think cbEditor had any.  I will continue the discussion in that thread.

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: BYO games plugin :)
« Reply #39 on: June 19, 2006, 03:18:30 pm »
Thanks Byo, great plugin, great game as well !

with the actual project setup i got problems during debugging, therefore i've changed the
"working dir" and "host application" pathes in the project file

also i've added to rotate clockwise when Shift-key is pressed together with the UP-key

added some Guidelines too



if someone is interested, here's the patch
[edit] patchfile removed, newer one added in later posting
« Last Edit: June 20, 2006, 03:03:58 pm by tiwag »

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: BYO games plugin :)
« Reply #40 on: June 20, 2006, 12:18:17 pm »
thanks byo ;-) for your heavy mods from yestaerday,
which made my patch quite useless a few hours after publishing ...  :lol:

here is the patch modified to work with the present actual svn version rev 2584

any comments ?

[edit] patchfile removed, newer one added in later posting
« Last Edit: June 20, 2006, 02:51:19 pm by tiwag »

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: BYO games plugin :)
« Reply #41 on: June 20, 2006, 01:38:26 pm »
Ok, some major changes in games plugin. It has back-to-work timer included in base game class.
More than 10 minutes of play does force pause for one hour. Additionally after 3 hours of work it does remind to take a break :)

Another thing is that I've made it working on linux (no overdraw / keyboard problems) but I've had troubles with key-up event. It's sometimes called with quite delay (I haven't figured why) making the game to behave like with broken keyboard where keys stay down when pressed.

thanks byo ;-) for your heavy mods from yestaerday,
which made my patch quite useless a few hours after publishing ...  :lol:

here is the patch modified to work with the present actual svn version rev 2584

any comments ?

For me, additional guidelines make game easier ;). It's good to sometimes put chunk in wrong position and try to fix that ;). I propse to add this as game option. But as far as there's no option system, it will be added with delay.

with the actual project setup i got problems during debugging, therefore i've changed the
"working dir" and "host application" pathes in the project file

What settings do you use ? I usually start debugging C::B project instead of plugin's one. But if there's easier solution why not use it ;)

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: BYO games plugin :)
« Reply #42 on: June 20, 2006, 02:04:52 pm »
For me, additional guidelines make game easier ;). It's good to sometimes put chunk in wrong position and try to fix that ;). I propse to add this as game option. But as far as there's no option system, it will be added with delay.
i propose to implement a Hot-key ( Shift-Q for example ) to toggle the GuideLines display, i use the Shift-key combination,
because i always have one finger on the left Shift key to toggle the rotation-direction if needed, when pressing the UP key.


What settings do you use ? I usually start debugging C::B project instead of plugin's one. But if there's easier solution why not use it ;)

with the configuration you've used in your project setup

working_dir ="..\..\..\devel"
host_application = ".\codeblocks.exe"

the debugger gets confused with the needed path to codeblocks.exe (at least it occurred for me)


my project settings are also in the patch, they are

working dir = "."
host_application   = "..\..\..\devel\codeblocks.exe"

then you can start debugging directly from the byogames project.



Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: BYO games plugin :)
« Reply #43 on: June 20, 2006, 02:50:04 pm »
ok, next patch, which applies to svn rev 2586 and
uses the Hot-key "g" or "G" to toggle the Guidelines display.

:D

[attachment deleted by admin]
« Last Edit: June 20, 2006, 05:54:42 pm by tiwag »

sethjackson

  • Guest
Re: BYO games plugin :)
« Reply #44 on: June 20, 2006, 07:51:01 pm »
Umm there is a not so nice problem with this plugin.......

Here is what I did.

1. Plugins -> BYO Games -> C::B-Tris -> Play.
2. Right click on the C::B Tris tab -> Close.
3. I started coding.
4. After 10min I get this message box telling me to get back to work. :P I hit Ok. (I'm not even running the game). I get this message box over, and over (yea I could check don't annoy me but I don't). Close C::B.
5. Re-start C::B.
6. Access violation......

Anyways the message box is the bug. I wasn't even playing the game, and it told me to get back to work.  :lol:

I guess the access violation could be a bug too.

I was using this nightly.

http://forums.codeblocks.org/index.php?topic=3378.0

With wx 2.6.3.