Jump to content

  • Log In with Google      Sign In   
  • Create Account

Syerjchep

Member Since 23 May 2010
Offline Last Active Jan 14 2016 02:08 AM

Posts I've Made

In Topic: Need help finding which tile my cursor is in?

27 December 2015 - 06:40 PM

You can also treat it as just normal squares, and use an additional mask image. First, find the tile as normal, then use the mask image to determine if you need to offset you position.

This technique will also work with other tile shapes.

 

See this for more detail (described near the bottom).

This is pretty much what I ended up going with. It works beatifically, the code is understandable, and it takes just as long to run the code if I have 10x10 or 10,000x10,000 tiles. 


In Topic: SDLNet server can only accept one client at a time.

31 May 2015 - 11:07 PM

I'm not 100% sure, but I think you need to add the TCP socket to a socket set first, and then call SDLNet_CheckSockets on the set, which returns the number of ready sockets in the set, at which point you would then call SDLNet_SocketReady on the server socket, after CheckSockets indicates that something is happening on the socket. This seems redundant to me, but SDLNet introduces a few of its own ideas to the whole convention of sockets as is. Keep us updated smile.png

sd was added to serverSet before the loop and in clients[freeClient].createClient(tempSocket) tempSocket is added to its own set with only itself in it.

I might try making it all one big socket set though.

In Topic: 3d online sandbox world I'd like help testing!

28 March 2014 - 01:51 AM

Seems nice but did you just list "Shaders" as a graphical feature? How else would you render a game these days ? smile.png

Guess I meant this game uses GLSL and OpenGL 3/4 whereas my previous projects were OpenGL 1/2 with fixed function pipelines.
Most of your OpenGL tutorials and thus a disproportionate amount of indie-games using OpenGL use OpenGL 1/2 still.

Added some screenshots to the OP.

In Topic: OpenGL program doesn't start on other peoples computers.

27 March 2014 - 09:12 AM

OK, first run, default settings:

0	: Program started.
0.00	: 4 quotes read.
0.00	: Could not find prefs file, creating with defaults.
0.30	: del --- c2 out of scope --- 
OpenGL error: 1280
0.33	: OpenAL: No Error
0.33	: Networking initalized.
0.33	: Initalized.
0.33	: Using glew version: 1.7.0
0.33	: AMD Radeon HD 6450
0.33	: ATI Technologies Inc.
0.33	: 4.0.12430 Core Profile Context 13.152.1.8000
0.33	: 4.30
0.33	: Opengl version used: 4.0
0.33	: del --- c2 out of scope --- 
OpenGL error: 1280
Before shaders...
Shaders allocated.
Vertex shader length: 2230
Fragment shader length: 7481
0.33	: Compiling shader: shaders/StandardShadingVertex.glsl
v1
v2
v3
0.37	: Vertex Error Message Size: 0,0
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct null not valid
Second run, LOG_SHADERS 0 .................................. IT WORKS! smile.png
0.33	: Vertex Error Message Size: 0,0
0.33	: Compiling shader: shaders/StandardShadingFragment.glsl
0.34	: Linking program.
0.36	: 
8.38	: UDP opened, address resolved.
8.88	: UDP opened, address resolved.
9.38	: UDP opened, address resolved.
16.49	: Window closed!
16.49	: OpenAL: No Error
16.64	: 0 frames ran.
16.64	: 16.6419 current time.
16.64	: 16.643 seconds elapsed.
16.64	: 0 fps average.
0	: Ended program.

Wow man, thanks a ton!
Can't believe all this time it had nothing to do with OpenGL at all lol

In Topic: OpenGL program doesn't start on other peoples computers.

27 March 2014 - 08:41 AM

Okeydokey, here's the latest stderr:

0	: Program started.
0.00	: 4 quotes read.
0.00	: Could not find prefs file, creating with defaults.
0.31	: r loading model --- b3 out of scope --- 
OpenGL error: 1280
0.38	: OpenAL: No Error
0.38	: Networking initalized.
0.38	: Initalized.
0.38	: Using glew version: 1.7.0
0.38	: AMD Radeon HD 6450
0.38	: ATI Technologies Inc.
0.38	: 4.0.12430 Core Profile Context 13.152.1.8000
0.38	: 4.30
0.38	: Opengl version used: 4.0
0.38	: r loading model --- b3 out of scope --- 
OpenGL error: 1280
Before shaders...
Shaders allocated.
Vertex shader length: 2230
Fragment shader length: 7481
0.38	: Compiling shader: shaders/StandardShadingVertex.glsl
v1
v2
v3
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct null not valid
InfoLogLength is 0 perhaps?

This is actually extremely helpful.
Well, I uploaded a new version.
This time there's a new setting in settings.txt.
Change LOG_SHADERS to 0 then try launching it.

PARTNERS