Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

154 Neutral

About hereticprophecy

  • Rank
  1. hereticprophecy

    C++ Program runs and then closes

    Can you post some code?
  2. hereticprophecy

    C#: using get and set methods with arrays

    The outside code really doesn't have any access to this property...in fact the only public methods are the constructor and the Update() method, which does all of the handling for highlighting and user input. The whole point in this class is to make it simple for someone to add a new option to this menu: as it stands, you only need to add the name to the enumeration and an additional case in the update switch. If one of our designers wants to add a "Screen Positions" function, they don't have to bother us to do it: they just need to add it to the enum and pseudo-code the case with a TODO.
  3. hereticprophecy

    C#: using get and set methods with arrays

    Thanks for the reply. After stumbling across this page, it seems as though value does the indexing all on it's own (how thoughtful). So, if that is indeed the case, it would make a lot more sense to simply return all fields to the base color, then let value do it's work, like so... Color [] Col_Top { get { return col_Top; } set { for(int i = 0; i < ( TopStatus.GetNames() ).GetLength(); i++) { col_Top = new Color(0,0,255,255); } col_Top = value; } } I'm not sure how value indexes, so the fact that I run through the whole array may mess that up.
  4. I have an array of Colors that I use to highlight selections in a menu, and I would like to use get{} and set{} methods to automate highlighting (menuColor[2] gets highlighted, so all of the others return to the base color). If I run this code to alter a field in my array... menuColor[2] = new Color(255,0,0,255); ...how can I dynamically access that "2" in set{}? From there, it's easy to alter the others with the base color, but I don't know if this is even possible. It seems like a pain to use IEnumerable to find which index is being used, but that's my current solution. Any other ideas?
  5. hereticprophecy

    xna game problem once again pathfinding

    You use a Vector2 to hold each object's position, right? Subtract those vectors and you'll get the vector that connects them. Have your object follow that vector.
  6. hereticprophecy

    Web question

    In my experience, a mix of PHP, HTML, and CSS will get your website doing whatever you want. However, that certainly doesn't mean there aren't more efficient ways of doing things, and so I'll defer to this site for more guidance. It may be overly simplified for someone who already knows the basics of HTML, but if nothing else, it will point you in the right direction of resources that can tell you what you need to know. Hope that helps :)
  7. hereticprophecy

    PHP/MySQL Problem (solved)

    As I found out, the syntax error was in that spot: however, the proper syntax was: SELECT * FROM user WHERE userID = $userID No quotes were needed anywhere.
  8. Below are several snippets of code related to my current web project. I'm building the user's login panel, which will display some pertinent info, as well as their rankings in ladders throughout the site. However, I've hit a pothole: the queries I'm making are resulting in empty rows...it's returning all default values for the fields but not the data I've created inside. I created the entries with phpMyAdmin, which shows them as correct and right as rain. Display page code: <?php include("_mysql.php"); include("functions/userpanel.php"); $userID = 1; $stat = getStats($userID); echo "Statistics for" . $stat['name'] . ":"; echo '<ul>'; echo '<li>' . "Level = " . $stat['level'] . '</li>'; echo '<li>' . "Experience = " . $stat['experience'] . "/" . $stat['to_level'] . '</li>'; echo '<li>' . "Tournament Wins = " . $stat['tourneyW'] . '</li>'; echo '<li>' . "Tournament Losses = " . $stat['tourneyL'] . '</li>'; echo '</ul>'; ?> getStats() Function: function getStats($userID) { //Connect to and select database $dbh=mysql_connect ("localhost", "supafly2_myarcad", "base2088") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("supafly2_ultima"); //Get information for pertinent tables $user = mysql_query("SELECT * FROM 'user' WHERE 'userID' = $userID"); $result['name'] = $user['displayName']; //Store current level and experience to next level require_once("level.php"); $result['level'] = getLevel($user['experience']); $result['experience'] = truncateExperience($user['experience']); $result['to_level'] = toLevel($result['level']); //Store tourneys won and tourneys lost $result['tourneyW'] = $user['tourneyWins']; $result['tourneyL'] = $user['tourneyLosses']; //Search all ladders for user records, store results $result['records'] = searchLadders($userID); //Store results of last match played TODO //Store next scheduled match TODO return $result; } Is this an error in my syntax? Might my database be configured incorrectly? I'm at a loss, so any help would be appreciated. [Edited by - hereticprophecy on April 14, 2007 2:40:54 AM]
  9. hereticprophecy

    What about gyroscopic motion?

    A buddy and I designed and built a mid-sized model rocket that corrected it's own trajectory using several gyroscopes in the middle, and midway through the design process, he asked me the same question: why does gyroscopic precession happen? The best answer I could give him was this... The universe is largely an efficient body: objects stay in their current state of motion since it causes less entropy to do so. The same laziness can be applied to gyroscopes, since they are just objects in motion. When you look at a bike tire in motion, you can force the tire to turn in the "roll" and "yaw" dimensions of motion (since pitch is parallel to the plane of rotation in this case). As you know, any force applied in the mentioned planes will take place 90 degrees later along the rotation. Let's say you turn the wheel to the left, which would equate to opposite forces applied at the direct front and rear of the wheel. How would the wheel react? Both forces will take place 90 degrees later, meaning they will manifest on the top and bottom, rolling the wheel to the right. This reaction makes a whole lot of sense when you consider how lazy the universe is: the rolling of the wheel diminishes the effect of the initial forces until they are effectively zero, leaving the wheel to rotate freely. The wheel attempts to change the plane of rotation until all summative forces are effectively zero. That was the explanation I gave to my friend, and he said it made sense to him. I hope that helps a little in your endeavor.
  10. hereticprophecy

    Designing Game Engines

    Thanks for the replies, everyone. Illuminati and Palidine pretty much summed up what I've been doing so far, so it's good to know I'm on the right path. My next question lies in the content of a game engine or what aspects of the game it should be powering. I read a little on Dungeon Siege's architecture and am attempting to organize my RPG in a similar fashion: a handful of base classes, many derivative classes for specifics. Then I read up on some of the more powerful FPS engines and noticed they were not as much about organization as they were about connecting graphics, physics, and player control. Now, I understand that RPGs and FPSs are vastly different, but should the average game engine include a physics module, graphics module, etc.? It seems to me that it's not as paramount for an RPG (since I'll be starting in text) to have a strong dialogue between the game mechanics and say physics, but should I be concerned with that type of overall structure in the earlier stages? Can those sort of things be ironed out later?
  11. hereticprophecy

    Designing Game Engines

    My question: what are the primary design philosophies behind game engines? While I'm fairly new to game programming, I've noticed that I have much more fun programming a game's architecture rather than the gameplay, graphics, or GUIs. So I endeavored to start programming a basic RPG engine based off a pre-existing pen-and-paper game to get some practice. However, I've come to the realization that I'm not exactly sure what these engines should look like, what they should be doing, and how they should be structured. I can imagine that an engine of the scale I'm working with can pretty much be designed however I need it to be, since performance and generalization will come in time: I'd just like to get moving in the right direction now, rather than changing bad habits later. I'm working in C++ atm, while I'm learning Python, and if it arises, I'll be happy to post some of my primary classes for critique. Any information would be appreciated: links to articles, references to books, personal experience, useful algorithms, and the like.
  12. hereticprophecy

    Abstract Base Class

    The reason it should contain only pure virtual functions is that fact that you're not supposed to actually instantiate your abstract base class. It shouldn't even have a constructor, since all you'll really be using are the derived classes with the overloaded member definitions. Now, when I use polymorphism like this, I put into my abstract base classes anything that all of the derived classes will use. My Actor class has numerous pure virtuals, but includes data members like HP, Level, Name, etc. These data members never need to be initialized until a derived class is instantiated, so it's never been an issue.
  13. hereticprophecy

    IDE difference?

    Python's default IDE and ActivePython will give you everything you need. Komodo and more flashy IDEs will give you what you need and some nice features. Like Rhaythe said, you're probably better off starting with the basic programs and working up from there. Musicians never learn on professional instruments, since most of their usefulness is beyond them, and the same goes with programmers. What's the point in having an awesome debugger if you're still struggling with basic syntax? Compiling in gVim was the worst quarter of my life, but when I finally discovered VC++ I realized how awesome it actually was and was able to better utilize it.
  14. hereticprophecy

    Any good Python IDE's?

    I doubt you'll find something like that for free, but at least I got you to explain your situation beyond "I need a good IDE". Explaining that in your original post will get you an answer more quickly.
  15. hereticprophecy

    Any good Python IDE's?

    Quote:Original post by Epiq im well aware of that, i am looking for an alternative IDE Try to be more specific then. Have you seen ActivePython?
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!