Archived

This topic is now archived and is closed to further replies.

stodge

Habitat Game Engine v0.0.3 demo - comments welcome

Recommended Posts

Alrighty! Another major release. I''ve finally fixed the major bug in the GUI system that was annoying me! So the fixes (from memory are!): - pop GUI by name - fixed a silly bug in the timer system - removed version numbers for individual managers. Now only engines are versioned - fixed minor bug in log message generated when initialising the game engine - now using Unicode when entering text into a text field. This has made the GUI code much cleaner, though it still needs some work - now using key repeat when entering text into a text field (this may change if I find it reduces performance too much when not using the GUI; i.e. when moving the camera) http://prodigy.openglforums.com/downloads/HabitatDemoFull.zip So the plan for the next release is: - decide between rendering bitmaps for GUI frames and borders, or use a Decorator-like design pattern that you can configure in the main application. The current GUI is very inflexible (i.e. no theming) and ugly - complete the text field (and console input) component - find a new music composition for the demo Comments are welcome as always! Thanks

Share this post


Link to post
Share on other sites
How do you make the cursor able to go in and out of the window? I''ve been trying to do that but it doesn''t work. Thanks.

Share this post


Link to post
Share on other sites
You mean the application window? I''m using SDL for input, so I''m not doing anything special. If you didn''t mean that, then I don''t understand your question.

Share this post


Link to post
Share on other sites
What do you use to draw the cursor? I''ve been trying to draw a custom cursor using Direct3D but can''t get it to draw right.

Share this post


Link to post
Share on other sites
I''m not drawing a custom cursor. This is an OpenGL engine by the way, so there''s no DirectX support.

Share this post


Link to post
Share on other sites
If you really want to get fancy, allow some sort of very simple script that determines how to draw elements of the GUI. Then you just run those scripts and allow them to be changed.

~CGameProgrammer( );

Share this post


Link to post
Share on other sites
quote:
Original post by CGameProgrammer
If you really want to get fancy, allow some sort of very simple script that determines how to draw elements of the GUI. Then you just run those scripts and allow them to be changed.

~CGameProgrammer( );




I''m thinking of doing that but in the C++. Either using a decorator of sorts, or by rendering some Gui components as quads (e.g. a frame).

Thanks for your suggestion

Share this post


Link to post
Share on other sites
The gui interaction was very slow. I was only getting 17fps on my pentium 3 750Mhz. What a shame.

Share this post


Link to post
Share on other sites
It was perfectly fine for me with a similar CPU but the video card is more important. Besides using OpenGL for the GUI, the program also renders a 3D cube. What''s your 3D card?

~CGameProgrammer( );

Share this post


Link to post
Share on other sites
quote:
Original post by gregd
The gui interaction was very slow. I was only getting 17fps on my pentium 3 750Mhz. What a shame.


What''s your graphics card? I have a P3-700 + GeForce 2 GTS and I get 300+fps in 800x600x32 and 500+fps in 640x480x32.

Can you post the portion from the log about the OpenGL renderer?

Share this post


Link to post
Share on other sites
Good job


Got around 900 fps WITH the GUI rendered and about 800 without (just the box) ... about 300 with the help information



Pen3 900mhz
512mb ram
Radeon 9000 Pro
WinXP Pro



Share this post


Link to post
Share on other sites
heres the GL info:

*** Using video hardware acceleration
*** OpenGL Version 1.1.0
*** OpenGL Vendor Microsoft Corporation
*** OpenGL Renderer GDI Generic
*** OpenGL Extensions
GL_WIN_swap_hint GL_EXT_bgra GL_EXT_paletted_texture

This video card (Rage Mobility; for laptops) is pretty crappy, but still.. I don''t think it should be taking so long just to render a cube? (16-17fps). Many 3D games run fast enough. Maybe it''s trying to emulate some extensions in software. Not sure.

Share this post


Link to post
Share on other sites
Well I would point the finger at your card, especially as it says it''s using GDI. I''m not using any extensions, just plain vanilla OpenGL. What 3D games run ok on it? A friend ran it on his laptop and got low FPS values; I''ll find out what graphics card and processor he has.

Thanks for the info.

Share this post


Link to post
Share on other sites
Quake1, Quake2 & Quake3? What framerates do you get for those? Hmmmm. I''m using SDL, so maybe it isn''t initialising OpenGL properly. I''ll look into it.

Thanks

Share this post


Link to post
Share on other sites
I''d say I get pretty reasonable framerates. Quake3 runs a little slower than it should in higher resolutions (but it wasnt built for this kind of card anyway), but opengl-quake2 runs fine. i''d say quake2 runs at a stable 50fps, at least, and thats much much more than just a cube!

Share this post


Link to post
Share on other sites

2Ghz Celeron
Windows XP
256MB DDR RAM (533Mhz FSB, 2Ghz Memory Bandwidth)
GeForce4 MX420 AGP
Steady 60fps (my monitor''s refresh rate).

