The Sinister Design Forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the new Sinister Design forums!

Pages: 1 ... 31 32 [33] 34 35 ... 118

Author Topic: Ask the developer a question!  (Read 270701 times)

HeadShot

  • Mechanic Captain
  • **
  • Offline Offline
  • Posts: 73
  • WOAH! My head? Where- oh.
    • View Profile
Re: Ask the developer a question!
« Reply #480 on: December 27, 2010, 02:06:17 PM »

WARNING: This is going to be possibly the stupidest question EVER!!!!!!

How do you get affinitys? (Told ya)
Logged
My head got shot up once. And I lived and my head Remained.....

CraigStern

  • The Creator
  • Administrator
  • General
  • *****
  • Offline Offline
  • Posts: 3227
    • View Profile
    • Sinister Design
Re: Ask the developer a question!
« Reply #481 on: December 27, 2010, 02:16:40 PM »

Once you get far enough in the plot, something happens where you can get your affinity. You're almost guaranteed to stumble onto it sooner or later. ;)
Logged

HeadShot

  • Mechanic Captain
  • **
  • Offline Offline
  • Posts: 73
  • WOAH! My head? Where- oh.
    • View Profile
Re: Ask the developer a question!
« Reply #482 on: December 27, 2010, 02:17:53 PM »

that explains it.  :(

Something is wrong with the Windows Demo. Can you fix it? (Sorry for wrong topic, Just want it fixed)
Logged
My head got shot up once. And I lived and my head Remained.....

CraigStern

  • The Creator
  • Administrator
  • General
  • *****
  • Offline Offline
  • Posts: 3227
    • View Profile
    • Sinister Design
Re: Ask the developer a question!
« Reply #483 on: December 27, 2010, 02:32:58 PM »

that explains it.  :(

Something is wrong with the Windows Demo. Can you fix it? (Sorry for wrong topic, Just want it fixed)

Are you talking about the fact that it generates a shortcut file that doesn't work? I'm aware of that--I'm actually planning to upload an updated downloadable Windows demo later today which will hopefully address that issue.
Logged

HeadShot

  • Mechanic Captain
  • **
  • Offline Offline
  • Posts: 73
  • WOAH! My head? Where- oh.
    • View Profile
Re: Ask the developer a question!
« Reply #484 on: December 27, 2010, 03:32:12 PM »

Thanks.

I'll edit this when I have a question.
Logged
My head got shot up once. And I lived and my head Remained.....

Xemadus Echina

  • Blue Cape
  • **
  • Offline Offline
  • Posts: 235
  • :D ;D :) :( :-X :-[ :'(
    • View Profile
Re: Ask the developer a question!
« Reply #485 on: December 27, 2010, 05:32:04 PM »

I just bought the pre-order! where's my activation code? I can't find it in the emails :(
Logged
im writing a book!
http://sinisterdesign.net/forum/index.php?topic=236.0;topicseen
heres a free verse poem I wrote for school
You never know
Just what you will find after you
Lost your favorite thing. But
The important thing is that the
Game you play will help you to get by.

CraigStern

  • The Creator
  • Administrator
  • General
  • *****
  • Offline Offline
  • Posts: 3227
    • View Profile
    • Sinister Design
Re: Ask the developer a question!
« Reply #486 on: December 27, 2010, 05:41:14 PM »

Look for the part of the email that reads

Quote
The product registration key is: blah blah blah
Logged

Zackirus

  • Black Cape
  • ***
  • Offline Offline
  • Posts: 713
  • Oh Canada!
    • View Profile
Re: Ask the developer a question!
« Reply #487 on: December 29, 2010, 07:09:52 PM »

Is Rahel's Guard Informant Name Rajav? 
Logged
If The World Was A Bit More Like Canada, Then We Would Have A Great World, And Hockey 24/7

- Lord Canada

ArtDrake

  • Black Cape
  • ***
  • Offline Offline
  • Posts: 723
    • View Profile
Re: Ask the developer a question!
« Reply #488 on: January 02, 2011, 01:08:18 PM »

I am, once again, working on a game that I halted work on months ago, not understanding AS3 well enough to pull it off. Now, with the right knowledge, I think I can do it, but Flash isn't registering my keyboard input (the lack of an IsDown method is bothersome, to say the least). There are no errors or exceptions, so I think that I've simply stated something wrong. If you have time to take a look at the code, it would help:

Code: [Select]
var leftIsDown:Boolean = false;
var rightIsDown:Boolean = false;
var upIsDown:Boolean = false;
var downIsDown:Boolean = false;

...

addEventListener(KeyboardEvent.KEY_DOWN, onDown, true, 0);
addEventListener(KeyboardEvent.KEY_UP, onUp);

...

public function onDown(k:KeyboardEvent):void {
trace("hi");
switch(k.keyCode){
case Keyboard.LEFT:
leftIsDown = true;
break;
trace(leftIsDown);
case Keyboard.RIGHT:
rightIsDown = true;
break;
case Keyboard.UP:
upIsDown = true;
break;
case Keyboard.DOWN:
downIsDown = true;
break;
}
}
public function onUp(k:KeyboardEvent):void {
switch(k.keyCode){
case Keyboard.LEFT:
leftIsDown = false;
break;
trace(leftIsDown);
case Keyboard.RIGHT:
rightIsDown = false;
break;
case Keyboard.UP:
upIsDown = false;
break;
case Keyboard.DOWN:
downIsDown = false;
break;
}
}

The trace function isn't making output when I press keys. Do you have any idea what could be causing this?
Logged

CraigStern

  • The Creator
  • Administrator
  • General
  • *****
  • Offline Offline
  • Posts: 3227
    • View Profile
    • Sinister Design
Re: Ask the developer a question!
« Reply #489 on: January 02, 2011, 01:23:10 PM »

It could be a few things. I never use switch myself, so I can't confirm that you're using the syntax correctly. Assuming that you are, I've found that Flash can be quite temperamental if you don't place your keyboard listener in the document class. If it's not in your document class right now, I would move it there and turn those onUp / onDown handlers into regular functions. I would then create some new handlers in the document class that feed the keyCode directly to your onDown and onUp functions as arguments.

I hope that helps!
Logged

ArtDrake

  • Black Cape
  • ***
  • Offline Offline
  • Posts: 723
    • View Profile
Re: Ask the developer a question!
« Reply #490 on: January 02, 2011, 01:53:47 PM »

Alas, I do all you suggest, and to no avail. I was working in my document class, but I can see where it would be finnicky like that.

Was your meaning that I should add functions like this?:

Code: [Select]
function onDownEvent (k:KeyboardEvent):void {
var kn:KeyboardEvent = k;
onDown(kn.keyCode);
}

function onUpEvent (k:KeyboardEvent):void {
var kn:KeyboardEvent = k;
onUp(kn.keyCode);
}

And have the beginning of the onDown/Up functions look like this?:

Code: [Select]
function onDown(k:Number):void {

Even though it doesn't seem to solve the problem, whatever that is, is would make my code easier to modify and install later functionality in.

I think that problem is that the event isn't even dispatched, and that perhaps the problem is one lying in my computer.

Thank you for taking the time!
Logged

CraigStern

  • The Creator
  • Administrator
  • General
  • *****
  • Offline Offline
  • Posts: 3227
    • View Profile
    • Sinister Design
Re: Ask the developer a question!
« Reply #491 on: January 02, 2011, 02:15:09 PM »

It could also be those last two arguments in your KEY_DOWN listener. I've never seen those used before. Try removing them.

This is what I was talking about as far as the handlers (no need to add an extra variable into the mix):

Code: [Select]
function onDownEvent ( k:KeyboardEvent ):void {
mainGameClass.onDown( k.keyCode );
}

function onUpEvent (k:KeyboardEvent):void {
mainGameClass.onUp( k.keyCode );
}
Logged

ArtDrake

  • Black Cape
  • ***
  • Offline Offline
  • Posts: 723
    • View Profile
Re: Ask the developer a question!
« Reply #492 on: January 03, 2011, 07:51:55 PM »

The two extra arguments were something I added when it wasn't working, ironically enough. The zero is a priority setting, meaning that that particular event listener gets n priority in dispatching. The higher the number, the higher the priority. It's useful when you don't want one event firing before another gets a chance to, say, clear an array.

The true is the variable "isWeakReference", and I was reading in a book about best practices in Flash Programming that unless you have a good reason to do otherwise, setting isWeakReference to true is a good idea. If the reference is weak, and if whatever object dispatching the event is sent to the Heap, the reference is also garbage-collected. If you have all strong references, they tend to just pile up.

Once again, thanks for all the help you've lent me, and I think I'll just run a simple program that only checks for KeyboardEvents, and try to isolate the error.

But now I have another question: do you encapsulate your getter methods and hash-check them whenever called, to prevent hacking? A few encryptions or hashes here and there (specifically when using a money variable) increase the non-hackability of the game. Not that the game is multiplayer, but just out of an interest to have people abide by the rules...
Logged

CraigStern

  • The Creator
  • Administrator
  • General
  • *****
  • Offline Offline
  • Posts: 3227
    • View Profile
    • Sinister Design
Re: Ask the developer a question!
« Reply #493 on: January 03, 2011, 08:37:36 PM »

Something like this, you mean? It seems like an awful lot of effort to go through to prevent people from engaging in a victimless offense, especially when i could use that time to create content or fix bugs.

And with TSoG, I'm not even sure I could do it if I wanted to--the engine is (regrettably) coded in AS2.
Logged

bugfartboy

  • White Cape
  • ***
  • Offline Offline
  • Posts: 1714
    • View Profile
Re: Ask the developer a question!
« Reply #494 on: January 03, 2011, 09:14:04 PM »

I've been lost the past few posts. I don't understand much of programming at all. But anyway: what plans do you have after TSoG is finished and released?
Logged
Pages: 1 ... 31 32 [33] 34 35 ... 118