Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 24 Aug 2012
Offline Last Active Sep 10 2015 09:19 AM

#4987843 "Getters" and "Setters" - do you write them if you don't...

Posted by on 07 October 2012 - 08:48 PM

Why write a function for something that's never going to change? While this may not occur much in the home-brew & hobby-est areas, I feel that you're adding the ability to mess with your game. You're just asking someone to abuse a function that was never meant to be used.

I have 10 fingers. That's not going to change. There is no standard function for me to remove a finger. If people are going to 'hack' away at me to attempt to remove said finger(s); I"m going to make them work [hard] for it.

Sorry if this reads weird - I have a bloody headache. :/

#4983846 My Philosophy

Posted by on 25 September 2012 - 08:50 PM

It is not your aptitude but your attitude that determines your altitude.

Posted Image

#4980471 Any ideas for a Megaman X storyline?

Posted by on 15 September 2012 - 02:28 PM

a·bridge, a·bridged, a·bridg·ing. 1. to shorten by omissions while retaining the basic contents

Given the title of the game, perhaps it would be more correct to simply use some of the original storyline... Just my six-pence though. Posted Image

#4980137 Memories in Games (long)

Posted by on 14 September 2012 - 12:47 PM

I'll be upfront, this post may prove to be a bit long. So, if you're not up for a read, you may want to pass by this post.

I'd like to be critiqued on my use of dreams and memories in a game I'm working on. Below is one of the primary memories I intend to use throughout the game, what are your thoughts?

Main Characters



The focus of the dream is the protagonist’s daughter, Hope, who is slightly swinging on the only remaining swing. It’s obvious that she hasn’t yet learned how to swing herself. The player can hear her giggling as she yells, “Push me high, Daddy! Pleeease!

The player controls Justas and may go and speak to any of the characters in the scene (using the action button). Each will be amiable and have short nothings to converse about. Some parents may even thank him for fixing up ‘the old park’. But the primary role of the dream will be the memory of the interaction between Justas and Hope.

The player can move Justas behind Hope and use the action button to push her on the swing. Her giggles will increase the higher she is pushed. And if he misses, her swing hits him [stopping the swinging process] and she says, “Daddy… that hurt…” to which he’ll reply, “I’m sorry, Hope. Daddy should pay more attention, shouldn’t he?” The player may then restart the swinging process.

This memory/dream sequence will end after five successful swinging actions; or, alternatively, by pressing the cancel button at any time.

As the game progresses, small parts of the sequence are removed. At first it’s nothing large and should go mostly unnoticed by the player (maybe a bird here or there). But as time goes on more of the sequence is removed and it becomes completely noticeable that this sequence is not the same as the original. Justas has begun forgetting pieces of the memory… This is a very sore topic for Justas.

If too much time goes by without successfully completing the game the memory/dream sequence setting changes. Dark clouds cover the sun and the park remains completely empty except for Justas who stands staring at an empty swing. At this point, the player can sit in the swing (by using the action button) and Justas will rock back and forth and say, “This isn’t right… Where is Hope?” This will end the memory/dream sequence.

#4977696 Hey, a couple general questions on how to get started making a game

Posted by on 07 September 2012 - 10:12 AM

I agree with wicked357; pick a language and learn it first. Whether it be C++, C#, ActionScript or DarkBasic. It is very important to learn the foundational knowledge before jumping head-first into game programming. If you apply yourself and don't shirk on the basics of your chosen language you'll feel a lot less frustrated.

Start with a simple number based guessing game. There will be few variables to handle and you'll get the feel of the language. Then perhaps move on to a number combination guessing game. Stair-step your progress. Work your way up.

A word of advice - if you're like me and learn a lot from reading tutorials & sites like GameDev.net then NEVER EVER copy and paste. But if you're going to copy - AT THE VERY LEAST type it out. Line-by-line and character-by-character.

#4975180 Designing AI for Quoridor

Posted by on 31 August 2012 - 10:52 AM

I've never played the game (it seems quite interesting though). But it seems to me your evaluations should break down to:
  • Is it more profitable for me to move or to block movement?
To know the answer to this, you'll have to find a way to score the possible actions. If it were me, I'd ask myself:
  • How much is forward movement worth?
  • How much is lateral movement worth?
  • What's my best-case scenario for turns taken to reach the end?
  • How much is blocking my opponent worth?
  • How will blocking my opponent affect MY path?
Then maybe add some weighting and 'personality' to the evaluations:
  • For an offensive player, blocking in the beginning may not be important. But it gets to be VERY important when the opponent starts getting closer to the end (hence the weighting).
  • For a defensive player, maybe blocking is worth more in the beginning.
  • Blocking a path is worth X. But the more turns it adds to the 'Best-path' makes it more valuable.
  • etc.
There's a plethora of ways that the AI can take these into account. I agree with IADaveMark though. Adding layers of obfuscation to your AI will not help anything. It may be a good practice in programming and A.I. theory. But for practicality and usability, you won't benefit from them.


[edit - I should have pre-read this before posting. My grammar was horrible!]

#4974887 Rectangle

Posted by on 30 August 2012 - 01:25 PM

It looks to me like WarAmp was correct in his response. Your logic is only checking a single point of the 20 pixel ball (X, Y). To correct for this you'll have to extend your logic to include the size.

Try something like this:
[source lang="csharp"]if (ballvec.X + ballrec.Width > maxX || ballvec.X < 0)ballspeed.X *= -1;if (ballvec.Y + ballrec.Height > maxY || ballvec.Y < 0)ballspeed.Y *= -1;[/source]

This makes sure that the furthest part of the ball (not just its current position) is taken into consideration (by adding the width and height).

#4973086 Looping Issues

Posted by on 24 August 2012 - 01:33 PM

Oh right now I see instead of it constantly being set to zero if I set it to i it puts it through the loop?

The loop is already present. It's your 'for' command:
[source lang="csharp"]for (int i =0; i < strText.Length; i++){ //Everything inside of these brackets is performed until i = (strText.Length - 1)}[/source]

And because the Substring(x,y) command is inside of the curvy brackets, it is performed with each loop iteration. So it is already being 'put through the loop' (as you questioned). The function Substring(x,y) has two parameters. The first (labeled 'x' here) is the starting index and the second (labeled 'y') is the number of characters to read from 'x'. What's important to understand is that the computer doesn't have the ability to read like a human it keeps the string contents as an array of characters - . The word "Debugging" would look something like: {'D','e','b','u','g','g','i','n','g'}. And by using the substring command, you're asking the computer to return a new array of characters 'y' characters long starting from position 'x'. In your case, you were asking for a new 'string' of characters 1 character long starting from position 0.

By following @soylentrob's advice, you're now asking for a new string of characters 1 character long starting from position i. And i is incremeneted by one (i++) each time the for loop repeats.