How to pick blocks in minecraft?
Re: How to pick blocks in minecraft?
Well, check out the Q3 tutorials, and do so: Point a ray in a straight direction, check if it collides, and get the node it is colliding with. Make a new cube, scale it a bit (1.0001 maybe) and enable Wireframe.
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
Re: How to pick blocks in minecraft?
Creating that many cubes at runtime = not a good ideaSGH wrote:Well, check out the Q3 tutorials, and do so: Point a ray in a straight direction, check if it collides, and get the node it is colliding with. Make a new cube, scale it a bit (1.0001 maybe) and enable Wireframe.
-
- Posts: 1010
- Joined: Mon Oct 24, 2011 10:03 pm
- Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d
Re: How to pick blocks in minecraft?
804 wrote:do you think this would be a nice and fast way to render the minecraft like terrain
http://irrlicht.sourceforge.net/forum/v ... =6&t=39598
but when i compile the example....Code: Select all
1>------ Erstellen gestartet: Projekt: irlicht test, Konfiguration: Debug Win32 ------ 1> main.cpp 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.h(62): warning C4520: 'CMeshCombiner': Mehrere Standardkonstruktoren angegeben 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\main.cpp(98): warning C4244: 'Argument': Konvertierung von 'time_t' in 'unsigned int', möglicher Datenverlust 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\main.cpp(127): error C2661: 'CMeshCombiner::CMeshCombiner': Keine überladene Funktion akzeptiert 3 Argumente 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\main.cpp(128): error C2660: 'CMeshCombiner::combineMeshes': Funktion akzeptiert keine 2 Argumente 1> CMeshCombiner.cpp 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.h(62): warning C4520: 'CMeshCombiner': Mehrere Standardkonstruktoren angegeben 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(9): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(18): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(32): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(54): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(96): warning C4018: '>': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(99): warning C4018: '>': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(165): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(170): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(186): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(189): warning C4244: 'Argument': Konvertierung von 'irr::u32' in 'float', möglicher Datenverlust 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(189): warning C4244: 'Initialisierung': Konvertierung von 'float' in 'irr::u32', möglicher Datenverlust 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(190): warning C4244: 'Argument': Konvertierung von 'irr::u32' in 'float', möglicher Datenverlust 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(190): warning C4244: 'Initialisierung': Konvertierung von 'float' in 'irr::u32', möglicher Datenverlust 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(201): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(205): warning C4244: 'Initialisierung': Konvertierung von 'float' in 'int', möglicher Datenverlust 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(206): warning C4244: 'Initialisierung': Konvertierung von 'float' in 'int', möglicher Datenverlust 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(211): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(219): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(227): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(231): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(283): warning C4244: 'Initialisierung': Konvertierung von 'double' in 'int', möglicher Datenverlust 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(360): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(387): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(389): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(402): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(427): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(428): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(431): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(446): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(469): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1>c:\users\voss\documents\programierung\gameprojects\irlicht test\irlicht test\cmeshcombiner.cpp(487): warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned' 1> Code wird generiert... ========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========
No... use PolyVox.
"this is not the bottleneck you are looking for"
Re: How to pick blocks in minecraft?
Maybe don't use -Wall? You may be doing a 64-bit compile, in which case it would not be a good idea to put a time_t into an int, but problems won't start to show up until 2038 so I guess it really doesn't matter.
Re: How to pick blocks in minecraft?
Why, what are the advantages?
///////////////////////////////////////////
My Forum: http://game-home.1x.de/
My Homepage: http://mediadesign.about.lc/
///////////////////////////////////////////
My Forum: http://game-home.1x.de/
My Homepage: http://mediadesign.about.lc/
///////////////////////////////////////////
Re: How to pick blocks in minecraft?
It is difficult to avoid: Konflikt zwischen 'signed' und 'unsigned'. I'm not sure, but
may produce a warning because, as I understand it, "7" is an integer. Well, maybe it is a double.
Though, since you asked the question, I really would look into complaints that the number of arguments do not match the function prototype. I had ignored them because I thought one of the arguments was subject to an error report, but you don't have errors, you only have warnings.
Anyway, it is better for your code to compile cleanly than to produce warnings, because, if you start ignoring warnings, you may miss a really important one. A warning doesn't mean everything is OK, it just means the compiler was able to generate code. What that code does, though, is anybody's business.
Or have I misunderstood?
Code: Select all
unsigned int i;
if (i > 7) {}
Though, since you asked the question, I really would look into complaints that the number of arguments do not match the function prototype. I had ignored them because I thought one of the arguments was subject to an error report, but you don't have errors, you only have warnings.
Anyway, it is better for your code to compile cleanly than to produce warnings, because, if you start ignoring warnings, you may miss a really important one. A warning doesn't mean everything is OK, it just means the compiler was able to generate code. What that code does, though, is anybody's business.
Or have I misunderstood?
Re: How to pick blocks in minecraft?
but why? And how to include PolyVox to Irrlicht?No... use PolyVox.
Are there any tutorials for PolyVox and Irrlicht?
PS: I will set the language of my compiler from german to english
///////////////////////////////////////////
My Forum: http://game-home.1x.de/
My Homepage: http://mediadesign.about.lc/
///////////////////////////////////////////
My Forum: http://game-home.1x.de/
My Homepage: http://mediadesign.about.lc/
///////////////////////////////////////////
Re: How to pick blocks in minecraft?
PolyVox is practically made for this kind of use. Just check the tutorial they have on the website.
Then search the forum for Irrlicht integration, very easy.
For block picking, just calculate voxel position from the ray hit coordinates and remove that voxel when you want to remove a block.
Then search the forum for Irrlicht integration, very easy.
For block picking, just calculate voxel position from the ray hit coordinates and remove that voxel when you want to remove a block.
Re: How to pick blocks in minecraft?
OK, and why is it as fast?
///////////////////////////////////////////
My Forum: http://game-home.1x.de/
My Homepage: http://mediadesign.about.lc/
///////////////////////////////////////////
My Forum: http://game-home.1x.de/
My Homepage: http://mediadesign.about.lc/
///////////////////////////////////////////
Re: How to pick blocks in minecraft?
Who said anything about faster? After all, its up to you to do the implementation. Its not easy to make a good minecraft clone as many here already stated.
Re: How to pick blocks in minecraft?
I know that its very difficult to make a game like this, but i am very motivated to get the knowledge and start my project.
I mean, why is it faster to use polyvox to render so many cubes?
And why should i use polivox instead of the mesh combiner (viewtopic.php?f=6&t=39598) ?
I mean, why is it faster to use polyvox to render so many cubes?
And why should i use polivox instead of the mesh combiner (viewtopic.php?f=6&t=39598) ?
///////////////////////////////////////////
My Forum: http://game-home.1x.de/
My Homepage: http://mediadesign.about.lc/
///////////////////////////////////////////
My Forum: http://game-home.1x.de/
My Homepage: http://mediadesign.about.lc/
///////////////////////////////////////////
-
- Posts: 1010
- Joined: Mon Oct 24, 2011 10:03 pm
- Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d
Re: How to pick blocks in minecraft?
all documentation on polyvox:
http://www.volumesoffun.com/wordpress/?page_id=43
also you will find the download on the very same website ^^
http://www.volumesoffun.com/wordpress/?page_id=43
also you will find the download on the very same website ^^
"this is not the bottleneck you are looking for"
Re: How to pick blocks in minecraft?
MeshCombiner cannot be used for a MineCraft clone because the mesh becomes too large to render in less than a second. If you want good frame rates you need to find another way.
Re: How to pick blocks in minecraft?
As i said, no one have stated PolyVox is faster than using mesh combiner. But the good thing about PolyVox is thats its very easy to make minecraft like terrain with it since it has built in support to make "blocky worlds".
Very simple to just take a heightmap and make a blocky terrain from it. It also have good support for making very huge volumes with callback functions for paging and stuff.
Very simple to just take a heightmap and make a blocky terrain from it. It also have good support for making very huge volumes with callback functions for paging and stuff.
Re: How to pick blocks in minecraft?
Is there an Example of Blocky terrains? I don't Know where to start...
///////////////////////////////////////////
My Forum: http://game-home.1x.de/
My Homepage: http://mediadesign.about.lc/
///////////////////////////////////////////
My Forum: http://game-home.1x.de/
My Homepage: http://mediadesign.about.lc/
///////////////////////////////////////////