Java-Gaming.org
Java4K winners:
[
by our judges
|
by the community
]
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members
News
: Read the
Java Gaming Resources
, or peek at
the official Java tutorials
Home
Help
Search
Login
Register
Java-Gaming.org
>
Game Development
>
Newbie & Debugging Questions
>
Game Interactables
Pages: [
1
]
Print
Game Interactables
(Read 232 times)
0 Members and 2 Guests are viewing this topic.
SkyAphid
Full Member
Posts: 155
Medals: 1
Game Interactables
«
on:
2012-01-29 15:53:16
»
My game uses tiled, and right now I'm trying to decide how the game will register interactable objects. The game uses separate game states for each location, so I was thinking when the player interacts, it can just check his X and Y accordingly and match it that way, but I want to know if this is the most efficient way of doing it beforehand. What do you guys think?
"God grant me the serenity, to accept the things I cannot change; courage to change the things I can; and wisdom to know the difference."
ReBirth
JGO Wizard
Posts: 1272
Medals: 19
Re: Game Interactables
«
Reply #1 on:
2012-01-29 18:39:52
»
If you map your world in Array of int or else, you can check if the player can interact by seeing their location and check value of the object they want to interact.
Twitter @drabiter
gbeebe
Full Member
Posts: 145
Medals: 5
Re: Game Interactables
«
Reply #2 on:
2012-01-29 18:54:56
»
Do you have a class for tiles and interactables? I'd give the tile class a variable assigned to the interactable class, then if you try to interact, check to see if that tile's interactable is null, if not proceed.
Pages: [
1
]
Print
Jump to:
Please select a destination:
-----------------------------
Games Center
-----------------------------
=> Featured Games
=> Showcase
=> Contests
===> LWJGL16k - 2011
===> 4K Game Competition - 2012
===> JGO Comp Petite
===> Finished Contests
=====> 4K Game Competition - 2011
=====> 4K Game Competition - 2010
=====> 4K Game Competition - 2009
=====> 4K Game Competition - 2008
=====> 4K Game Competition - 2007
=====> 4K Game Competition - 2006
=====> 4K Game Competition - 2005
=====> Tiny Game 2010
=====> JGO Comp 2009
=====> 16K LWJGL Competition - 2005
=====> Java Technology Game Development Contest - 2004
-----------------------------
Discussions
-----------------------------
=> General Discussions
===> Suggestions
=> Business and Project Discussions
===> Jobs and Resumes
===> Community & Volunteer Projects
=> Miscellaneous Topics
-----------------------------
Game Development
-----------------------------
=> Newbie & Debugging Questions
=> Articles & tutorials
=> Game Play & Game Design
=> Game Mechanics
===> Artificial Intelligence
=> Networking & Multiplayer
=> Performance Tuning
=> Shared Code
-----------------------------
Java Game APIs & Engines
-----------------------------
=> Engines, Libraries and Tools
===> Java 3D
===> JInput
===> jMonkeyEngine
===> Xith3D Forums
===> Tools Discussion
=> Java 2D
===> JavaFX
=> OpenGL Development
===> JOGL Development
===> LWJGL Development
=> Java Sound & OpenAL
===> JOAL Development
=> Java on Mobile Devices
===> Android
===> J2ME
Loading...