Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / TDEngine - Techdemo

Author
Message
PaTTE
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location:
Posted: 13th Feb 2011 23:58 Edited at: 18th Feb 2011 11:25
Hello again

I did encounter some problems with the design in my other engine used for the Top down shooter I was developing, mainly when trying to integrate multiPlayer. So I decided to rewrite it. I've now come so far that I'd like to post an WIP. I have thrown togheter a small "techdemo" MultiRoids an multiplayer asteroids like game, still without asteroids or shooting though

The Demo is attached below. It contains the Server and the Client executable so you can test it out.
Server is currently hardcoded to 127.0.0.1 so you can only host and connect from you own computer.



The engine consists of several modules. Most of the modules are decoupled from each other so they can be reused in other projects to.

GameState manager
- Creates and manages different game states. Menu, Game, Post game screens etc.
- Can pause states, switch state and resume states

A console system where you can type commands
- create and register custom consoleListeners.
The listeners then parse the commands typed and can react to them

Server/Client system
- using ENet (http://enet.bespin.org/)
- Dedicated Server
- gets input frpm the players and handles all calculations
- distributes the needed information to the players

Logging & Profiling
- Write result to file or show on console

DatabaseManagers
- can connect to databeses, run queries and return data
- Currently supported databases
- SQLite
- PostgreSQL

FileManager & ResourceManager
- read, write files
- manage loaded media
- instance already loaded resources

GuiModule
- Signal & slots system, the guiComponents can emit signals eg. when clicked or on mouseOvers and functions can be connected to the signals.
- Several components: Buttons, Editboxes, comboBoxes, CheckBoxes...
-Buttons, Custom shaped buttons with collision detection
- All components can use different effects.
-fading over time
-movement animation


Component based entity system:
- All gameObjects consists of an entity that can have several components attached to it.
These components give the gameObjects their properties.
- Component examples:
- RenderComponent = the entity is assigned a mesh and is rendered
- PhysicsComponent = the entity is included in the physics simulation
- SoundComponent = entity can emit sounds
- HealthComponent = entity has health, can receive damage...
- CameraComponent, LightComponent, MovementComponent, AIcomponent...
- The components can communicate with each other. A component can send an message to the
parent (the entity) which then passes this message to all it's other components.
Then the other components can react to this information also.

A scenario to describe this.
The physicsComponent registers that the entity hit the floor with X amount of force, a message with this info (x,y,z + normals and force) is sent to all of the entitys components. The soundComponent receives

this message and plays a sound with a volume proportional to the force. The same goes for the healthComponent but instead health is decresed proportional to the force. THe FXComponent creates a smoke puff or

sparks at the collision point. The lightComponent can't/doesn't care about this info so it just ignores the message.


So if you combine an CameraComponent + movementComponent you have an observer like entity
that can move around

If you combine an AIcomponent + movementComponent + LightComponent you have a light that can move around or follow the player


Screenshots


Ingame shot


The console


Main menu, test with custom shaped buttons

Attachments

Login to view attachments
PaTTE
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location:
Posted: 26th Feb 2011 23:51
Anybody tested the demo above?

Anyway I've been trying to complete the Gui module. I've completed most of the gui components that I will need. All components are customizable. Several colors can be set: Background, base, border, mouseOver. All components have separate fonts that can be adjusted: size, color, font, weight, italic. Now I need to find out a good way of handling the layout of the components.

There is a demo included for testing the feel of the gui.

Black gui scheme


White gui scheme

Attachments

Login to view attachments
Mr Kohlenstoff
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 27th Feb 2011 12:30
Now this GUI looks extremely nice. Quite similar to (but still better than) a GUI I made two years ago, but my input routines were pretty bad. What kind of font are you using? It looks better than the results I usually get with DBP's inbuilt text commands.

The module system sounds almost exactly like something I've done for the same game I made the GUI for, funny coincidence. Anyway, your system seems to be more powerful and well thought out* than mine, and the overall concept is very promising.

I haven't tested the Demo yet, but you really seem to know what you're doing and I'm looking forward to more news.
Maybe I'm going to test the game later this day, but I have to admit that these kinds of promises tend to not work out very well. We'll see.



[* to anybody being good at english - do you say "more well thought out", or "better thought out", or what?]

PaTTE
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location:
Posted: 28th Feb 2011 15:48
Thanks!

Did it work out well for you, the module based system?


I'm using the DirectX's ID3DXFont:rawText method for displaying text in my application.

Basically how the system is setup goes like this:
- Every guiComponent Label, Button, EditBox etc. has it's own ID3DXFont on which you can set fontFamily, size, color...
- When the component wants to draw itself it passes the ID3DXFont along with the other info needed like component position, size etc. to my GuiPainter class which then handles the drawing of the component
Alex_Peres
AGK Master
15
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 10th Mar 2011 14:20
Very nice thing!!!

But you demo not quite good works... It slows down my computer!!!

P.S. Need EditTextBox(for not just one row!), RadioButton, WindowTabs...

P.P.S. When will you show the code?
Para _Charlie
18
Years of Service
User Offline
Joined: 31st May 2006
Location: Wisconsin
Posted: 25th Mar 2011 18:44
Are you going to be releasing this gui some time Patte? I really like the work you did with pgui. I learned alot from looking over the code and just using it.

Like 30 different TGC products. Cause I get bored easy.
Asus P5Q MB, P3.0 dual core, 4gigs ram, SATA HD, GTX 260
Win 7.
PaTTE
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location:
Posted: 28th Mar 2011 21:34
Thank you for your comments.

Quote: "Very nice thing!!!

But you demo not quite good works... It slows down my computer!!!"


Does the program run slow also? I think I did not have any limit on the sync rate set when I compiled the demo so if you have vsync disabled it will render frames as fast as the computer possibly can i.e. it will run at 100% cpu leaving no extra cpu time to other application.

If I can manage to keep the engine modules separated all the way to the end I will probably release the ones that may be of some use to others e.g. gui & network modules, no promise though.
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 28th Mar 2011 21:52 Edited at: 28th Mar 2011 21:54
Quote: "But you demo not quite good works... It slows down my computer!!!"
Quote: "Does the program run slow also? I think I did not have any limit on the sync rate set when I compiled the demo so if you have vsync disabled it will render frames as fast as the computer possibly can i.e. it will run at 100% cpu leaving no extra cpu time to other application."

If you used dbps own box commands etc ? they do slow down alot!
I noticed than some of its 2d commands is awfull if you use them alot on screen at once!
I wrote an program that used them and had to switch to using sprites that i stretched to get the box shapes instead.

Ps..
i used paste sprite to draw them on screen.

Login to post a reply

Server time is: 2024-11-24 16:32:01
Your offset time is: 2024-11-24 16:32:01