#46
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Location
    Fort Meade, MD
    Posts
    170
    Rep Power
    50

    Interacting with the world via the mouse



    I created a simple applet for generating the terrain Object3D from scratch rather than cloning a grid model loaded from a .3ds file. The entire terrain is a single Object3D. You can interact with the terrain via the mouse. When you click on the terrain, whatever cell you click gets colored red, and messages print out for the 3D point that you clicked on, what it translates to in 2D map coordinates, and the map cell number.

    Here is a link to the applet:
    http://www.paulscode.com/source/calcMinDistanceTest/

    And here is the source code for this applet:
    http://www.paulscode.com/source/calc.../MapClick.java
  2. #47
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2008
    Posts
    4
    Rep Power
    0
    cool
  4. #48
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Location
    Fort Meade, MD
    Posts
    170
    Rep Power
    50

    Map Maker Update


    Progress on the Map Maker has been a little slow because I am working on a couple of other projects as well, but I have managed to do some work on it. I created an applet to demonstrate what the program can do so far:

    http://www.paulscode.com/games/Robot...ker/27OCT2008/

    This is basically the same as the applet in my last post, except that now the terrain is not just a flat square, demonstrating that the Interact2D stuff will work with any shape of terrain. Additionally, actual terrain textures are used instead of solid colors, and I added in a click sound effect. SoundSystem is definitely overkill for this applet, but hey - I wrote a sound library so I figure I might as well use it once in a while

    You will probably notice that you can't create a smooth curved road with just two textures. This will be solved the same way it is done for a 2D game map - by drawing edge and corner texture images.
  6. #49
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Location
    Fort Meade, MD
    Posts
    170
    Rep Power
    50
    I took a small break from the Map Maker to work on another concept I will need for my game: Guns. This involved figuring out how to do things like firing direction, bullet management, and collision detection. I believe I now have a good understanding of the process.

    Demo applet (download the source code)
  8. #50
  9. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Location
    Fort Meade, MD
    Posts
    170
    Rep Power
    50
    I did some work on the Map Maker today. I finished the toolbars for camera navigation and texture selection. This program is starting to look kind of cool. Here's a link:

    http://www.paulscode.com/games/Robot...ker/29NOV2008/
  10. #51
  11. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Location
    Fort Meade, MD
    Posts
    170
    Rep Power
    50


    http://www.paulscode.com/games/Robot...ker/30NOV2008/

    Today I did some more work on the Map Maker. Changes include:

    1) The code for selecting map cells is complete. Cells can be selected one at a time or multiple at a time while holding down "Control". It is also possible to "drag-select" with the mouse.

    2) I made it so that if any cells are selected, the paint tool will automatically fill them with whatever texture I pick. This should save me a lot of time when I eventually start making maps for the game.

    3) I made it so right-click always acts like the select tool, so I won't have to keep switching back and forth between tools.

    4) I added in a visible wireframe that I can turn on or off from the Options toolbar. This helps to distinguish one cell from the next.

    5) The "Save" button in the options toolbar works nicely. The "Load" function, however, isn't finished.

    6) I added in buttons for "Select by cell", "Select by map", and "Free select". The later two will be implemented later after I add in the ability to load more than one adjacent maps at a time.
  12. #52
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2009
    Posts
    6
    Rep Power
    0

    Exclamation


    Yo sup im owner of myfunworld.com and well for a little catch i would like to host your "Online Games" on my website But. i might require 1 or 2 things Send a message to me via my website

    Comments on this post

    • dyefade disagrees
  14. #53
  15. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Location
    Fort Meade, MD
    Posts
    170
    Rep Power
    50
    No thank you, I will host the game myself
  16. #54
  17. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Location
    Fort Meade, MD
    Posts
    170
    Rep Power
    50

    Sound System MIDI Fixes


    A new version of my Sound System library is out today.

    JARS:

    Sound System jPCT (Download Source Code)

    Sound System (Download Source Code)

    Sound System Small (Download Source Code)


    Other:

    Demo Applet

    JavaDoc

    PDF Tutorial


    What's new?

    - Corrected the delay problem that was happening when playing sound effects with the Java Sound library while MIDI was playing. This fix also eliminated the need for SoundSystemResources.jar, which significantly reduces the memory footprint required to play MIDI in applets.
    - Removed the MidiThread class (a work-around that is no longer needed).
    - Added support for MIDI into the small version of sound system.
    - Made a few changes to the PDF tutorial document.

    Comments on this post

    • tagmanadvance agrees
  18. #55
  19. Kage Bunshin
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2005
    Location
    The Seven Seas Of Rhye
    Posts
    930
    Rep Power
    422
    Wow, you have been doing some great work. After seeing your demo I really want to look into 3D, thanks for sharing your source =)
    Edit: What is the license on your sound library?
    "Java makes impossible things possible, but makes easy things difficult." - Somebody
  20. #56
  21. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Location
    Fort Meade, MD
    Posts
    170
    Rep Power
    50
    There is no license on my code, however one class in the library, AudioData, is based the source for the lwjgl WaveData class. So if you redistribute the library, you must reproduce the lwjgl copyright notice (which pretty much says the library is provided "as is", and they will not be responsible for any damages blah, blah). If you want to read the copywrite notice, you can find it in the source code as well as in the JavaDoc for the AudioData class. There are no restrictions on use of the library or source code (other than the requirement to reproduce that lwjgl copyright notice if you redistribute the library or source code), and I do not require you to give me credit (although it would be nice). I didn't really create this library for recognition or profit, I just wanted to use it in my game, and decided there might be other folks out there who could benefit from it.

    BTW, if you do decide to get into 3D programming for Java, I HIGHLY recommend the jPCT library, located at:
    http://www.jpct.net
    It is easy to use and well-supported. The developer and the experienced programmers who have been using the library for a long time are friendly and helpful.
    Last edited by paulscode; February 2nd, 2009 at 05:58 PM.
  22. #57
  23. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Location
    Fort Meade, MD
    Posts
    170
    Rep Power
    50
    Oops, I just realized that I never uploaded the changes I made to the PDF Tutorial. If you downloaded it from before, please grab it again (the link is the same), as there are a couple of important changes (related to streaming and to MIDI).
  24. #58
  25. Kage Bunshin
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2005
    Location
    The Seven Seas Of Rhye
    Posts
    930
    Rep Power
    422
    Originally Posted by paulscode
    Oops, I just realized that I never uploaded the changes I made to the PDF Tutorial. If you downloaded it from before, please grab it again (the link is the same), as there are a couple of important changes (related to streaming and to MIDI).
    Thanks for the link, I really appreciate it. The reason I ask is because some of the developers for my favorite Java2D game engine (I think I talked about this some time back), were arguing over whether or not a sound library should be included in the core. I think I'll just save them a bunch of time and effort and refer them to this thread to check it out.

    Edit: Just out of curiosity, why the the map disappear when I turn it upside-down?
    Last edited by tagmanadvance; February 3rd, 2009 at 06:15 AM.
    "Java makes impossible things possible, but makes easy things difficult." - Somebody
  26. #59
  27. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Posts
    13
    Rep Power
    0
    Looks amazing, KEEP IT UP!
  28. #60
  29. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Location
    Fort Meade, MD
    Posts
    170
    Rep Power
    50
    Originally Posted by tagmanadvance
    Edit: Just out of curiosity, why the the map disappear when I turn it upside-down?
    Oh, sorry, I didn't notice your question until just now. That is an optimization used by the 3D engine called "backface culling" or something like that. Pretty much every 3D engine uses it - I think by making an assumption that you will only ever be looking at a serface from one direction, they can speed up the rendering somehow (I don't really understand a whole lot about what goes on behind the scenes with the base 3D engine, I just know how to use it). If you are interested in learning more about it, the engine developer EgonOlsen can probably give you more information about it (www.jpct.net).

    Progress update: I am currrently doing some required maintanance work on my SoundSystem library, which I should have finished this weekend. Then I'll get back to more of the fun stuff

IMN logo majestic logo threadwatch logo seochat tools logo