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

theOcelot

Members
  • Content count

    1142
  • Joined

  • Last visited

Community Reputation

498 Neutral

About theOcelot

  • Rank
    Contributor
  1. So far, every tree node just has a self.scope member (which may as well be self.parent). When it sees a name reference, it calls self.scope.reference(the_name), which either returns the name or calls self.scope.reference recursively until there's either a value or a name-not-found exception. This system naturally allows identifier shadowing.
  2. I was planning on leaving it in a format pretty close to a parse tree, so keeping track of dependencies shouldn't be too hard. But if a name is suddenly defined in an inner scope (further in) or otherwise changes where it points, it would be hard to detect that and update. NameReference's are their own nodes. To mark themselves dirty, they would have to detect when any of their containing scopes changes, and the list of containing scopes itself might change. I guess there aren't a lot of shortcuts. Thanks for your help.
  3. I see what you mean about spreadsheets being different. I think what I had in mind with spreadsheets was stuff like: [code]a = 3 b=4 c = 5 foo = a + b bar = foo - c[/code] ...and getting the value of bar while preserving the relationships, blah blah. It's much more straightforward to represent everything as functions here. I had kind of forgotten about the halting problem here. Oops. Generally, I did have something functional-ish in mind, but I want the flexibility to do things like the first example, as well. Does that mean caching (and recalculating based on a flag) is going to be the only shortcut, at least for objects like that? I think I should be able to use some of the spreadsheet type tricks too. Are there any specific topics/algorithms I should look up? P.S. I don't want to get hung up on spreadsheets. That's just the only application I could immediately think of with that kind of logic.
  4. I want to implement a data language like the example below, in a way that it can be read from and also modified and reserialized with all the generative structures in place. Please pardon the slightly weird syntax. [code]-- a boolean function. most will be more complicated. f = function(n) n * n == 16 end -- Control structures return streams of key-value pairs, -- which are automatically added to the map, in order. my_map = { foo = 'default value' -- a simple assignment creates a string key for key in ['bar' 'baz' 'foo'] do -- '@' introduces a new key in the map -- for ex. @'foo' = 'bar' is equivalent to foo = bar -- but @ allows non-strings and values of variables to be used as keys @key = 'another value' end if f(4) do foo = 'yet another value' end }[/code] What's the value of my_map['foo'], if later definitions of foo override earlier ones? It's not too complicated to just evaluate it all and see it's 'yet another value', but I have to evaluate all the control structures and merge them into the map to be sure. But I might want to keep all of them intact if I reserialize the data. Further suppose I want to allow users to modify this structure, or change the input variables, and show the updated value of foo in real time. I want to dig the correct value out of the control structures without hurting them. The brute-force solution would be to re-evaluate the entire data structure (basically the parse tree) into a separate copy every time it's changed, and query the resulting simplified structure. But that seems inelegant at best, and for larger, more complicated structures it would become inefficient. Caching and updating based on a dirty flag would work, but I don't know if it's the best solution. So basically, the data I want may be locked up in control structures I don't want to destroy. I'm sure this isn't a super hard problem; a typical spreadsheet does something similar with its formulas. What techniques are usually used in situations where you have interconnected data that you want to read and modify? This will be implemented in Python at first, but I hope to do it in C later, and maybe others. Thanks for reading.
  5. Do you actually need all those flags all at once? Can't you divide them into sets that are only used in different contexts, and can share values?
  6. Knowing which design features are used across different genres is not the same as knowing how to code them in a way that can be used in games from different genres. On the other hand, a certain amount of decoupling is good just for your own sanity while developing, even if you don't try to re-use stuff.
  7. It won't. Gaining a visceral understanding that the syntax is secondary to what the code actually does can only help you. For that reason, I would encourage you to learn languages with different kinds of syntax, as long as you're learning, at least. Anyway, my personal recommendation is Python. After a long stint with C++, it made programming fun again. [img]http://public.gamedev.net/public/style_emoticons/default/smile.gif[/img]
  8. For crying out loud, don't run commands without knowing what they are or how they work.
  9. Edit: crud, how do I delete posts now?
  10. And now it's successfully integrated. Now if I can just put an iScroll in each screen...
  11. [quote name='metallicsoul92' timestamp='1295388560' post='4760917'] I wanna make a game, however, i want to be able to edit it fast and efficiently. I was gonna make a construction set, however, my microsoft studios doesnt support resource editing, so i kinda just have to view the code and write inside of it. What are some of the functions i could use in order for me to add to the top bar (other then about and quit). Ive gotten a brief idea , but its only because of my method of just edit the code to see what happens haha. [/quote] I'm not sure how serious you are about that, but you're going to have to get beyond that method and learn to read the directions. There is a ton of documentation about how to do windows menus. [url="http://msdn.microsoft.com/en-us/library/ms632583(v=VS.85).aspx"]Here[/url] is probably a good place to start.
  12. ...which provides instructions for laying out divs side to side: [url="http://flowplayer.org/tools/demos/scrollable/index.html"]http://flowplayer.or...able/index.html[/url]. Cool. The trick is to have a really, really wide div between the outer one and your items, and then put overflow:hidden on the outer one, as well as putting float:left on the items. Full (basically) minimal example, a slight mishmash of my and Scrollable's requirements with the absolutely essential parts marked: [code]<html> <head> <title>Horizontal Layout</title> <style> body, html{ margin: 0; padding: 0; } #scrollable{ /* required for sideways layout */ overflow: hidden; /* required for jquery tools scrollable */ position: relative; width: 100%; /* any dimensions should do */ height: 100%; } #items{ /* required for sideways layout */ width: 2000em; /* arbitrarily large; can't be too big */ /* required for jquery tools scrollable */ position: absolute;; /* then whatever other properties you need */ height: 100% } .item{ /* required for sideways layout */ float: left; /* then whatever other properties you need */ width: 20em; height: 100%; border: 1px solid black; } </style> </head> <body> <div id="scrollable"> <div id="items"> <div class="item"> I'm in the first box. Use a small browser window to get the full effect. </div> <div class="item"> Second box. </div> <div class="item"> Third box. </div> <div class="item"> You get the idea. </div> <div class="item"> Can you see this one? </div> </div> </div> </body> </html>[/code] I'll probably need to use javascript to get the individual pages to be the same size as the screen, since the extra-wide div messes up width:100%, but that's only a slight hack, and I was willing to consider worse. Thank you.
  13. I'm writing a web page which I want to consist of a series of full-page-size screens which slide sideways on and off the screen. This is for simple math tests, but I've seen the same idea in online checkout systems and surveys. I've had trouble implementing it, though. My idea was to make each screen a full-size div, get them to lay out side by side and use CSS animations to move between them. The "side by side" part turned out to be tricky, though. Lots of ways work for divs smaller than the screen, but the always want to wrap when they hit the edge of the screen. I've tried floating them all to the left and making them display:inline-block, I've tried using -webkit-box-orient:horizontal and overflow:hidden on the containing element(s), but it never works. They wind up going down the page. If I absolute-position them and use javascript, I have to move all of them (or at least the two visible at any time) at once to effect the slide. If there's a trick, I'm not getting it. How can I make this work? How is it usually done? Details: long story short, I'm using a mobile webkit browser embedded with a server into a mobile app. Long story: [url="http://www.appmobi.com/index.php?q=node/27"]AppMobi.com[/url]
  14. [quote name='Seaßourne' timestamp='1295302404' post='4760377'] [quote name='theOcelot' timestamp='1295213371' post='4759789'] [font="arial, verdana, tahoma, sans-serif"][size="2"][quote name='Seaßourne' timestamp='1295191119' post='4759647'] The only bad thing about [Python] is that its syntax isn't enforced. Like one module might write some functions this way and the next will do it differently.[/quote] Wait... what? I fail to see how that's not a universal problem. In fact, Python's significant whitespace makes its syntax more "enforced" than most popular languages.[/size][/font] [/quote] Yes the whitespace, but the naming of functions, class naming isn't enforced like you see in C# for example. In Python you can def class Foo, the somewhere else you might soo class foo, etc. [/quote] Hmm, I have not heard of this. Are class names in C# required to be capitalized or CamelCase or something? Cursory googling doesn't tell me much about this.
  15. [font=arial, verdana, tahoma, sans-serif][size=2][quote name='Seaßourne' timestamp='1295191119' post='4759647'] The only bad thing about [Python] is that its syntax isn't enforced. Like one module might write some functions this way and the next will do it differently.[/quote] Wait... what? I fail to see how that's not a universal problem. In fact, Python's significant whitespace makes its syntax more "enforced" than most popular languages.[/size][/font]