• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

User Interface ontop of canvas

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Playing around with making a 2d Tile game and looking around for a good way to proceed to the next level of my experiment. In the game, you will eventually have a player moving around, mobs to encounter, items to pickup or drop and buttons to push for skills or menus to take actions (like quit/save the game). How to proceed from here?

1: allow users to see/hide user interface (v on keyboard)
2: User Interface needs to be visible while the user plays the game.
3: buttons on a user interface which activate powers or menu/submenu.
4: mouse click to attack specific mob.
5: user inventory (i on keyboard) which can appear over the canvas.
6: Allow users to drag/drop items to/from inventory/game canvas.

I imagine when the mouse is pressed, it has to check the coord(x,y) vs some kind of layer. starting at the top working towards bottom until it finds the coord with an object on that level. Say game canvas is lowest level, game items (mobs, treasure) are above that, user interface next higher, user inventory even higher. Seem to recall when putting layers on in the past that the coord would only return for the highest level or something. This was many many years ago. Any ideas?
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic