Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Realistic Light - Events

The Intro
The Tutorial lets you make Realistic Light using Events. It'll pretty much be easier to understand if your using fogs that darken The screen.

If your using Events to make the Fire graphic this tutorial is for you. If you using a lamp type thing from a tileset You probably don't need this.


The System
Anyway, This requires 3 events only.

Fire Event
Graphic = Fire Graphic
Options = "Stop Animation"



Circle Light Event
Graphic = "Light02" The Circle Light Graphic.
Graphic Settings = Blending = "Add"
Options = "Stop Animation" "Through"



Intializing Event
Trigger = "Autorun"
Commands =
Code:
Set Event Location 
  (Event of Circle Light GraphicGraphic)
  (x and y = x and y of Fire Event


Use one of those setting in each of the three events.
Screenshot not available.
 

Anonymous

Guest

If the player starts or transfers anywhere on the map where he can see the fire, he's going to see the circle of light jump onto the fire if it's also anywhere in his range of vision. Also, you should use an Erase Event command at the end of the autorun event to keep the game from freezing.
 
Yeah I totally forgot about that erase event thing. It's in my event. I just forgot to include it. It is doe with events you know... Maybe if you did a parrerel common event but I'm not sure that would work. Maybe if you used the Common Event Starter Script.
 

Anonymous

Guest

Parallel processes still loop, they just don't freeze the game. Why keep moving the event to the same location every. single. frame? That's just asking for lag.
 
Hmm I never had problems with lag if I used parallel processing, unless I make really big maps, but they're the cause of the lag then. You're right though, if you use quite a lot of parallel processes, the game will lag eventually. I was just pointing out another way to do the Fire Event. Parallel processing and autorun stops if you're not in range anymore, so if you only use 2-4 parallel events, it should play smoothly still.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top