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


  • Content count

  • Joined

  • Last visited

Community Reputation

124 Neutral

About future_man

  • Rank
  1. OK I solved my problem like this: $current_time = date_create(date("Y-m-d H:i:s")); $last_time = date_create(date("Y-m-d H:i:s", strtotime(get_last_update_time($user_name)))); $result = date_diff($current_time, $last_time); echo $result->format('%Y-%m-%d %H:%i:%s'); but it echoes my result like so: "00-0-0 03:40:56", with all the days etc.. How do I format this so that it only show hours, lets say like so: "232156". With all the days, months years, formatted to hours?
  2. I looked into this diff function already but how do I use it?
  3. I want to subtract database timestamp from current server time. The formatted time that is returned to me from my database is "2013-09-01 22:05:39" and I use function date("Y-m-d H:i:s"); so that my server time I get in php is in the same format.   How can I get a result in hours? Example: 2013-09-01 22:05:39  minus 2013-09-02 22:05:39 equals 24 hours ???
  4.   Thank you, I did a similar approach! Turns out you really need to just put a break tag at the end and echo it :D how simple is that
  5. Hey, I want to list all of my database entries to a nice html format. For every unique id there is one row displayed out from my database to my php/html. I just don't know how to do that. I tried using while loop and foreach I just don't know how to properly structure them... My query and php code looks like this: $query = mysql_query("SELECT * FROM sport"); while($row = mysql_fetch_array($query)) { $result = $row['sport_ime'].' '.$row['sezona']; }
  6. Lets say I have a form in form.php and when I click submit all inputted data is sent to model.php for database manipulation etc.. and then when everything is done the model.php redirects user back to form.php using function: header('Location:form.php'); How in the blazing hell can form.php recognize I was redirected there from model.php ? I am so lost about this for so long now, I tried $_SERVER['HTTP_REFERER'] and everything and I just get an echo with my current page location. I want to get an echo of the model.php on my form.php  
  7.   Except if you have index.php with all of the includes in your root, am I right?
  8. How do you make a root directory though? Isn't the place you get with the server always the "root"? Or can you access diferent folders on a bought server and place files in the more safer place for example?
  9. What does that mean for the directory structure though? Can I just trough everything in private folders or I must allocate a directory that is available for public use?
  10. I am curious about server access. Lets say you buy a hosting service, can you manually decide which directories will be public and which will be off limits? Do public directories have to include views (templates)? Because in a lot of frameworks I see views in private directories. Can you block access via .htaccess and only allow users to browse certain pages? How do you prevent them from browsing your entire php app files?   I know this is a lot of question but a simple overview about directory structure in apache servers will do, since I am building one.
  11.   Yes you are right, however I am also aware of this form of "cheating" this is why I simply solved the problem with database entry. You see every location updates the users "location" in the database and a simple function to call that "location" is in order for every new choice user makes to travel. If I am to create a new location I will simply include that function on my new location php page controller. Also I intend to hide full URLs via .htaccess but that is simply for nicer UI.
  12. Hey, I was asking a lot of questions lately on this forum and it all boiled down to this one. We all know it is hype to implement front controller or master page index.php that handles all the requests to all the pages and reroutes you etc... All this for cleaner urls, easier code handling...   But what if you have a browser game with a lot of locations and variables, states, conditions etc.. I can't write a million if statements or switch statements on my index page. What if I implement such page structure as described below? Basicly you don't have single point of entry or one front controller but more main controllers that connect to subcontrollers: if location forest if loged in |---------------------------- forest.php |------------------ start.php -------------| | | if location home | |-------------------------- homebase.php | | | | if location else index.php---------| |------------------------- anywhere.php | | if in fight |------------------- combat.php | | if not loged in |------------------- homepage.php Why would all pages have to go through index.php? This would be a big mess! Divide pages based on location, for example my start.php page will decide where to redirect further. So in this case I have two bigger controllers not just one front one. Is this still a good convention? I mean is this still a good front controll design or is it better to leave all the redirects to index.php?
  13.   But what is so wrong about simply having the URL http://www.myserver.com/posts/byUser/24  I get the part you can make shorter URLs and such but why  index.php?url=posts/byUser/24 instead of http://www.myserver.com/posts/byUser/24 ?   Another thing why would I use this if my user has to log in to access the page anyway? I could simply use $_SESSION variables to display correct data on my index page... like so (I am building a simple browser game): if ($_SESSION['combat'] = true) { include 'certain_page.php'; } else if (...) { include 'another_page'; } else if ..... etc...
  14. But I hear that index.php or so called fron controller makes things act more like a coherent system and less like a loose collection of standalone pages. And you also have a bigger control over your page?   You are correct I am building a browser game, a simple one. And redirecting everything to your front page is supposed to be a good idea for better control over which views/templates to load.   I just don't know how to implement this, I mean right now I access new pages via links or forms. And when the link or form sends a request to a database, should that database return the result to the controller and that controller to the fron controller, or what...
  15. I know some people make a single point of entry to their website which is usually index.php - the first site you visit and login from.   But what is this exactly? Is it a controller that decides which webpages to show like in this tutorial http://www.technotas...ont-controller/ ?   Why would you want a controller for a whole page?   How does it work? Does it just redirect every link you click to the index.php and every header in php leads to index.php?   In the provided tutorial, author goes on how we type the url and it redirects us to index.php. But what does this mean in reality, when you must click links and forms to navigate through a website?   Does this mean that every submitted form and every new php page redirects to controller page and then the controller page redirects everything to index.php?