Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6963985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:51:58+00:00 2026-05-27T15:51:58+00:00

For hobby I’m making a game. The game has a monster chasing the human

  • 0

For hobby I’m making a game. The game has a monster chasing the human (Pacman-like). When the Pacman is stuck, can eat the human or does some move; an event should be raised. This is because my program became not-oop because all the objects had to know eachother what did the cohesion no good.

There is a control like object (called Game) which should respond to the event; human-moved, monster-moved, human-eaten, monster-stuck and eventually let the view know something happened so it repaints. Whats also the point, that the view responds to the keypresses of the actor and that those events should reach the human in some way (also with an event).

  1. Can someone help me with how I can best solve this issue? I’ve searched the internet for likewise problems but didn’t came across one.

  2. In MVC: does the controller know the view? If so: does the whole program begins with the controller or with the view? (what makes who)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:51:59+00:00Added an answer on May 27, 2026 at 3:51 pm

    Basically Event Handling mechanism is just a producer-consumer pattern, imagine you are producing some events(an action) and there are set of listeners who needs to be notified about your action.

    whether you want to use to use the Java built-in event Handling depends on how much code you have already written, if refactoring your code to use the Java event Handling requires a lot of effort, and you have only limited set of events, then you can write your own message passing system. But obviously, using Java event handling mechanism should be preffered, since it takes cares of notifying all the listeners who are registered for that event, you dont need to worry about notifying each and every listener and later it will help you in debugging if anything goes wrong. I Hope it answers your first question

    In short you can write your own events like HumanMovedEvent, MonsterMovedEvent etc.

    Coming down to your 2nd question, yes in MVC, controller knows what all views it needs to trigger for any specific action. A controller can choose any specific view for any specific action, lets say if u do some action A, you can call view V.

    and yes your program begins with sending a request from your UI to Controller. Controller then chooses what View it needs to render for that specific action.

    I hope i made it clear 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm considering starting iOS development as a hobby and would like to save some
I am making a small hobby game, I have a couple of classes so
As a hobby project to keep myself out of trouble, I'd like to build
I want to embed Javascript in a hobby game engine of mine. Now that
I have a couple of hobby C programming projects that I would like to
I have recently started using PlayN for a hobby project and has now stumbled
I just usually do applications for myself as a hobby. It looks like DI
Suppose my db looks like this: id | person_id | hobby | time -----------------------------------
I do some hobby work with PIC Microcontrollers and I really enjoy using them
I want to start this as a hobby in developing a desktop game. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.