Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 17 Feb 2006
Offline Last Active Nov 25 2013 12:59 AM

Topics I've Started

Why does GCC output a 'abstract virtual called from' warning.

30 September 2010 - 02:09 PM

I've been getting this warning with some new code:
warning: abstract virtual 'virtual void WSPhysicsComponent::initialize()' called from constructor

It's not a big deal, I know exactly why I'm getting it. What I don't understand, is why GCC feels the need to inform me of this. GCC won't let me allocate this base class for anything, so it's not like the constructor will be called from a class that still has the abstract form of the function. Maybe I'm just being too picky about it, but it really seems a bit unnecessary for GCC to inform me of. Is there a case where this can be worked around, and the abstract class can be constructed?

Thanks for any info,
-Wynter Woods

[Edited by - zerotri on September 30, 2010 8:29:32 PM]

Should I use XML

31 July 2010 - 09:49 AM

I've been searching lately for a format to use in my engine for holding entity data. Originally I had planned to use XML but I realized that all properties in XML are passed in as strings. The way I have my entity system set up I don't think this is the best way to be handling the input of my game's data. The way I have this set up is as follows:

entity.setProperty<CSString>("name", T("Some Cool NPC"))
.setProperty<float> ("hp", 75.0f);

And what I want to do is have the definition file look something like this:

<Property id="name" value="Some Cool NPC"/>
<Property id="hp" value="75.0f"/>

The problem with this is that in XML, all values seem to be entered in as strings.
My goal is to not have to make assumptions on what data types the developer is entering, so when a developer enters a string I want it to be clear that it is a string. For numeric values, how should I allow the developer to enter these and make it clear that they are in fact numbers as opposed to strings?

I'd be willing to try out other formats if there are better alternatives here.

Thanks for any help,
-Wynter Woods

[solved]Uint to Float conversion in C++

21 February 2009 - 05:10 PM

Lately I've been trying to write a solid set of C++ classes for writing games with, and have been doing fairly well. I've got a nice custom RTTI class which I use to handle events and can use for other purposes as well. I have run into a problem while trying to do some tests however, and although not a problem related specifically to my C++ classes, I've never had this trouble before. In writing a FPS counter, I used the following code:
float frameTime = (float) SDL_GetTicks();

now, from where this is called in my code, SDL_GetTicks returns around 500-600 in an unsigned integer, but when converted to a float and output to the console, I get the following number: 9.41757e+007 Is there another way I should be converting from uint to float here? Any help would be appreciated, -Wynter Woods(aka zerotri) [Edited by - zerotri on February 21, 2009 11:46:11 PM]

Recommendations for learning Pascal

25 May 2008 - 07:22 AM

Hello GDNet Users, I was wondering if any of you may have any recommendations for books or online tutorials for learning Pascal(OO or non-OO, both are fine). I've been working with C/C++ for a while, and I understand many OO concepts, and have been really interested in learning the language, and in an effort to finally teach myself, I have downloaded the FreePascal compiler. Now I've got a Pascal compiler, but a lack of understanding of the language itself. Anyone read anything that they really liked or that really helped them in learning Pascal? Any replies are appreciated. Thank you for your time, -Wynter Woods

Coroutines in C

19 May 2008 - 02:38 PM

I've been reading a bit about Coroutines in C, and have even tried out a couple of options for coroutine systems, including this one, but none of the code I've tried works. With that last mention, I can get the source code to compile in GCC with a modified version posted on the forums here, but the code always crashes during run. I also tried the Portable Coroutines Library, but it seems it's not quite as portable as the title would make you believe, and it doesn't seem to support GCC on Win32. So have any of you guys(and gals) dealth with coroutines before as an option to full-featured scripting languages? If so, which coroutine libraries do you like? If not, do you think I'd just be better off using a language like AngelScript for my game(which is what I currently plan on using if coroutines don't work out)? Any replies would be much appreciated. Thank you for your time, -Wynter Woods