Minecraft Windows 10 Beta

imagine all the memory leaks and poor performace when a noob tries to code a plugin/mod

Donā€™t think modding will get away from java fast because it should be way harder to decompile/deobfuscate and mod PE than regular MC.

Thatā€™s with all languages doesnā€™t matter if itā€™s java, C, C++, GoLang, etcā€¦ bad code is bad code.

it does, java is quite idiot proof

ā€¦ Iā€™m going to leave this thread for my own sanity

2 Likes

ā€œNo Mods Right Nowā€

  • Every major game company ever
1 Like

ā€¦wut? Hā€¦ How?

1 Like

Alright, let me start my minecraft mod,

[code]import *;

public anit.void();
make.majic();

anit();
[/code]

1 Like
  1. Forgetting to remove old entries in maps/arrays/lists = memory leak.
  2. NullPointerExceptions.
  3. import java.*;
  4. Making everything static.

Just to name a few.

3 Likes

Well take a look at my C Code:

int(*pf)(void);int f(void) {pf = &f;pf = ***f;pf();(****pf)();(***************f)();}

For anyone wondering this actually valid C code, and can compile.

1 Like

Is C++ good (I know this is a very opinionated question)? I havenā€™t took the time to officially learn it, I just know some C. So is this a good thing if itā€™s in C++, will plugins still be able to be createdā€¦ Could Minecraft possibly be fasterā€¦ Less bugsā€¦ Any features that C++ has that Java doesnā€™t have to allow this?

I think itā€™s a great thing because then I get to know more languages, and making plugins is a good way to learn (after you get the basics down, of course)!

LOL Pointer Caos

To answer your question. As a true bled C++ Programmer I can confirm all of this.

Plugins will be created, it will be faster. Guaranteed, it may still be lagging, and those will come down with time. As MS will probably not doing things perfectly. The difference is C++ is working with a lot lower level. This can bring around a lot more bugs, but also gives you tons, and tons of more control. Which allows you to get some of the fastest code around. However if you donā€™t take advantage of the lower level stuff youā€™ll never see itā€™s full power. C++ will be a lot harder to develop with not only for the reasons above, but many others. C++ is the most powerful in the right hands. I still learn faster ways to do things.

To make a point. Hereā€™s how you convert an int to a float in java:

float f = (float) 1;

or:

float f = 1f;

However in C++ taking advantage of lower levels of memory I can convert much much faster as such:

	//Let's be precise for int conversion hmmm?
#if COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1400
#pragma float_control(push)
#pragma float_control(precise, on)
#endif
#include <stdint.h>

 int float2int32(const float value) {
#if !defined(X64) && COMPILER == COMPILER_MICROSOFT && !defined(USING_BIG_ENDIAN)
		int i;
		__asm
		{
			fld value
				frndint
				fistp i
		}
		return i;
#else
		union { int asInt[2]; double asDouble; } n;
		n.asDouble = value + 6755399441055744.0;

		return n.asInt[0];
#endif
	}
3 Likes

C++ isnā€™t super fast because itā€™s ā€˜omg urmazingā€™.

Itā€™s fast because itā€™s a low-level language and, as such, needs less conversion for the machine to understand it.

3 Likes

The main reason for a windows10 store version of minecraft is windows phones + the windows xbox unification that will likely happen at one point.

Iā€™d be really interested to see if it allows you to play worlds with xbox friends.

1 Like

Well the conversion isnā€™t the only reason but yes. This is what I was trying to point out. Itā€™s better because itā€™s lower, and as such much more messy for those who are trying to get in it.

Such as 15 lines to convert an int to a float? :stuck_out_tongue:

Well yea but soooo much faster :wink: Gottta go fast! (And actually I left out the defines for compiler types, and such sooooo you can have those too:

#define PLATFORM_WIN32 0
#define PLATFORM_UNIX  1
#define PLATFORM_APPLE 2

#define UNIX_FLAVOUR_LINUX 1
#define UNIX_FLAVOUR_BSD 2
#define UNIX_FLAVOUR_OTHER 3
#define UNIX_FLAVOUR_OSX 4

//Check current platform running on
#if defined( __WIN32__ ) || defined( WIN32 ) || defined( _WIN32 )
#  define PLATFORM PLATFORM_WIN32
#elif defined( __APPLE_CC__ )
#  define PLATFORM PLATFORM_APPLE
#else
#  define PLATFORM PLATFORM_UNIX
#endif

#define COMPILER_MICROSOFT 0
#define COMPILER_GNU	   1
#define COMPILER_BORLAND   2

//Check compilier
#ifdef _MSC_VER
#  define COMPILER COMPILER_MICROSOFT
#elif defined( __BORLANDC__ )
#  define COMPILER COMPILER_BORLAND
#elif defined( __GNUC__ )
#  define COMPILER COMPILER_GNU
#else
#  define COMPILER
#endif

//Integer types woohoo!
#if COMPILER != COMPILER_GNU
typedef signed __int64 int64;
typedef signed __int32 int32;
typedef signed __int16 int16;
typedef signed __int8 int8;

typedef unsigned __int64 uint64;
typedef unsigned __int32 uint32;
typedef unsigned __int16 uint16;
typedef unsigned __int8 uint8;
#else
//For ease.
typedef int64_t int64;
typedef int32_t int32;
typedef int16_t int16;
typedef int8_t int8;
typedef uint64_t uint64;
typedef uint32_t uint32;
typedef uint16_t uint16;
typedef uint8_t uint8;
#endif

C++ Masterace :wink:

2 Likes

The only MasterRace that also results in the most users committing suppuku.

4 Likes

Ha C++

#include<stdio.h>

int main()
{
     printf("C rulzzz");
     return 0;
}

Then again Iā€™ve been told Iā€™m crazy.