• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
BaneTrapper

Want to make light/day cycle, searching for light engine or sugestions / ideas how to achieve

5 posts in this topic

Hello.

I am working on a hobby project a "2d, rpg, top down, tile based, real time, hack and slash".

I came to a point where i am supposed to add day and night cycle, but i am oblivious how to achieve that, adding light engine would allow to make torches/fire at night to glow which would be good so any suggestions?

 

What i want:

Dynamic lights.
To pass time from day to night and repeat.

To have glow effect like torches.

 

Most have:

Be usable with c++ and OpenGL.

 

1

Share this post


Link to post
Share on other sites
I can see two options:
1. Keep things symbolic. Make a day and a night version of each sprite, and do a quick transition from one to the other when the sun goes up or down (you can even have some sound queues, like the ululating of an owl for sunset and the crowing of a rooster for sunrise, plus different background music for day and night). This is an especially good idea if you have some clear rules about what happens at night or during the day (Dangerous creatures wander the woods at night? Shops are only open during the day? I really don't know what your game is about...).
2. Go 3D. You can keep your game mechanics 2D, but if you want to render lighting effects (you mentioned torches), I can't see how you could do that without knowing the geometry of the scene and the characters in some detail.

I strongly suggest going with option 1, particularly for a hobby project.
0

Share this post


Link to post
Share on other sites

I can see two options:
1. Keep things symbolic. Make a day and a night version of each sprite, and do a quick transition from one to the other when the sun goes up or down (you can even have some sound queues, like the ululating of an owl for sunset and the crowing of a rooster for sunrise, plus different background music for day and night). This is an especially good idea if you have some clear rules about what happens at night or during the day (Dangerous creatures wander the woods at night? Shops are only open during the day? I really don't know what your game is about...).
2. Go 3D. You can keep your game mechanics 2D, but if you want to render lighting effects (you mentioned torches), I can't see how you could do that without knowing the geometry of the scene and the characters in some detail.

I strongly suggest going with option 1, particularly for a hobby project.

All my games geometry is 4 vertices that represent (Box, square), of sizes 32/ 24/ 16 pixels.

Screen:

Wanderer_lost_in_time_Teaser1.png

Example.png

All i want from the light engine is that is has
"dinamic point lights" "shapes for blocking light".

and as mentioned before be usable with c++ and openGL

Edited by BaneTrapper
0

Share this post


Link to post
Share on other sites

A more sophisticated solution would not have to be completely 3D but you would need additional textures that store some information about the shape of the object.

 

This shows a project that did something like that.

https://www.kickstarter.com/projects/finnmorgan/sprite-lamp-dynamic-lighting-for-2d-art?ref=live

 

Ideally that would probably be rough normal vectors stored in a texture ... and the lighting engine would use it.

Guess something like that is needed if you want different light sources to have the desired effect, but not sure what a tool to create those maps with would look like.

 

You might be able to use only one grayscale image with the one value indicating how much the local color is influenced by the ambient light. The ambient light could change over time. The local color would stay the same. Black would mean it is always shown as a shadow.

Faking a local light source by modifying the color of the ambient light and using the resulting color (and maybe intensity) to modify the rendered object color might give reasonable results. Not sure ... guess a lightsource behind an object would be problematic.

 

Using white and black for darker and brighter is not optimal.

Maybe you can look at art tutorials and come up with a smart innovative way to accomplish what you want:

http://androidarts.com/art_tut.htm

Edited by DareDeveloper
1

Share this post


Link to post
Share on other sites

Ive found a tutorial that was pretty simple and i followed it:
http://www.facepunch.com/threads/1011659

Big thanks to for that tutorial "Austin Shindlecker (Austech)"

 

But it was pretty slow making it with lines, but it makes really nice look.

Id like to improve performance allot, on these screens i optimized a bit and that light takes about 20% of cpu which will totally crush my game if i make few of those.

Onto something faster i shall search!

 

Some screens:

Untitled1.png

Untitled12.png

 

I really hoped there is a library / engine that i can just strap onto openGL and get per pixel Light or texture lights but meh, oh well the search continues.

Thank you guys on suggestions but i am unable to build my own light system i just don't have time to study math required.

It is something i will have to do later on, for now i will focus on current project, thank you on the suggestions.

And i someone has a suggestion for a light engine that i can implement with c++ openGL please let me know!

Edited by BaneTrapper
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0