• 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.

Kristian Gorenc

  • Content count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About Kristian Gorenc

  • Rank
  1. I've found another way to create a simple lightbox/colored area. But still can't combine all together. So... For Lightbox I have this: [CODE] <style> .black_overlay{ display: none; position: absolute; top: 0%; left: 0%; width: 100%; height: 100%; background-color: black; z-index:1001; -moz-opacity: 0.8; opacity:.80; filter: alpha(opacity=80); } </style> <body onload="document.getElementById('fade').style.display='block'"> <div id="fade" class="black_overlay"></div> </body> [/CODE] And for time determination I found this (example time inputed): [CODE] <script type="text/javascript"> onload=function(){ var rightNow = new Date(); var hour = rightNow.getHours(); var newDisplay = 'none'; // unless we see otherwise if((hour>= 1) && (hour<= 5)) { newDisplay = 'block'; } } document.getElementById('fade').style.display=newDisplay"</script> [/CODE] I can't seem to connect those two to work like I want :/ Help is greatly appreciated!
  2. Thanks for the answer! Yes, I called the script in the body onload, but my problem is that I don't know how to "connect" the script for lightbox and the time of day part. My idea to determine the time of day is following: [CODE] <SCRIPT type="text/javascript"> day = new Date() hour = day.getHours() if ((hour == 8) || (hour == 9) || (hour == 10) || (hour == 11) || (hour == 12) || (hour == 13) || (hour == 14) || (hour == 15) || (hour == 16)) { // Show the red <div> }; if ((hour == 17) || (hour == 18)) {// show the green <div> and "else - show no div }; </SCRIPT> [/CODE] How can I incorporate the time determination in the light box script which I published in my first post? @Telastyn: I doubt the situation will come so that I would need this - onload is good enough. thanks!
  3. Hello guys! I've been trying to do the following: If the time of day is between 8:30 and 17:00, the whole page is covered by red "lightbox" div. If time is between 17:00 and 18:00 the page is covered by green lightbox div. For other times there is no lightbox effect (div is not "active"). Optionaly one could "disable" the div (be it red or green) by pushing a button. Till now I've tried several different approaches but with none of them I could "start" the div. For lightbox I used this script: [CODE] <script type="text/javascript"><!-- // Content Box (Lightbox) Over Shaded Web Page // Version 1.0a // September 24, 2009 // Copyright 2009 Bontrager Connection, LLC var IEmax = 2000; var IE = (navigator.userAgent.indexOf('MSIE') != -1) ? true : false; var xDialogBoxPosition = 0; var yDialogBoxPosition = 0; var ViewportHeight = 0; var RealLength = 0; var PageWidth = 0; var PageHeight = 0; var ShadowDiv; var DialogDiv; function GetViewportDimensions() { var viewX = 0; var viewY = 0; if(self.innerWidth) { viewX=self.innerWidth; viewY=self.innerHeight; } else if(document.documentElement&&document.documentElement.clientWidth) { viewX=document.documentElement.clientWidth; viewY=document.documentElement.clientHeight; } else if(document.body) { viewX=document.body.clientWidth; viewY=document.body.clientHeight; } return Array(viewX,viewY); } // function GetViewportDimensions() function GetPageDimensions() { var pageX = 0; var pageY = 0; if(window.innerHeight && window.scrollMaxY) { pageX = window.innerWidth + window.scrollMaxX; pageY = window.innerHeight + window.scrollMaxY; } else if(document.body.scrollHeight > document.body.offsetHeight) { pageX = document.body.scrollWidth; pageY = document.body.scrollHeight; } else if(document.body.scrollWidth && document.body.scrollHeight) { pageX = document.body.scrollWidth; pageY = document.body.scrollHeight; } else { pageX = document.body.offsetWidth; pageY = document.body.offsetHeight; } var viewDimensions = GetViewportDimensions(); if(pageX < viewDimensions[0]) { pageX = viewDimensions[0]; } if(pageY < viewDimensions[1]) { pageY = viewDimensions[1]; } else if(IE) { pageY += 25; RealLength = pageY; ViewportHeight = viewDimensions[1]; if(pageY > IEmax) { pageY = IEmax; } } return Array(pageX,pageY); } // function GetPageDimensions() function ShadeTheWindow(shadow) { var pageDimensions = GetPageDimensions(); PageWidth = pageDimensions[0]; PageHeight = pageDimensions[1]; ShadowDiv = document.getElementById(shadow); ShadowDiv.style.width = PageWidth + "px"; ShadowDiv.style.height = PageHeight + "px"; ShadowDiv.style.display = "block"; } // function ShadeTheWindow(); function PositionDialogDiv() { var xScrollPosition = window.pageXOffset ? window.pageXOffset : document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft; var yScrollPosition = window.pageYOffset ? window.pageYOffset : document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop; if(IE && PageHeight == IEmax) { var shadowpos = ( yScrollPosition < (IEmax - ViewportHeight) ) ? 0 : yScrollPosition - 1; if( (shadowpos + PageHeight) > RealLength ) { shadowpos = RealLength - IEmax; } ShadowDiv.style.top = shadowpos + "px"; } DialogDiv.style.left = xDialogBoxPosition + xScrollPosition + "px"; DialogDiv.style.top = yDialogBoxPosition + yScrollPosition + "px"; } // function PositionDialogDiv() function DisplayDialogDiv(dialog) { DialogDiv = document.getElementById(dialog); if(xDialogBoxPosition == 0 && yDialogBoxPosition == 0) { xDialogBoxPosition = parseInt(DialogDiv.style.left); yDialogBoxPosition = parseInt(DialogDiv.style.top); } PositionDialogDiv(); DialogDiv.style.display = "block"; window.onscroll = PositionDialogDiv; } // function DisplayDialogDiv() function PresentDialogDiv(shadow,dialog) { ShadeTheWindow(shadow); DisplayDialogDiv(dialog); } // function PresentDialogDiv() function RemoveDialogDiv() { DialogDiv.style.display = "none"; ShadowDiv.style.display = "none"; } // function RemoveDialogDiv() //--></script> [/CODE] and Div's [CODE] <div id="shadeDivID_red" style=" display:none; z-index:100499; position:absolute; left:0px; top:0px; width:100%; height:100%; margin:0; padding:0; border:none; opacity:0.4; filter:alpha(opacity=40); background-color:#FD0006; "> </div> <div id="shadeDivID_green" style=" display:none; z-index:100499; position:absolute; left:0px; top:0px; width:100%; height:100%; margin:0; padding:0; border:none; opacity:0.4; filter:alpha(opacity=40); background-color:#0F0; "> </div> [/CODE] But I don't know how to execute this lightbox divs according to the times written above. Or how to "kill" the lightbox with a push of a button. Thanks for helping a noob [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img])
  4. [quote name='Antheus' timestamp='1329661039' post='4914502'] [quote]The data in my txt file is organized so one word is in each row. When included (because it's raw data) the parsed result is that all words are in one row. How can I put the output in my "new page" (with txt included) so it's one word in each row?[/quote] Some formatting needs to be applied to the txt file. Ideally, it would be formatted as <ul> to preserve semantic meaning. Depending on where the txt comes from, it might be simpler to modify that or modify whatever generates it. [/quote] What if it's hard to modify the source that generates the txt file? Is there a way to format the output with CSS? Thanks!
  5. Hello! I'm not a skilled web-programmer (as it's obvious from the question [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]). My problem is the following: I have a "New Page" into which I included two files (with PHP include function). One of them is [u]html[/u] and one of them is [u]txt[/u]. The page into which I included the two files has different design than the html document included, so I want to change the CSS of the included part on my new page. The result would be that included html file on its own has it's own CSS design and on the "new page" into which the html is included it has different design. Huh, I hope I didn't complicate to much [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] Another question related to the included txt file: The data in my txt file is organized so one word is in each row. When included (because it's raw data) the parsed result is that all words are in one row. How can I put the output in my "new page" (with txt included) so it's one word in each row? Thanks a bunch!