Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (748)
Games in Android Showcase (226)
games submitted by our members
Games in WIP (834)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Voxel Destroy Item  (Read 1711 times)
0 Members and 1 Guest are viewing this topic.
Offline Ging3rtoby
« Posted 2014-07-28 18:11:20 »

I have a voxel game, and I want to destroy items like a pickaxe. How would I do that, I am using LWJGL and Slick in case that helps a bit. Sorry for the broad question but if you point me on the right path I could find the answer.

Thanks Toby
Offline Ecumene

JGO Kernel


Medals: 196
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Reply #1 - Posted 2014-07-28 18:15:54 »

I want to destroy items like a pickaxe.

I think I can answer your question, I just need a bit more information. Voxel engines could mean MANY things. 2D or 3D? How are your blocks handled (block[][]?)? What do you mean destroy? Remove "blocks"? Remove "items"? Remove blocks with items?

Offline Longarmx
« Reply #2 - Posted 2014-07-28 18:17:54 »

I think that you want to break blocks with a pickaxe correct? Well, you will need to raycast to find the block the player is pointing at, then you will need to see if the player is close enough to the block. If this is true then you will break the block by setting it to something like air.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Drenius
« Reply #3 - Posted 2014-07-28 18:40:06 »

Quote
Voxel engines could mean MANY things. 2D or 3D?
Actually, a voxel can technically only be 3D since voxel = volumetric pixel so...  Smiley
Offline Ging3rtoby
« Reply #4 - Posted 2014-07-29 09:46:06 »

Yeah you are right this is a 3d Game. I have blocks being destroyed correctly and working but I want to get the pickaxe to be removed from the game and my inventory when it's life runs out.
Offline trollwarrior1
« Reply #5 - Posted 2014-07-29 09:47:59 »

Real o-o Now I think this is a troll post. You mean programmed it to destroy blocks properly, but you cannot figure out how to remove pickaxe? Just remove it from your inventory item list.
Offline Gibbo3771

JGO Kernel


Medals: 128
Projects: 5
Exp: 1 year


Currently inactive on forums :(


« Reply #6 - Posted 2014-07-29 09:48:09 »

Yeah you are right this is a 3d Game. I have blocks being destroyed correctly and working but I want to get the pickaxe to be removed from the game and my inventory when it's life runs out.


Ehhhhhhhhh, you managed to do that but you can't add a simple durability component to the pickaxe then remove it from the players inventory and chuck it to the side for the GC?...am I missing something here? lol

"This code works flawlessly first time and exactly how I wanted it"
Said no programmer ever
Offline Ging3rtoby
« Reply #7 - Posted 2014-07-29 10:08:53 »

Okay Okay
Pages: [1]
  ignore  |  Print  
 
 

 
xxMrPHDxx (345 views)
2017-12-31 17:17:51

xxMrPHDxx (111 views)
2017-12-31 17:15:51

xxMrPHDxx (160 views)
2017-12-28 18:11:33

Ecumene (362 views)
2017-09-30 02:57:34

theagentd (505 views)
2017-09-26 18:23:31

cybrmynd (557 views)
2017-08-02 12:28:51

cybrmynd (490 views)
2017-08-02 12:19:43

cybrmynd (462 views)
2017-08-02 12:18:09

Sralse (425 views)
2017-07-25 17:13:48

Archive (1349 views)
2017-04-27 17:45:51
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!