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

Deprecated

Members
  • Content count

    35
  • Joined

  • Last visited

Community Reputation

107 Neutral

About Deprecated

  • Rank
    Member

Personal Information

  • Location
    Sweden, Linköping
  1. [i]Self-encrypting Code to Protect Against Analysis and Tampering (J. Cappaert, et al.)[/i] comes to mind. A simpler way to provide strong security against reverse-engineering would be polymorphic encryption. Oddly enough it's a technique that originated from the malware hobbyists and although it's nowadays used by serious software developers a lot of good documentation and examples can be found on sites focusing on malware development and (software) security analysis. It is disputed whether or not it is possible to create a software that can't be detected and therefore analyzed (see Blue Pill malware), although it is possible to protect the code good enough so that the effort of cracking it outweighs the worth of cracking it. Although you could write every single function of your program so that it could be encrypted and loaded into memory only one function at a time (which makes both recursion and object-oriented programming impossible, by the way) it is highly unlikely that you'll find a graphics library that works with that kind of programming. It is also highly unlikely that you'll need that kind of security. As [url="http://www.gamedev.net/user/78358-frob/"]frob[/url] said, [i]you need to consider who you're protecting yourself from and how much your data/code is worth to them.[/i]
  2. You're looking to create a [url="http://en.wikipedia.org/wiki/Text_user_interface"]TUI[/url] ([Text|Terminal] User-Interface). There are several resources available to do this with far less work than a graphics library like SDL/SFML/OpenGL/DirectX would require, if you're willing to use Linux for the clients suggestions can even be found in the wikipedia article I linked.
  3. [quote name='Charabis' timestamp='1326153204' post='4901126'] Detects 3 files even though only one is in the folder. The other two filenames it picks up are "." and "..". Wrapping the the line to load the file inside [/quote] The symbolic links [font=courier new,courier,monospace].[/font] and [font=courier new,courier,monospace]..[/font] represents the current and the previous folder. [font=courier new,courier,monospace]'C:\Program Files\.\.\.\..\Program Files\..'[/font] should place you in[font=courier new,courier,monospace][font=arial,helvetica,sans-serif] [/font]'C:\'[font=arial,helvetica,sans-serif], assuming that there is a directory called Program Files in your root.[/font][/font] [i][font=courier new,courier,monospace][font=arial,helvetica,sans-serif][b]Edit:[/b] Added the quote I was responding to.[/font][/font][/i]
  4. You're not understanding me... The code I posted will output a sequence of data that represents the image. Below are some examples on how to work with the above example in python. Although I haven't tested the code, in the first example, [font=courier new,courier,monospace]bytestream[/font] should be accepted by SFML as an image in memory. 1. To read the data as a stream of bytes in python [CODE] import urllib.request bytestream = urllib.request.urlopen('http://localhost:80/~username/gamedev.php') [/CODE] 2. To read the data as an array of bytes in python [CODE] import urllib.request bytearray = [c for c in urllib.request.urlopen('http://localhost:80/~username/gamedev.php').read()] [/CODE] 3. To read the data as a stream of bytes and save it to file in python [CODE] import urllib.request open('image.png', 'wb').write(urllib.request.urlopen('http://localhost:80/~username/gamedev.php').read()) [/CODE]
  5. Remember that your browser will interpret images and render them for you, instead of outputting the bytes they consist of. The code I posted will output the raw data from the image, meaning the bytes it consists of. I'm not sure whether or not C# [font=courier new,courier,monospace]Texture2D.LoadImage()[/font] accepts data containing the file-header, but unless you plan to output something that could be evaluated and parsed by C# I think you'll have to output the actual file. $ lynx -source http://localhost:80/~username/gamedev.php [CODE] ?PNG ? IHDR2??? pHYs???o?d OiCCPPhotoshop ICC profilex?SgTS?=???BK???Ko RB???&*! J?!??Q?EE? ... [/CODE]
  6. There is no [font=courier new,courier,monospace]to_str()[/font] method that will convert your array to readable data in PHP. If you want to display the content of an array (or any other object) you'll have to use [font=courier new,courier,monospace]print_r($mixed)[/font]. If you want your PHP script to output an image you could use the code below; [CODE] <?php $file = 'creature.png'; header('Content-Type:image/png'); header('Content-Length: ' . filesize($file)); print(readfile($file)) ?> [/CODE] [i]P.S It is very important that you do not output any kind of data (not even a newline, space or tab) anywhere else in the code. D.S[/i]
  7. The first problems at [url="http://projecteuler.net/problems"]http://projecteuler.net/problems[/url] are pretty easy to solve, although they should provide some challenge if you're not familiar with conditional statements, loops and/or functions. Write a simple [i]text-based[/i] game where the computer picks a random number and you have to guess that number. Make the computer tell you whether your guess was greater than, or smaller than the actual number. Create a deck of cards, write functions to shuffle the deck, sort the deck, display the deck, pick a card from the deck and anything else that you would normally do with a deck of cards. Write a simple [i]text-based[/i] blackjack game where you play against the computer using the deck you designed earlier. Try to solve the first 20 problems at [url="http://projecteuler.net/problems"]http://projecteuler.net/problems[/url], and make sure to read the papers you get for completing each challenge.
  8. Oh sorry! [font=courier new,courier,monospace]this[/font] will refer to the actual instance created from your class. You don't have to use it, but since I used the same names for parameters as instance variables it depends on the implementation of that particular language whether it'll work without [font=courier new,courier,monospace]this[/font] or not. Think of it like [font=courier new,courier,monospace]the_variables_that_are_defined_on_the_very_top_of_the_class.strength[font=arial,helvetica,sans-serif] , it is the same as when you're using [font=courier new,courier,monospace]numGen[font=arial,helvetica,sans-serif] to call [/font]numGen.Next(...)[/font] but as there is no name for the instance yet you can use the keyword [font=courier new,courier,monospace]this[/font].[/font][/font]
  9. Even though there is a great difference between a hero and his/hers nemesis in real life, if you look at your code there is (almost) no difference at all. I'd suggest that you create a class Creature/Human/Entity instead and create two separate instances instead. [CODE] class Entity { private int health, strength, weaponStrength, defence; private bool isAlive, isEvil; private string identity; public void Entity(int health, int strength, int weaponStrength, int defence, bool isAlive, bool isEvil, string identity) { this.health = health; this.strength = strength; this.weaponStrength = weaponStrength; this.defence = defence; this.isAlive = isAlive; this.isEvil = isEvil; this.identity = identity; } public int getStrength() { return this.strength; } public Calculate(Entity enemy) { return this.strength - enemy.getStrength(); } } ..... Entity hero = Entity(100, ..., "Good Guy"); Entity nemesis = Entity(100, ..., "Nemesis"); [/CODE] [i]Heads up, I've never written a single line of code in C# so the syntax may be a little off.. Took a guess from the code you provided. Although the concept should be correct.[/i] [i]P.S You should be using getters and setters instead of public variables, gives you more control over you code; google "getters and setters C#" and it should be one of the first results. D.S[/i] [i][b]Edit:[/b] Added a getter for strength.[/i]
  10. I'm guessing your building your own engine/library intended for other people to use? Either way, my most personal opinion is that you can't protect another programmer from every silly mistake he or she might do. If it's documented that you should use enum values and someone attempts to use [font=courier new,courier,monospace]'4'[/font] it should simply fail, preferably with an error message telling that programmer to read the .. manual. If you actually try to protect someone from every possible error you'll realize that you can never do that good enough. What if one programmer uses the string 'cast' hoping that you'll provide typecasting while another programmer uses the same string 'cast' hoping that his or hers character will throw a fireball? [i][b]Summary:[/b] Use integers if only one option is available; if there's several options (flags) available you could use bitmasks. Make sure to document it.[/i]
  11. No, there is no program you could use to help you make a "simple" game like mario. You write everything in code and you test everything in code. I hate to be blunt, but on the other hand I wish someone had told me the same thing a couple of years ago so I didn't have to spend 2 years figuring out that I wasn't the best programmer the world had ever known. Here goes, [i]you are not [b]yet[/b] good enough to write your own game, not even mario, tetris or pong.[/i] Start with figuring out how that calculator you wrote with the help of a tutorial really works, change something and see if it breaks, make addition work like subtraction for a while, try to rewrite the calculator without looking at the tutorial or your previous code. Have a look at [url="http://projecteuler.net/"]http://projecteuler.net/[/url] and see if you can solve some of the first 10 problems using the programming language of your choice. Read the papers you get for completing each problem. Try to write a "guess the number" game like this one [url="http://www.dreamincode.net/forums/topic/76122-c%23-tutorial-basic-gui-guessing-game/"]http://www.dreamincode.net/forums/topic/76122-c%23-tutorial-basic-gui-guessing-game/[/url], then change it from 1-10 to 50-1000, add something else... And if you're really into programming, read a book about the programming language you're learning (although I can't recommend any good books for C#, guessing Microsoft has one). If you start your career in programming with attempting to make something great I can promise you that you'll end up with nothing but a bad experience.
  12. I asked about the same question yesterday, you can find the answer I got here (http://www.gamedev.net/topic/617960-how-to-handle-update-rate/page__view__findpost__p__4899430). But to be honest, you're trying to get 60 FPS and you've got it already. You will never get exactly 60 FPS (unless casting to int) for 2 reasons. 1) (I'm assuming) you're not in total control of the system you're running on. Your application probably wont get 100% of the CPU time, at the very least the OS will keep some to render your desktop, move your mouse etc. 2) You're not in total control of the code. What if SDL_GetTicks() takes about 1 ms to generate the answer? As SDL_GetTicks() is part of your frame limiting you'll always be a little off. Same goes for variable assignment, addition, division, increment, if/loop -statements.
  13. Thanks! As it is tile-based and I'm only working with integers for positions and angles I figure each entity should have internal "countdowns" for the amount of updates needed before moving or communicating with other entities (assuming it takes more than 1 timestep)?
  14. (A standard implementation of) [i]dynamic[/i] arrays are usually pretty slow at inserting and/or removing elements from the middle of the list as all data has to be copied. Although they are really fast for iteration and lookup. Depending on your definition of [i]a lot[/i] you might want to initialize the [i]dynamic[/i] array so you don't end up doubling a [i]dynamic[/i] array containing 20M elements in the middle of an update. (A standard implementation of) lists are pretty fast at inserting and/or removing elements anywhere in the list. Although they are not as fast when it comes to iteration and slow (in comparison) to arrays when it comes to lookup. Depending on how you're using the container you'll get different results, although it's impossible to tell from the description you gave. Although if you want to analyze the performance of your program based on the type of container used you can find the complexity of each operation at [url="http://en.wikipedia.org/wiki/Vector_(C%2B%2B)"]wikipedia[/url], or you could simply change the type of container and time your functions. [i][b]Edit:[/b] been working too much with python lately, a standard implementation of arrays are of course fixed size.[/i]
  15. I have to say that I disagree with the people above. Logic is a part of math, but math is not logic. Programming is almost nothing but logic, but logic is not programming. Understanding the syntax of a programming language and the semantics of the paradigm of your implementation makes you a great programmer. Although there are things you might have to implement with programming that requires math, physics for example. There was very recently a kid (from Sweden, unless I'm mistaken) who wrote an iPhone application to summarize the information from various sites such as wikipedia, wolframalpha, etc. which was downloaded by several thousand people and which made their life simpler. And there's really not much math needed to append a string to another string or display it in a user-friendly way. You do [b]not[/b] need to understand math to become a programmer, and you do [b]not[/b] need to understand the science of nutrition to become a bodybuilder.