| CBNA SmartLight - Moteur de lumière | |
|
+81Mystigris Fcp vinter93 RefresherTowel hyper Paparazite Craki Blessedbe kasm Braisque token hunter222 Triptidon screammusik chopsuey rakkie20 vojtas X-Law Dude Black_cat Salvakiya reketh molbal Sylvain-Womos supersauce Nickeau Vallo92 Evilshroom Térence paladin33 Asu Caohimin kujaff D-z master47 Zeanad louckas kiguawne Caly Fogiax stermi59 Qual Byzantium Cérénade grugin Dan_lizhot zerfes red-error daminetreg PHENIXprod Ragdoll Vivi Oculus Randal SPLN [TheDarkTiger] PsycKho BUBU CoDeAVE onilink_ Arkanisa Mr_Twister Qualcuno Topaze22 alpha Chlorodatafile Mass Jerom Linky439 glcraft Wargamer ombre marty blendman bibi675 Chulien nicoulas jo Sekigo Le Magnifique M@d_Doc Bast 85 participants |
|
Auteur | Message |
---|
vojtas Nouveau
Messages : 7
| Sujet: Re: CBNA SmartLight - Moteur de lumière Mer 22 Jan 2014 - 15:01 | |
| @X-Law About the fullscreen-surface problem. The error looks like this: - Code:
-
___________________________________________ ############################################################################################ ERROR in action number 1 of Step Event2 for object obj_engine:
Trying to use non-existing surface. at gml_Script_SL_engine_render (line 106) - draw_surface(sl_sunshadows_surface1[!i],0,0); ############################################################################################ -------------------------------------------------------------------------------------------- stack frame is gml_Script_SL_engine_render (line 106) called from - gml_Object_obj_engine_StepEndEvent_1 (line 2) - SL_engine_render();
And about disabling initialization process- for me it looks like this: - obj_engine starts on first room, which is my Main Menu (new game, options, etc.) screen. I'm not using light engine with any of objects in this room. Light engine interactions are supposed to be used few rooms after on the "Shooting" room. - obj_engine is created being Visible and Persistent (to be able to use it on "Shooting" room). - obj_engine Create event looks like this: - Code:
-
SL_engine_ini_begin();
// Initialization of the object engine // sl_sunshadows_active=true; // Enabled the rendering of shadows solar sl_ambientshadows_active=true; // Enabled the rendering of the ambient shadows sl_timespeed=(1/60)/room_speed; // Determines the speed of the clock
// Generation of ambient maps SL_sprite_set_ambient(sprite_tree);
// List of objects projecting a shadow comprehensive SL_global_cast_obj(1,obj_tree,-1,1,1);
SL_ToD_01(); // Initialization of the TOD 01 SL_set_time(13.5); // Initialization of the hour
SL_engine_ini_end(); I left comments for convenience. EDIT: I want the obj_engine to be able to run throu all rooms. Maybe the error has something to do with SL_engine_ini_end in Create event? I though that it's only used for initiation of engine. |
|
| |
X-Law Débutant
Messages : 10 Localisation : spain Projet Actuel : 7H
| Sujet: Re: CBNA SmartLight - Moteur de lumière Mer 22 Jan 2014 - 17:59 | |
| @vojtas The fullscreen problem is what i said. The surface gets destroyed when you enter or exit the fullscreen mode. You should go to your obj_engine and in the end_step_event add a check for the existence of that surface then if it returns false add this: - Code:
-
sl_light_surface = surface_create(global.sl_light_txsize,global.sl_light_txsize); also add the check in that line you get the error (SL_engine_render (line 106)) and you should be good to go Btw what version are you using? i'm with GMS version and in mine the error line is 197 not 106 besides the line is a bit different: mine is: - Code:
-
draw_surface(sl_light_surface,0,0); and yours is: - Code:
-
draw_surface(sl_sunshadows_surface1[!i],0,0); About the other error just try to make a empty room before the 'Shooting' room, crete the obj_engine in there (instead of the first room) and then make a room_goto_next. That should work without any problem. SL_engine_ini_end(); it's just for finishing the initialization of the engine. Btw in your Create event code there is no SL_add_light script. Bassed on the help file it's better to add your light in this create event code of the obj_engine |
|
| |
vojtas Nouveau
Messages : 7
| Sujet: Re: CBNA SmartLight - Moteur de lumière Jeu 23 Jan 2014 - 15:18 | |
| @X-Law I'm also using Game Maker Studio. Just updated to 1.2.1264, but it didn't change anything crucial for me. I'm also using CBNA SmartLight 1.3.1 GMS [EN] version (just an english translation to comments, for version 1.3.1). I found out that when I force fullscreen mode before game runs Smart Light engine initiation it works fine with fullscreen. If I want to disable it, I can do it by adding an option that will run reset game, run it from beginning and force windowed instead and again then run Smart Light engine initiation. So that's kinda "sorted", but the problem remains with sunlight errors. I've tried to run empty room before my "Shooting" room. Right now it's like that: Main Menu -> Actual Game -> Buffer To Run Smart Light with Alarm[0] that triggers to jump to Shooting Room -> Shooting Room And this error remains when I try to go to that "Buffer Room". - Code:
-
___________________________________________ ############################################################################################ FATAL ERROR in action number 1 of Step Event1 for object obj_engine:
Push :: Execution Error - Variable Get -7.rl(100126, -1) at gml_Script_SL_engine_render (line 116) - sl_xx = lengthdir_x(rl/sl_sunshadows_texturesize,sl_sunshadows_direction); ############################################################################################ -------------------------------------------------------------------------------------------- stack frame is gml_Script_SL_engine_render (line 116) called from - gml_Object_obj_engine_StepBeginEvent_1 (line 1) - SL_engine_render(); This room only has obj_engine inside, with events: - Create: - Code:
-
SL_engine_ini_begin(); sl_sunshadows_active=true; sl_ambientshadows_active=true; sl_timespeed=(1/60)/room_speed; sl_buffer_sync = true;
// Generation of ambient maps SL_sprite_set_ambient(sprite_drzewo); // I want this object to cast shadow
// List of objects projecting a shadow comprehensive SL_global_cast_obj(1,drzewo,-1,1,1); // I want this object to cast shadow
SL_ToD_default(); // Changed to default ToD SL_set_time(13.5);
SL_engine_ini_end();
alarm[0]=90 - Destroy: - Code:
-
SL_engine_free();
- Alarm[0] - Code:
-
room_goto(etap_strzelanie); - End Step: - Code:
-
SL_engine_render();
- Draw: - Code:
-
SL_engine_draw();
EDIT: I've done some testing. When force game to start from Buffer room, then go to Main Menu, game crashes with this code, just like before: - Code:
-
Push :: Execution Error - Variable Get -7.rl(100126, -1) at gml_Script_SL_engine_render (line 116) - sl_xx = lengthdir_x(rl/sl_sunshadows_texturesize,sl_sunshadows_direction); Having in mind that there is only obj_engine in this room I've created a new project, created object "drzewo" with it's original sprite (drzewo is a tree object, with a tree sprite). So after that in new project I had obj_engine and drzewo. I gave it a try, and game compiles, and everything is fine. Sunlight works ok. Then I've created a new room, making it to run first. I've moved obj_engine to it, (let's remember that it's persistent) and created a button that after clicking with global left mouse room changes to first one. Again- I've gave it a try and everything is just like it supposed to be. So I have even more questions: - If sl_xx is referring to "-1" (from error code) like it was never created then did I forgot to add something? |
|
| |
rakkie20 Nouveau
Messages : 1
| Sujet: Re: CBNA SmartLight - Moteur de lumière Ven 24 Jan 2014 - 16:10 | |
| Hello, First of all, great engine! Really like the way everything looks. Now, I have a small problem, I've created a room with a global illumination of 0.05, and I can look around with the flashlight, this is working perfectly. However, when I want to draw GUI elements, like text or a sprite that's part of the gui, these are also affected by the global illumination, thus I have to shine my flashlight at my score to be able to see it. How can I exclude certain sprites, or text from being affected by the lighting? I'd like to be able to always see my score, for example. For example, I used draw_text to draw this text, and I would like it to always be entirely visible, so not like this: So I would want to make the text (or sprite) unaffected by the darkness, how would I do this? Thanks in advance! Edit: I am using Gamemaker 7 |
|
| |
X-Law Débutant
Messages : 10 Localisation : spain Projet Actuel : 7H
| Sujet: Re: CBNA SmartLight - Moteur de lumière Sam 25 Jan 2014 - 1:26 | |
| @vojtas About the fullscreen: yeah you can make any changes to screen before creating the (any) surface. When a surface exists and the screen mode change then those surfaces are destroyed.
About the error would be cool if you can actually upload the .gmx (or compress it into .gmz) with the problem to take a look at it directly if you don't mind. Sometimes you add something to your game that uses anything (a variable or so) called the same as other system already in there and then everything goes to hell. Actually in my game i got a "trying to draw a non-existing sprite" with SmartLight while in the example provided is everything all right. The weird thing is that when i first importeed it it was working flawlesly and without making any changes from one day to another that error popped up... really weird but i was able to fix it just by adding an if in the SL_engine_render script. That's why i'm asking you to upload your file because maybe it's something like that.
@rakkie20 In GM7 you don't have a Draw GUI event unlike GMS so you have to relay on object's depth. To draw something above the SmartLight's surface you'll have to set a higher depth (minus zero of course xD) than the obj_engine has. So for example: if your obj_engine has a depth of -1000. Your GUI object have to have at least -1001 to be drawn above the surface. |
|
| |
vojtas Nouveau
Messages : 7
| Sujet: Re: CBNA SmartLight - Moteur de lumière Mer 29 Jan 2014 - 12:07 | |
| @X-Law Sorry that I didn't reply. I though I've already send this message, but for some reason I didn't.
I cannot send anyone my project file, because it's too important for me and (no offence) I'm would be worried that someone would steal my game. I'm working on this game for three months, it has some unique gameplay mechanics and I think I can even make it a commercial product.
Right now I'm testing compatibilty of SmartLight with my game, object after object, script after script, hopefully finding what's making this error, right now I know it has issues with "rl" variable from script "SL_engine_render" . Thanks for all your help.
I'm just sad that Bast never had time to look at this forum. |
|
| |
X-Law Débutant
Messages : 10 Localisation : spain Projet Actuel : 7H
| Sujet: Re: CBNA SmartLight - Moteur de lumière Ven 31 Jan 2014 - 15:11 | |
| @vojtas Yeah I understand what you mean, don't worry. In the end it's upt to you but maybe you can just remove everything but the first map where the error pops up and leave just SmartLight and the process to get to that map... Just an idea, but as I said it's up to you. You think the error is from the 'rl' variable but maybe it' something else that derived to that error. Maybe 'rl' have to read a value specified in another function, script or whatever that it's not initiaziled or specified correctly
Bast will answer here when he gets the time to do so ^^ |
|
| |
chopsuey Utilisateur confirmé: Rang ***
Messages : 523 Localisation : saint etienne Projet Actuel : All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
...
| Sujet: Re: CBNA SmartLight - Moteur de lumière Sam 15 Fév 2014 - 16:04 | |
| Salut, j'ai un décalage asse gênant avec les coordonnées de la lumière quand je veux là déplacer. Je voudrais faire une lampe torche à mon perso mais la lampe a un peut de retard sur le mouvement. J'utilise simplement dans end step: sl_light_x = obj_player.x+lengthdir_x(30,obj_player.angle); sl_light_y = obj_player.y+lengthdir_y(30,obj_player.angle); sl_light_angle=obj_player.angle Dites moi que c'est rectifiable !! (j'utilise la version studio) _________________ - Spoiler:
|
|
| |
onilink_ Modérateur
Messages : 9180 Localisation : Montpellier Projet Actuel : Planet Centauri
OniDev
| Sujet: Re: CBNA SmartLight - Moteur de lumière Sam 15 Fév 2014 - 19:03 | |
| Ça fait la même chose dans begin step? |
|
| |
chopsuey Utilisateur confirmé: Rang ***
Messages : 523 Localisation : saint etienne Projet Actuel : All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
...
| Sujet: Re: CBNA SmartLight - Moteur de lumière Sam 15 Fév 2014 - 19:18 | |
| Ouais même chose. En fait ça fait pareil dans les exemples du moteur :/ _________________ - Spoiler:
|
|
| |
screammusik Débutant
Messages : 27 Localisation : Alsace
| Sujet: Probleme sur game maker studio Sam 15 Fév 2014 - 20:44 | |
| Bonjours a tous. Je suis debutant et j'ai un peu de mal avec le moteur. Premierement j'ai un probleme avec le fichier smartlight de base, quand je lance le "jeu" je reçoit un message d'erreur me disant que game maker studio a cesser de fonctionner et je ne voit pas de quoi ça viens. Ensuite j'ai tenter de refaire un autre fichier game maker pour mon propre jeu en reprenant les script et le obj_engine, j'ai bien fait attention a ne pas laissé de référence du fichier de base comme le spr_character en les remplacent par mes propre objets et sprite. Mais quand je lance le jeu j'ai cette erreur qui s'affiche. - Citation :
___________________________________________ FATAL ERROR in action number 1 of Step Event2 for object obj_engine:
############################################################################################ VMError!! Occurred - Push :: Execution Error - Variable Get -7.rl(100066, 0) at gml_Script_SL_engine_render (line 115) - sl_xx = lengthdir_x(rl/sl_sunshadows_texturesize,sl_sunshadows_direction); ############################################################################################ ############################################################################################
je doit avoir oublié quelque chose mais je ne voit pas trop quoi? Merci d'avance :/
Dernière édition par screammusik le Dim 16 Fév 2014 - 12:35, édité 2 fois |
|
| |
chopsuey Utilisateur confirmé: Rang ***
Messages : 523 Localisation : saint etienne Projet Actuel : All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
...
| Sujet: Re: CBNA SmartLight - Moteur de lumière Dim 16 Fév 2014 - 2:16 | |
| J'ai fini par trouver. Il fallait que je mette mon code de déplacement de mon perso dans begin step ainsi que l'objet light. _________________ - Spoiler:
|
|
| |
Triptidon Bonne participation
Messages : 74
| Sujet: Re: CBNA SmartLight - Moteur de lumière Ven 2 Mai 2014 - 15:05 | |
| salut tout d'abord un grand merci de nous faire profiter de ce moteur totalement incroyable ! c'est vraiment de la bombe. j'avais 2 questions, Chopsuey par chance a répondu à ma première à la dernière page, j'ai regardé un peu en arrière mais pas trop la force de lire les 13 pages donc désolé si la question a déjà été posée. comment générer un objet ou un draw qui soit totalement exclu du moteur, pas d'ombre, pas de changement d'intensité de lumiere etc. Je travaille sur le hud de mon jeu et celui ci est malheureusement quasiment invisible quand il n'est pas pres d'une source de lumière. bon je vais quand meme regarder si la réponse se trouve dans les premiers posts mais au cas où |
|
| |
chopsuey Utilisateur confirmé: Rang ***
Messages : 523 Localisation : saint etienne Projet Actuel : All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
...
| Sujet: Re: CBNA SmartLight - Moteur de lumière Ven 2 Mai 2014 - 15:12 | |
| sers toi de depth. Tu choisis un depth moins élevé que ton objet light_engine _________________ - Spoiler:
|
|
| |
Triptidon Bonne participation
Messages : 74
| Sujet: Re: CBNA SmartLight - Moteur de lumière Ven 2 Mai 2014 - 15:17 | |
| ah oui merci ! je jouais déjà avec les depth de mes objets mais je n'en avais pas mis à l'engine |
|
| |
Bast Administrateur
Messages : 20021 Localisation : Alsace
| Sujet: Re: CBNA SmartLight - Moteur de lumière Mar 6 Mai 2014 - 4:20 | |
| Petite mise à jour pour la version GMS du moteur, corrigeant certains problèmes énoncés ici et ailleurs. FR1.3.2 GMS - 5 Mai 2014- Nouveau système de création de surfaces permettant aux surfaces manquantes d'être créées automatiquement quand nécessaire. - Correction de l'erreur "Unbalanced surface stack" survenant avec les versions 1.3.x de GMS. - Correction de l'erreur "Execution Error - Variable Get -7.rl" survenant lors du rendu de layers vides. - Correction de l'erreur survenant lors du passage entre plein écran/fenêtré. Il est recommandé d'exécuter SL_engine_free() avant de passer d'un mode à l'autre. - Correction du script SL_engine_free(). EN1.3.2 GMS - May 5, 2014- New surface creation system allowing missing surfaces to be automatically created on the fly when needed. - Fixed "Unbalanced surface stack" error occurring in GMS versions 1.3.x. - Fixed "Execution Error - Variable Get -7.rl" error occuring when trying to render an empty layer. - Fixed error occuring when switching between full screen/windowed modes. It is recommended to execute SL_engine_free() before switching screen modes. - Fixed script SL_engine_free(). Téléchargements sur la première page.Edit: La version initialement mise en ligne n'était pas la bonne, je conseille de re-télécharger si vous l'avez prise hier soir. _________________ |
|
| |
Asu Utilisateur confirmé: Rang ****
Messages : 895
| Sujet: Re: CBNA SmartLight - Moteur de lumière Mer 28 Mai 2014 - 21:29 | |
| _________________ <Cysteine> nON mais la touche maj s'active/se désactive toute seule <Cysteine> et a du mal à réponDRE QUANd j'appuie dessus <Cysteine> et je l'ai démont2? IL Ny a rien DEDANs
|
|
| |
Mass *Excellent utilisateur*
Messages : 3351 Localisation : Dans une canonnière wookie. Projet Actuel : Monter des trucs et des machins
| Sujet: Re: CBNA SmartLight - Moteur de lumière Jeu 29 Mai 2014 - 19:50 | |
| Marche pas ton image :p Overblog c'est vraiment des cons. |
|
| |
vojtas Nouveau
Messages : 7
| Sujet: Re: CBNA SmartLight - Moteur de lumière Mar 3 Juin 2014 - 19:16 | |
| Hey Bast I've probably found an error in 1.3.2 version of CBNA Light Engine. Most of the time when I compile whole game it looks ok, but sometimes (1 out of 20), without changing anything in the code I'm getting strange artefacts. When I close my game and compile it again problem disappears. Below two examples (they are not from the same scene, because rooms are randomly generated). When it looks how it should: When it got graphic artefacts: |
|
| |
vojtas Nouveau
Messages : 7
| Sujet: Re: CBNA SmartLight - Moteur de lumière Sam 5 Juil 2014 - 11:44 | |
| Sorry for double post but I wanted to add something to above problem. This graphical glitch/error is now occurring every time game is compiled normally, and not occurring when the game is compiled in debug mode. Don't know what happen, before new update I've never seen such a thing. I would really be glad for any hint from You or Bast. |
|
| |
Bast Administrateur
Messages : 20021 Localisation : Alsace
| Sujet: Re: CBNA SmartLight - Moteur de lumière Dim 6 Juil 2014 - 19:50 | |
| Sorry for the month-late reply!
It seems that the ambient shadows rendering process isn't working properly. It's called by the function SL_sprite_set_ambient() and usually happens only once at the start of the game, unlike the other rendering processes which are all real-time.
I tried to replicate the problem but things are working fine on my end. How much VRAM does your GPU have? Have you tried updating to the latest drivers? And does the glitch also happens on other computers? _________________ |
|
| |
vojtas Nouveau
Messages : 7
| Sujet: Re: CBNA SmartLight - Moteur de lumière Dim 6 Juil 2014 - 21:51 | |
| - Bast a écrit:
- Sorry for the month-late reply!
It seems that the ambient shadows rendering process isn't working properly. It's called by the function SL_sprite_set_ambient() and usually happens only once at the start of the game, unlike the other rendering processes which are all real-time.
I tried to replicate the problem but things are working fine on my end. How much VRAM does your GPU have? Have you tried updating to the latest drivers? And does the glitch also happens on other computers? Geforce 660 with 2GB of VRAM, also AMD FX 8350 and 8 GB of RAM. It's more then enough. I'm updating regularly to latest graphic drivers. Glitch also happens on other computers. For now I've disabled ambient shadows, but when I was testing it seems like those "black box" shadows are based on dimension of original sprite, not the collision mask or anything. I'm still concern why this happens only in normal compile mode and debug mode is free of those glitches? Any idea what should I check for eventual logic error/collision? |
|
| |
hunter222 Nouveau
Messages : 9
| Sujet: Re: CBNA SmartLight - Moteur de lumière Jeu 17 Juil 2014 - 17:41 | |
| Bonjour, J'utilise Game maker depuis seulement 3 jours donc excuser moi si je dis des choses complètement a coté de la plaque mais j'ai une petite question . J'ai decouvert ton magnifique moteur de lumiere hier et fais mes petit test avec sur un plateformer 2D (parce que c'est beau et rigolo) et je me demander si il était possible de recuperer une surface avec les lumieres dessus , que ce soit individuellement ou une par une .
En faite j'ai essayer de faire un "brouillard de Guerre" (c'est le seul nom qui me viennent a l'esprit) en utilisant les lumiere de ton moteur.
Et pourquoi pas l'utiliser pour simuler ce que ton personnage a dans son champ de vision , il ne peut pas voir a travers les mur
edit : Je precise que je touche très peu au bloc que l'on peut mettre dans les evenement j'utilise principalement des scripts , je sais pas si c'est genant |
|
| |
Asu Utilisateur confirmé: Rang ****
Messages : 895
| Sujet: Re: CBNA SmartLight - Moteur de lumière Ven 18 Juil 2014 - 10:04 | |
| - hunter222 a écrit:
- Bonjour, J'utilise Game maker depuis seulement 3 jours donc excuser moi si je dis des choses complètement a coté de la plaque mais j'ai une petite question .
J'ai decouvert ton magnifique moteur de lumiere hier et fais mes petit test avec sur un plateformer 2D (parce que c'est beau et rigolo) et je me demander si il était possible de recuperer une surface avec les lumieres dessus , que ce soit individuellement ou une par une .
En faite j'ai essayer de faire un "brouillard de Guerre" (c'est le seul nom qui me viennent a l'esprit) en utilisant les lumiere de ton moteur.
Et pourquoi pas l'utiliser pour simuler ce que ton personnage a dans son champ de vision , il ne peut pas voir a travers les mur
edit : Je precise que je touche très peu au bloc que l'on peut mettre dans les evenement j'utilise principalement des scripts , je sais pas si c'est genant Après 3 jours d'apprentissage de GM, je crois pas que ça soit une bonne idée d'utiliser un moteur comme ça. Surtout qu'il n'est pas adapté pour un plateformer. Tu te pose beaucoup trop de soucis à mon avis Sinon on appelle ça le "fog of war" plus courament je suppose. Au contraire utiliser le GML c'est bien mieux que le D&D de GM. _________________ <Cysteine> nON mais la touche maj s'active/se désactive toute seule <Cysteine> et a du mal à réponDRE QUANd j'appuie dessus <Cysteine> et je l'ai démont2? IL Ny a rien DEDANs
|
|
| |
hunter222 Nouveau
Messages : 9
| Sujet: Re: CBNA SmartLight - Moteur de lumière Ven 18 Juil 2014 - 13:25 | |
| A la base j'avais tenter de faire mes propres lumières dynamique mais c'était tellement pas efficace que mon jeu ne se lancer pas . En faite , je tente de faire quelque chose qui ressemble a l’excellent "Mark of the Ninja" dans les mécanisme de détection et pour cela j'avais besoin de quelque chose qui ressemble au ombre dynamique ,autant pour les lumières que pour la vue des PNJ ou la vue du joueur (et le fog of war par extension)(c'est très semblable a la lumière dynamique) Et la je tombe sur ce moteur magnifique ; même si je n'utiliserai que les lumière dynamique , quoique les ombre ambiante rendent bien aussi. Mais tu dois avoir raison j'ai pas l'impression que je puisse utiliser ce moteur comme je le voulais . Il faudrait surement que je me familiarise plus avec les surfaces et Game Maker tout court Mais c'est plus fort que moi , j'ai envie de tester ça :p Par contre cette information peut être utile a n'importe qui j'ai essayer de voir avec : global.sl_light_gbuffer sl_light_surface de la lumiere Mais j'avais pas le resultat voulu Du coup je voulais savoir Je precise que j'ai tout mis dans Draw PS : je suppose que D&D c'est pour Drag & Drop (Quand j'ai vu ca la 1er fois je croyais que c'etait Dungeon & Dragon ) et GML doit etre la partie script que j'utilise donc (je trouve plus simple d'utiliser ca). |
|
| |
Asu Utilisateur confirmé: Rang ****
Messages : 895
| Sujet: Re: CBNA SmartLight - Moteur de lumière Ven 18 Juil 2014 - 15:43 | |
| Sinon pour ton problème de cacher un joueur qui n'est pas visible : Dans l'event step de l'ennemi tu pourrais essayer de faire - Code:
-
visible = collision_line(obj_player.x, obj_player.y, x, y, all, 1, true); En remplaçant bien sur obj_player par le nom de l'objet de ton joueur Pas sûr que ça marche. _________________ <Cysteine> nON mais la touche maj s'active/se désactive toute seule <Cysteine> et a du mal à réponDRE QUANd j'appuie dessus <Cysteine> et je l'ai démont2? IL Ny a rien DEDANs
|
|
| |
hunter222 Nouveau
Messages : 9
| Sujet: Re: CBNA SmartLight - Moteur de lumière Ven 18 Juil 2014 - 20:48 | |
| En faite c'est plutôt l'inverse qui me posent problèmes : plutôt que le joueur qui se cache des PNJ ce serait les PNJ qui ce cache du joueur et pas que les PNJ d'ailleurs : les pièges et autres. A moins que je puissent facilement faire disparaître et apparaître des instances sans pour autant les supprimer , l'astuce du "si il n'y a rien entre les 2" n'influencera pas le joueur . Et de toute façon je ne veux pas révéler la disposition des pièces comme pour un labyrinthe Imagine a quelle point ce serai cool de pouvoir reussir a dejouer une embuscade enemie ; en faite le simple fait qu'un adversaire puissent tendre une embuscade organiser est cool |
|
| |
Asu Utilisateur confirmé: Rang ****
Messages : 895
| Sujet: Re: CBNA SmartLight - Moteur de lumière Ven 18 Juil 2014 - 21:08 | |
| Justement, dans ce cas le pnj est rendu invisible si il y a quelque chose entre le joueur et le pnj. Après si ce que tu veux c'est l'IA, je saurais pas t'aider puisque j'en ai jamais fait ^^' _________________ <Cysteine> nON mais la touche maj s'active/se désactive toute seule <Cysteine> et a du mal à réponDRE QUANd j'appuie dessus <Cysteine> et je l'ai démont2? IL Ny a rien DEDANs
|
|
| |
hunter222 Nouveau
Messages : 9
| Sujet: Re: CBNA SmartLight - Moteur de lumière Sam 19 Juil 2014 - 8:28 | |
| J'avais aussi envisager ça mais au moment de poster mon précédent message j'avais complètement oublier qu'il suffit de changer l'alpha des perso :p pour les rendre invisible .
Mais je veux quand même tenter mon fog of war. J'ai même imaginé les 3 couches : -une surface totalement noir qui se découvre quand on y avance (fog of war traditionnelle) .1er Couche -une surface grisé qui fait apparaitre les élément non-pnj déjà explorer dans le dernier état dans lequel on les a vu qui se découvre quand on y avance et se recouvre quand on y est plus. 2em couche -La partie visible par le joueur représenter par une lumière. C'est pas vraiment une couche mais disont 3em couche
Pour cela j'ai besoin d'une surface de la lumiere pour faire un petit "blend substract" sur les 2 surfaces. Je suis pas encore sur pour la 2em couche mais je trouverai bien quelque chose |
|
| |
Térence Utilisateur confirmé: Rang *****
Messages : 2213 Localisation : Oui
| Sujet: Re: CBNA SmartLight - Moteur de lumière Sam 19 Juil 2014 - 15:46 | |
| J'avais tenté moi aussi de faire un fog of war et Dz m'avait bien aidé : https://cbna.forumactif.com/t12778-champ-de-vision-realisteLa solution marche bien sauf que ca devient vite lent quand t'as pleins de trucs (m'enfin ce sera pareil avec smartlight, puis moi j'avais pas mal de calculs en plus). Autrement t'utilise smartlight avec en masque de lumière un cercle sans dégradé, et en 5s ca marche impec'. T'as l'air d'avoir plutot bien capté GM par rapport au temps passé donc je pense que tu devrais t'en sortir ! _________________ Je suis partie sur les ailes du vent et la tempête m'a ramenée.
|
|
| |
Contenu sponsorisé
| Sujet: Re: CBNA SmartLight - Moteur de lumière | |
| |
|
| |
| CBNA SmartLight - Moteur de lumière | |
|