Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 30 Aug 2011
Offline Last Active Jul 27 2014 11:03 AM

Topics I've Started

3D object movement with mouse

07 March 2014 - 02:45 AM

I started to make 3D game. I have free camera (can move anywhere, look everywhere, but not roll), and I have objects. I want to move objects with mouse. Objects Y coordinates I changing with mouse wheel. So what I just need, that mouse X and Y screen position (or delta position) move object on X and Z axis. 
If my camera would be locked, then objectPosition+=mouseDelta would work something like what I want, but problem is what I don't have locked camera. But I have angle on Y axis rotation, so maybe that could help?
I'm using XNA, if that means anything

C# 3D engine and Oracle database

01 March 2014 - 04:24 PM

Hello, for my studies/work I need to create 3D simulator, which gets data from Oracle database and shows it in 3D. There is a chance that the simulator will be commercial. So in other words: I need to do research with small demo to show possibility for doing this kind of project. 
First thought was Unity3D, but spent some hours to try and I didn't founded any possible way to connect. Or am I wrong? 
Or maybe anybody could suggest good 3D engine with which would be possible to connect to Oracle? I prefer C# language, if it's is possible. 

Some questions about making multiplayer game

12 October 2013 - 02:55 AM

Hello, everyone. And I'm again here. Maybe needed come earlier... But... :)
In my mind for some time is mind about multiplayer model. How all logics compiles? How distribute your info to other players? 
I want something like "Little Fighter 2" multiplayer. As I good remember, there you start game and other players just type server (yours IP) and connects. What goes after that? Other players running, and how they send to all other? Via server or directly?
For now I was possible to make game for 2 players (server and client), but there was only movement. No more actions. Then went to make better engine code, and forget about network support, so now need re-make it. And closest model, what I want is from LF2. So maybe somebody could say how it works? :)
And there is list of small questions:
1. How identify clients? On connection every player send their IP (and/or mac)? But testing on same PC would be very hard...
2. On new player connection, he must get all current game info. So server on getting new client, send all other clients info to him?
3. How make server to be client? Now I made that on starting game, he tries to connect to my ip. If can't, then he becomes server. But maybe other approach could be used? Starting server, it goes as some sort of service, which will be in other thread? 
4. How send info between players? As I understand, best would be via server. Player sends to server, and server resend to other player.
5. How handle new object creation or old destruction? client3 shoot bullet, that killed monster. How to do it??
6. I have founded somewhere that clients could just send just what buttons they pressed. So every client goes very light (only input and displaying), but server must do with all calculations, so he will be pretty heavy. It's good approach to making multiplayer game? I thinking about 4 players support...
7. All NPC/mobs logic must be on one pc? Server? Or all clients have their owns, and just on killing sends info to other players about that? But this question is something like 5 and 6 together :)

Component-Entity-System implementation

03 October 2013 - 07:47 AM



I'm trying to implement this systems, because inheritance has bored... I have done this in C# by finding code and changing for my needs. But on C++ I can't find any good example what I want.


I created basic Component class. Made some new class from it (SpriteComponent and MovementComponent). Now in Entity I want create list of components. But just don't know how to find it.


What I looking for is 3 methods and data structure for holding components .

  1. AddComponent(Component * component); would use it like player.AddComponent(new SpriteComponent(20,30));
  2. GetComponent(...); would use it like player.GetComponent<SpriteComponent>();
  3. RemoveComponent(...); would use it like  player.RemoveComponent<SpriteComponent>();


Could anybody say how to implement this thing?


DirectX 9 alternative way to draw image

25 September 2013 - 09:43 AM

Hello, maybe anybody could help with drawing images on screen? smile.png


Now using D3DXCreateTextureFromFileEx: loading LPDIRECT3DTEXTURE9 by file name, width and height. And later using texture with LPD3DXSPRITE.Draw(texture,rect,center,position,color). But if I change rect size, texture don't scale, just stretching in wrong way (https://www.dropbox.com/s/pn6920yar2o4kat/2013-09-25%2018_35_06-APPTITLE.png: normal image, increased width, increased height).


Am I doing something wrong? Maybe my way don't let change width/height after image is loaded? Maybe where is another way to draw images?



There is loading texture loading code:

	D3DXIMAGE_INFO d3dxImageInfo;
			D3DCOLOR_COLORVALUE(1.0f,0.0f,1.0f,1.0f), //ignores 255;0;255 - dark pink
			ErrorHandler::ShowError("Loading texture failed");

and drawing code:

			_sprite->Draw( sprite->Texture()->Texture(),//LPDIRECT3DTEXTURE9 is loaded from method above