Page 1 of 2
LOOK! (O O) My First wxWidget Application!
Posted: Tue Jan 24, 2006 12:15 am
by Davros
Hi everyone!
I am a Newbie to wxWidgets. Here is my first ever wxWidget application, and my first game since...erm...1984 (ish). It is my own reincarnation of a 1979 classic. May bring a dewy eye tear of nostalgia to some. Released under GPL. Version 0.1 (Alpha).
http://www.bigangrydog.com/download/celest.zip
A standalone Windows exe & Dev-C project are included. Still needs a little work. Haven't got sounds to work yet as I'm gonna have produce a wxWidget build with wxMediaCtrl. Comments, criticisms & feedback appreciated.
Here's a screenie:
Thanks
Posted: Tue Jan 24, 2006 7:52 am
by Jorg
This looks very neat! I like the older games more and believe the conceptual ideas behind games have not changed since the normal PC's took over the game consoles from the old days (almost all games are clones from older games). The old games there were mostly unique in their kind.
As for this, great piece of nostalgia work
- Jorgen
Posted: Tue Jan 24, 2006 5:17 pm
by buildere
Congrats! Should this work under linux too? (or Mac?)
Posted: Tue Jan 24, 2006 5:57 pm
by Davros
>Congrats! Should this work under linux too? (or Mac?)
It uses only generic C++ & wxWidgets. There are no special external libraries or Windows API calls. So in principle, yes. Although I have no experience with developing for Linux & Mac.
If you, or someone else, were able to produce a Linux or Mac build, I would be interested to see it and to know how you got on.
Posted: Wed Jan 25, 2006 3:57 pm
by T-Rex
Absolutely perfect design
Like it.
Posted: Sun Mar 05, 2006 6:54 am
by sourabh
Hi,
i am trying to get this code but I think the code is moved from there... Kindly specify from where can i get this code???
Posted: Fri May 05, 2006 3:46 pm
by Davros
>i am trying to get this code but I think the code is moved from there... Kindly specify from where can i get this code???
Yeah I moved it.
You can now get it from:
www.bigangrydog.com
Posted: Fri May 05, 2006 10:51 pm
by tierra
Wow, that is awesome! Very clean nice design. The music is a nice touch too
.
Posted: Thu May 18, 2006 12:00 pm
by HK
Hi Davros
I try iit for Linux. it works,but without sound.
I try compiler option got some errors:
g++ -c `wx-config --cxxflags` -DGAME_SOUNDS -DGAME_MUSIC -o base.o base.cpp
In file included from base.h:23,
from base.cpp:35:
gamepanel.h:84: error: expected class-name before '{' token
gamepanel.h:87: error: `wxMediaEvent' has not been declared
gamepanel.h:87: error: ISO C++ forbids declaration of `event' with no type
make: *** [base.o] Error 1
Hope some help.
regards.
Posted: Sun May 21, 2006 4:32 pm
by Davros
Hi HK,
>I try iit for Linux. it works,but without sound.
That's great news!
I have no experience with Linux, but I'm really pleased you got it working.
>I try compiler option got some errors:
g++ -c `wx-config --cxxflags` -DGAME_SOUNDS -DGAME_MUSIC -o base.o base.cpp
Do not pre-define GAME_SOUNDS or GAME_MUSIC in this case. This should omit all sound related code (including wxMediaCtrl) from the build.
As I say, I am not experienced with Linux, but it maybe the case that your build of wxWidgets does not fully include wxMediaCtrl functionality. Judging from the wx documentation, wxMediaCtrl seems a little bit more difficult to get working under Linux.
As for the other errors:
>gamepanel.h:84: error: expected class-name before '{' token
>gamepanel.h:87: error: `wxMediaEvent' has not been declared
>gamepanel.h:87: error: ISO C++ forbids declaration of `event' with no
>type
I've had brief look over my code, and I can't see anything that's obviously wrong--except the fact that this code derives from wxMediaCtrl. I would guess that the problem is related to wxMediaCtrl in your wx library under Linux (but I'm guessing).
However, if you do not pre-define GAME_SOUNDS then this code will be completely omitted from the project and shouldn't cause a problem.
Do you have a screen-shot of Celesteroids under Linux? Could you post it by any chance. I'd love to see it.
Thanks
other news...
LATEST CELESTEROIDS "NEWS"
Celesteroids now has a page of it's own at:
http://www.bigangrydog.com/celest/index.htm
The latest release 1.4 now includes a Visual C 2005 project. See the vc_readme notes with this project as I built Celesteroids with th "Multithreaded" option (as opposed to the "Multithreaded DLL" option).
Posted: Mon May 22, 2006 12:46 pm
by HK
':D'
I cannot load bmp file,so I change the code
#include "sample.xpm"
AboutWin::AboutWin(wxWindow* parent)
: wxDialog(parent, -1, _("About ") + GAMENAME + _("...")),
m_artworkBmp(wxBITMAP(sample))
so I cannot see space shuttle.
Thanks Andy Thomas and You.
PS:I don't know how to put png file on the forum.
---HK
--------------------------
OS : Linux i686 Federo
Posted: Tue May 23, 2006 11:04 pm
by Davros
HK,
>I cannot load bmp file,so I change the code
I suppose using a bmp was a little Windows specific. I'm not familiar with the XPM format. What would I need to convert a bmp image to XPM - GIMP or something?
>PS:I don't know how to put png file on the forum.
I believe you'll need to host it yourself.
Alternatively, just email it to me and I'll host and post it. I'll also put it on my website with a credit to yourself if you like.
You can get my email address from here:
http://www.bigangrydog.com/about.htm
Good stuff!
Andy
Posted: Wed May 24, 2006 11:39 am
by HK
I got the Space Shuttle!
AboutWin::AboutWin(wxWindow* parent)
: wxDialog(parent, -1, _("About ") + GAMENAME + _("...")),
m_artworkBmp(wxBitmap(Artwork))
From the wxwindows pdf Document
wxBitmap not wxBITMAP
Andy, would you please to try for Windows XP ?
Regards.
Hans
----------------------------
OS: Linux
WxWidgets: 2.6.3
Posted: Wed May 24, 2006 9:31 pm
by Davros
And here it is:
Celesteroids on Linux!
> m_artworkBmp(wxBitmap(Artwork))
> Andy, would you please to try for Windows XP ?
Will do in next version.
Thanks HK!
My highest ever score is 12,025!
Posted: Sat May 27, 2006 4:56 am
by HK
MainFrame *win = new MainFrame(GAMENAME.c_str(), wxDefaultPosition,
wxSize(DEFWIDTH, DEFHEIGHT), wxDEFAULT_FRAME_STYLE
/*wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX*/);
wxMAXIMIZE_BOX doesn't work for linux,
wxDEFAULT_FRAME_STYLE does well .
----------------------------------------------
Linux Fedora Core 4, g++ 3.4.2