Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 16 Nov 2010
Offline Last Active Jul 03 2015 05:10 PM

Posts I've Made

In Topic: Combination n choose 2 - multithreading

23 June 2015 - 10:01 PM

Working with threads is really 3 things:
Do I need a new thread?

If you passed #1, #2 & #3 needs some form of locker. You can not write while reading and vice versa.
This could be as:
void Write( Obj o )
If not locked

void Read( Obj o )
If not locked

Or expand to something actually useful.

In Topic: what really get and set do?

23 June 2015 - 09:52 PM

Here's another approach:
public String CharName { get; private set; }

Which allows public return, but prohibits assigning outside the class.
Get/Set is just a quick 'macro'. It basically points to a data type in a class/struct.

In Topic: Hi there, freshman here =]

19 June 2015 - 09:51 PM

Programming is logic. Period.
Video games are logic. Mostly.

You won't really touch integrated GUI's (eg Win32), you will create your own. Like I said, logic. That's all a GUI is in the core. For a button, you click, then an 'event' happens.

As for visual, you'll need to understand OpenGL, it works like a pair in Java. You'll learn about buffers, memory management, textures/sprites, and let's not forget pulling hair out. To start, learn what versiom of OpenGL your system is running, then start on Google. Im sorry, but OpenGL likes to change drasticallt in each revision and much differs here and there.

In Topic: Chunk-based random world generation à la Minecraft

19 May 2015 - 10:45 PM

You won't be able to generate the array for your world, create the lighting and vbs ibs in one pass. Sure, you could, but don't. Nasty results. Generate and create obvious lighting first (eg --y and set sunlight to 0 if block is overhead)
Then loop and run your lighting. Then throw away useless faces while creating your buffers. Create an initial section (eg 68 chunks) then light/create as you gain closer and remove as further.

Ditch the heightmap if you want cliffs and overhangs. Slightly modify perlin as needed. This is the most difficult part of these games. Don't get discouraged, read and test.

Split your world into 'chunks'. 1 draw call consisting of 300 16x128x16 chunk blocks is deadly. 300 * (16x128x16) draw calls is idiotic.

Sorry, phone sucks for typing.

In Topic: How to time bomb a beta?

07 April 2014 - 10:13 PM

Hidden RDTSC instruction - Awaits if a debugger is present. Basically is just a hidden windows timer, akin to GetTickCount, but screwed up in the byte code.



Runtime functions - Use VirtualProtect (or similar for your OS) and implement it. Is a lot of fun and you'll learn a lot.


Implement a random obfuscation virtualization environment. Hard, but not as hard as one would perceive. You'll just need to dive into the PE format (agian, for your OS, mine is Windows..), it's honestly quite intriguing.