Good vs. Evil

lenscas

Over-Achiever
Jul 31, 2013
2,031
1,808
248
44 yep, another fun thing is when a teacher says that the school he teaches at is insane.

And.... I can't say I disagree with him.
 

lenscas

Over-Achiever
Jul 31, 2013
2,031
1,808
248
44 managed to work more on arena keeper. The wall and bed are now both defined using json files and thus in theory more items can be added simply by using them. I also fixed the rendering logic so tile features (like the wall and bed) can have transparency.

Next thing is to change the buttons that allow you to select what to build so that that isn't hard coded any more. After that it should be ready for a new push to master (meaning an automatic new web build)
 

lenscas

Over-Achiever
Jul 31, 2013
2,031
1,808
248
44 those suck.

meanwhile, I got the buttons working so they aren't hard coded any more. Right now, an automatic build is running to update the online version :)

edit: And... it used the wrong file in the /bin folder, meaning that although the build succeeded, the wasm file is broken. Hopefully, I got that fixed now though (still waiting on a new build and deploy)
 
Last edited:

lenscas

Over-Achiever
Jul 31, 2013
2,031
1,808
248
46 working on the gui code for arena keeper again. Main problems that I'm trying to address:
  • Not being able to use anything more complex than a button.
  • The state of the GUI isn't remembered between update/draw calls, which gives the following limitations:
    • The idea of a focused widget is impossible.
    • Its impossible for me to change the cursor when you hover over an widget.
    • Every screen needs to remember to update their own widgets and remembers to redraw them
  • Rather coupled to my game, impossible to release as library.
So far, the code is not for those that fear generics, but then again, so is most rust code

Code:
pub fn add_widget<R, W, Res>(&mut self, widget: R, layer_id: u64) -> Result<Response<Res>, ()>
where
     R: RawWidget<Res, W>,
     W: Widget + 'a,
     Res: Sized,
{
//code here
}