In July 2011 I wrote about environment actions. They are still there, unfinished... but it's like that with large scale projects. Today I was looking at the thing again and decided to add an environment type to all objects as a general way to tell where the object is.
The object can sit on ground like it was another sunny day, but it can also be in number of other environments like lava, pit and even at the middle of air. Complexity requires generalization with another type of class on top of terrain types (or main types in this case, another generalization).
The way I try to tackle this is first make sure objects always know where they are. It's a good start. Then actions (the same actions left from July 2011) describes what happens when the environment changes. I think it's a plan that might work.
Friday, 18 April 2014
Monday, 14 April 2014
@ work again
First day at work, my job is an office assistant (computers mainly). It's annoying. I can't put it any other way. Well yeah, it's only 6 hours a day, 5 days a week, but it still sucks. When I get older I feel like everything that takes my time from game development is bullshit.
The biggest problem is that even at my age I still have too many problems related to my life. You think they could have disappeared by now, but no, they don't go anywhere until you make them go away. I haven't been successful in that and I always think it is somehow reflecting to what I have achieved as a game developer. You need to get rid of distractions before you can concentrate on what you do the best.
Maybe there is something good in this situation, because I feel an urge to find something better. Maybe another, better job? I wish it would be that easy.
The biggest problem is that even at my age I still have too many problems related to my life. You think they could have disappeared by now, but no, they don't go anywhere until you make them go away. I haven't been successful in that and I always think it is somehow reflecting to what I have achieved as a game developer. You need to get rid of distractions before you can concentrate on what you do the best.
Maybe there is something good in this situation, because I feel an urge to find something better. Maybe another, better job? I wish it would be that easy.
Tuesday, 1 April 2014
Delayed events
The re-ordering (still under work) of Creature class has been a success. It has made things more clear and I have also improved parts that have been unfinished for a long time. I regret that I left Creature class alone for quite a long time, but then again when you go back you often see things new way and know better how to proceed.
Currently I'm trying to think how to implement events. I don't want to use them more than I have to, because they can be tricky. Most events will be for traps I guess but there is one for lighting a fuse of dynamite. Of course there are problems. The event is including data about the object, but it's not synchronized in all cases.
Let's say you lit the fuse of dynamite. There will be a delayed explosion event at the location of the dynamite. However the dynamite can get lost in case you put it into a container and move the container itself. The location of items inside it are not updated, because it would be too heavy for even modern computers to handle. Just imagine if all items of all monsters would update their location when monsters move.
There are couple of solutions. You could include the container's id in the event (using its location) or simply search the item from containers if it's not on ground when the explosion happens to synchronize the location. Whatever the solution, I think there must be a two-way notification from event to object and also object to event, because the object can be destroyed before it explodes or something else happens to it.
Currently I'm trying to think how to implement events. I don't want to use them more than I have to, because they can be tricky. Most events will be for traps I guess but there is one for lighting a fuse of dynamite. Of course there are problems. The event is including data about the object, but it's not synchronized in all cases.
Let's say you lit the fuse of dynamite. There will be a delayed explosion event at the location of the dynamite. However the dynamite can get lost in case you put it into a container and move the container itself. The location of items inside it are not updated, because it would be too heavy for even modern computers to handle. Just imagine if all items of all monsters would update their location when monsters move.
There are couple of solutions. You could include the container's id in the event (using its location) or simply search the item from containers if it's not on ground when the explosion happens to synchronize the location. Whatever the solution, I think there must be a two-way notification from event to object and also object to event, because the object can be destroyed before it explodes or something else happens to it.
Subscribe to:
Posts (Atom)