Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (769)
Games in Android Showcase (230)
games submitted by our members
Games in WIP (855)
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 2020 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: 197
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  
 
 

 
EgonOlsen (1594 views)
2018-06-10 19:43:48

EgonOlsen (1695 views)
2018-06-10 19:43:44

EgonOlsen (1150 views)
2018-06-10 19:43:20

DesertCoockie (1578 views)
2018-05-13 18:23:11

nelsongames (1178 views)
2018-04-24 18:15:36

nelsongames (1701 views)
2018-04-24 18:14:32

ivj94 (2467 views)
2018-03-24 14:47:39

ivj94 (1683 views)
2018-03-24 14:46:31

ivj94 (2767 views)
2018-03-24 14:43:53

Solater (905 views)
2018-03-17 05:04:08
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
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!