tagple.blogg.se

How to create your own game engine with java
How to create your own game engine with java






how to create your own game engine with java

Probably the parser for the expression is the most complicated stuff. Implementing a simple rule-based evaluation system in Java isn't that hard to achieve. Have you had any experience in solving these kind of problems? If yes, how did you go about it? I haven't explore options like Drools rules engine, because I have a feeling that it might be an overkill here. I want to build a web application where user will write in a small script in a textarea, and I would evaluate the expression - this way, business rules are explained in simple English and business user has complete control on logic.įrom the research I did so far, I came across, ANTLR and writing my own scripting language as possible options to solve this problem. The operators involved in an expression could be =,>,<,!= and logical operators between expressions are AND, OR and NOT. The rule engine is pretty simple, the final action could be just one of two actions, sending to inpatient or outpatient. Here's example: IF (PATIENT_TYPE = "A" AND ADMISSION_TYPE="O") A sample of rule base might look like this : I need to present the client with a simple webapp that lets him configure a bunch of rules. I am exploring different ways to create a simple business rule engine in Java.








How to create your own game engine with java