Looks cool, how close is it to being able to run an actual game? What are you''re plans for the game integration (something like half-life''s "custom game" mod system?).

Thanks, ~SPH

Share this post


Link to post
Share on other sites
quote:
Original post by ShmeeBegek

2Ghz Celeron
Windows XP
256MB DDR RAM (533Mhz FSB, 2Ghz Memory Bandwidth)
GeForce4 MX420 AGP
Steady 60fps (my monitor''s refresh rate).

Looks cool, how close is it to being able to run an actual game? What are you''re plans for the game integration (something like half-life''s "custom game" mod system?).

Thanks, ~SPH




It''s a long way from being used in a game. My to do list looks like this for the long run:

- Add some kind of theming for the GUI. This would either let you specify a quad for things like frames etc. or to use a Decorator like design pattern.
- Finish the scenegraph (doesn''t really do anything yet!)
- More work is needed in the scripting engine. For example I need to add code to compile the scripts to bytecode and load them instead of the source.
- Fix many, many bugs!
- Add error handling in many areas.

My first hope is to use the engine to write a simple wargame. But that''s along way off and I haven''t really finalised any plans.

Thanks



http://www.stodge.net - the powerhouse in personal commentary

Share this post


Link to post
Share on other sites
quote:
Original post by gregd
I''d say I get pretty reasonable framerates. Quake3 runs a little slower than it should in higher resolutions (but it wasnt built for this kind of card anyway), but opengl-quake2 runs fine. i''d say quake2 runs at a stable 50fps, at least, and thats much much more than just a cube!


Could you change the config file to set the depth to 16?

depth=16;

I doubt this will make a huge difference but it might. Also, I''m adding code to include a fullscreen option in the config file. Currently you can only set fullscreen by editing video.lua. This might make a difference as well, as I thought i read somewhere that OpenGL in a window isn''t always hardware accelerated.

Thanks

Share this post


Link to post
Share on other sites
Good job!

About 900-980 FPS without and 380-450 FPS with GUI (depending on cursor movement)
My specs: 1GHz Athlon, 1GB RAM, GeForce 3 Ti 500 card, Win2K SP2

About the laptop issue: with the GDI renderer you can be glad to have such framerates

gregd: IIRC the Quake series switches to a very fast software
renderer if your video card doesn''t match the requirements, thus
you get reasonable framerates (as your CPU is quite fast). The GDI renderer is just a very
slow implementation of the OGL framework and is not meant to be used for games (actually I don''t think it''s meant to be used at all).

Share this post


Link to post
Share on other sites
quote:
Original post by darookie
Good job!

About 900-980 FPS without and 380-450 FPS with GUI (depending on cursor movement)
My specs: 1GHz Athlon, 1GB RAM, GeForce 3 Ti 500 card, Win2K SP2

About the laptop issue: with the GDI renderer you can be glad to have such framerates

gregd: IIRC the Quake series switches to a very fast software
renderer if your video card doesn''t match the requirements, thus
you get reasonable framerates (as your CPU is quite fast). The GDI renderer is just a very
slow implementation of the OGL framework and is not meant to be used for games (actually I don''t think it''s meant to be used at all).




Thanks for the comment and the info. I wasn''t sure what to do about slow performance on the GDI, but now having read your post, I think I''ll do nothing.

So does performance drop to 380fps when you move the cursor? Is it that when you move it over components or just over blank screen? I''ll make a note and see if I can optimise that any. I didn''t realise that the GUI would drop rates so much. I don''t see much of a hit on my PC. Something for me to think about!

Thanks

Share this post


Link to post
Share on other sites
Alright, welcome to the first Linux demo of the Habitat Game Engine!

It''s a little rough around the edges in that it still kicks out some debug. I need to look into how to redirect stdout, as it doesn''t seem to work 100% yet, but that''s ok for now. I''m just looking for people who run Linux to try this out.

The only caveat that I can think of is that you need to have the SDL runtime libraries installed; version 1.25 (or 1.2.5?) should be fine.

The demo was compiled with g++ 3.2.2 running under Mandrake 9.1, so you will probably a distribution that is as recent as mine, simply to get the correct runtime C++ libraries (I think).

Also, the main music file doesn''t seem to work under Linux (FMOD thinks it has an invalid file format), so you wont get any music. You should hear the sounds when you use the buttons though.

Run the demo using the shell file testSDL.sh, as it sets up the load library path to pick up the shared libraries.

Anyway, if you try it and it works, let me know:

Linux distribution
FPS value, graphics card, processor

Keys:

escape - quit
f1 - help
f2 - test menu
tab - toggle console
wasd move the camera

Good luck and I''ll keep my fingers crossed!

Habitat Linux Demo

Thanks
Mike

Share this post


Link to post
Share on other sites