Search found 74 matches

by gss
Thu Apr 02, 2009 3:02 am
Forum: Programming
Topic: c++ virtual function problem
Replies: 3
Views: 1009

Re: c++ virtual function problem

Ahhh yes, of course. Made the change and it works as expected. Thanks so much!

- gss
by gss
Thu Apr 02, 2009 2:17 am
Forum: Programming
Topic: c++ virtual function problem
Replies: 3
Views: 1009

Re: c++ virtual function problem

OK, simplified my code into the following example app showing the problem. #include <iostream> #include <string> #include <list> using namespace std; class Item { public: Item() {} virtual void set_name (string new_name) { name = new_name; } virtual void display() { cout << "Item: " << name.c_str() ...
by gss
Thu Apr 02, 2009 12:48 am
Forum: Programming
Topic: c++ virtual function problem
Replies: 3
Views: 1009

c++ virtual function problem

Another noob c++ programming question. I'll ask it without the code first, but if the answer isn't obvious, I'll add the code I have two classes: class item (with virtual function display()) class test (derived from item, and with its own version of display()) Then I instantiate a bunch of item obje...
by gss
Sun Dec 28, 2008 6:02 pm
Forum: Programming
Topic: Multimedia Library
Replies: 3
Views: 992

Thanks guys. I definitely want to build a Win/Linux/Mac cross-platform app. My UI should be fairly simple; so no need for widget/event-based QT or GTK+. So it sounds like SDL and optionally openGL is a good choice for my app. I think I even know where I can find a good app to use for reference. ;)
by gss
Sat Dec 27, 2008 10:17 pm
Forum: Programming
Topic: Multimedia Library
Replies: 3
Views: 992

Multimedia Library

Is SDL still the library of choice for new projects? If y'all were starting over again from scratch would you choose SDL?
by gss
Wed Dec 24, 2008 4:14 am
Forum: Programming
Topic: Basic graphical game programming how-to needed
Replies: 14
Views: 3040

After spending some time learning some of the qt and gtk frameworks, I'm back with another noobish question.

How do you implement this variable framerate style of program 'while (1)' and use these event-based frameworks? Are they mutually exclusive?
by gss
Fri Dec 05, 2008 2:55 am
Forum: Programming
Topic: Basic graphical game programming how-to needed
Replies: 14
Views: 3040

That all makes sense. Fortunately I don't think I have to deal with accurate physical models and algorithms. In my case the ball really is physical; so it's hard to screw up its position. If I limit 'collision' points to grid intersection points, I'll only care about times when I know exactly where ...
by gss
Thu Dec 04, 2008 3:38 pm
Forum: Programming
Topic: Basic graphical game programming how-to needed
Replies: 14
Views: 3040

There's more. With timestamped input, you should process the input after every simulation step and not take the timer from the system timer, but from the input timestamp. In the ball moving example, you'll likely have several input events: t=2.00: ball at (4,6) t=2.01: ball at (5,7) t=2.02: ball at...
by gss
Thu Dec 04, 2008 1:46 am
Forum: Programming
Topic: Basic graphical game programming how-to needed
Replies: 14
Views: 3040

Anyway, yeah, timestamp input for sure, if you can. Yep, I can do that. I've implemented the real-time functions (switch/grid scanning, coil driving, light driving, etc) in an FPGA that communicates back to the host over USB. It's a simple matter to have the FPGA log a timestamp each time a switch/...
by gss
Thu Dec 04, 2008 12:59 am
Forum: Programming
Topic: Basic graphical game programming how-to needed
Replies: 14
Views: 3040

The other thing is, if you look through arma code (and discussions here on the forums), your issue is real. At some point, we had a bug where cycles would pass through walls, and the problem is similar to what you described. You have to check for that somehow, and when you find that the ball's posi...
by gss
Thu Dec 04, 2008 12:23 am
Forum: Programming
Topic: Basic graphical game programming how-to needed
Replies: 14
Views: 3040

Great response. Thanks for the detail. I'm sure I'll have a ton more questions, but a couple come to mind right away... Basically, you need a main game loop that runs in the main thread of the program. <snip> Get a time value at the beginning of the loop. You need millisecond resolution, however you...
by gss
Wed Dec 03, 2008 10:06 pm
Forum: Programming
Topic: Basic graphical game programming how-to needed
Replies: 14
Views: 3040

Basic graphical game programming how-to needed

Anybody know of a good how-to for writing a graphics based game? Specifically, I'm trying to figure out the timing structure of generating graphics frames. Should the game be based on a timing interrupt that occurs every x milliseconds, grab user input and game state, and draw a new frame? How is th...
by gss
Tue May 29, 2007 8:36 pm
Forum: Strategy
Topic: no sealing?
Replies: 129
Views: 42126

It has become apparent to me that some people just like to insult others and complain. Those people will find a reason, any reason, to do so. I don't know why they like to do it, but they do. When open players play against closed players (or vice versa), and the guy who dies is the type of person wh...
by gss
Tue Mar 06, 2007 5:03 pm
Forum: Programming
Topic: Input delay experiment
Replies: 27
Views: 10354

I am taking this into account. My LCD monitors (Dell 2001FP) seem to be on the slow end, if random research pages on the net can be trusted. Supposedly the processing lag is around 55-76ms. Other LCD's are much faster, some might be a bit slower. CRT's are much faster. To z-man's point, the advertis...
by gss
Sun Mar 04, 2007 11:15 pm
Forum: Programming
Topic: Input delay experiment
Replies: 27
Views: 10354

Hmmm... hadn't occurred to me before to test the difference between windowed and fullscreens modes. I was in a 1024x768 window before.

At fullscreen, my tolerance jumps about 10ms to 40-45ms.