Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by rhazn

Hello :)

I recently published my first entry on gamedev.net about my hobbyist project "Frozzen".

I use ImpactJS for the battle portion in the browser and uploaded a video of my first prototype.

Entry here: http://www.gamedev.net/blog/1584/entry-2255470-prototype-version-01/
Video: http://www.youtube.com/watch?v=7pboe89tI_4

Has been a lot of fun so far, would be amazing if you can give me some feedback by looking at the video/entry or following the project.

1 decade ago by coreysnyder

That looks pretty cool so far. Might I ask how you went about doing your menu overlays? HTML?

1 decade ago by rhazn

Hey, thanks! The menu is done in Impact aswell. I added a UI class and added that to my update method (because I do not need all the entity stuff it is just a ig.Class). In the UI I react to input and render some UI modules. At the moment there are 3 modules, the skillbar, the inventory and the hero window. They got draw/update methods (called from the main UI class) and get mouse input first. When they handle the input, they tell the UI and the input is dropped, otherwise it gets down to the next module. If no UI module handles mouse input it is given to the game.

1 decade ago by rhazn

I have created a new video and a new blogpost over at http://www.gamedev.net/blog/1584-a-long-frozen-path/ . I'll stop spamming here but if you have any impact related questions or want to see some code, tell me about it :)

1 decade ago by coreysnyder

Rhazn thank you for the feedback. I may adopt a similar solution in my game. How do you accomplish this step: "When they handle the input, they tell the UI and the input is dropped". I know in JavaScript events you can do a preventDefault() but that isn't applicable in impact I believe.

1 decade ago by rhazn

Hmm, no it is a more hacked solution. Every display module has a "handleMouseDown" and "handleMouseUp" function. The user interface loops through the modules, calls the appropriate function and breaks if it gets a true back.

Example code:

for (var i = 0; i < this.displayModules.length; i++)
{
if (this.displayModules[i].handleMouseDown()){
break;
}
}

This way I can implement the basic function in the displayModule class to just return false and when a module wants to consume the click it simply does it's thing and returns true ;)
Page 1 of 1
« first « previous next › last »