Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - MiteWiseacreLives!

#101
Lol,
And you sir are no 'holy-cow'!
#102
Thanks alot guys!
And Mandle, that's some pretty good drunk ags'ing.. I was expecting obscene and obscure after reading your story (laugh)
Coffee goes much better with coding than beer doesn't it ;)
#103
Man, I'm going to give it a go this week, but between working and doing things with the family and being tired :~( I have not put the time in I'd normally devote in the past.
Anyone up for an extension? :-[

Edit:
aaaaaannnnndd, here's what my game looks like so far
#104
Are those fuzzy ??? They don't make them like that in North America...
#105
Quote from: Funkpanzer on Sun 18/12/2016 13:56:17
I leave for the in-laws in six days so chances are this is going to be a mess! :-*

Is anyone doing a straight up adventure game this MAGS?
Have a good trip  :)
What I've been working on isn't going to be straight up adventure, but not too out there either..
#106
Did a bunch of coding this morning, overcame some hurdles to the concept and no more crazy crashes (thanks CW)
Now to dive into the artwork and resolve some metrics.
Excited to see the games the others have hinted at in this thread!
#107
 :-[ I did search for it and came up with nothing.. Seams I'm a bit of a bone head.
#108
So if commercial games like Shardlight don't have an AGS page are they not eligible?
(Which I think is fine, they should have an AGS page because the AGS Awards should promote AGS, imho)
Without any competition from Wadjet Eye, Terror of the Ice Princess(ultra dlc Ed.) has a shot of sweeping the OSD category!! (nod)
#109
That's a very Grokie fight system.. I like it ;-D
#110
H:\mags2016\
It's on my secondary drive the hdd
#111
I've got this bad habit, I seem to think that making a MAGS game with the newest version of AGS is a great way to put it through its paces  (wrong)
Got some decent ground work laid, trying out some more difficult coding and design challenges.. but fighting these odd crashes I've never seen before is pretty maddening  :~(
(Does Win 10 hate AGS or is it v3.4?)
#112
Can someone help me with this issue?
I was able to move ahead running AGS as an admin, but now that no longer works.
I get the crash when after importing sprites I attempt to save, and lose all the sprite images.
#113
yes your right. I had to declare it at the top of the function for it to work.
#114
thanks for our help CW
I added brackets and it seem to fix it.. was more to do with line 44 I guess.
Code: ags
  InventoryItem *itemToSwap = player.ActiveInventory;  
  
  if (itemToSwap.GetProperty("isGlasses"))
  {
    glasV = itemToSwap.GetProperty("InvenView");
  }


this does not work:
Code: ags

  InventoryItem *itemToSwap = player.ActiveInventory;  
  
  if (itemToSwap.GetProperty("isGlasses"))
    int glasV = itemToSwap.GetProperty("InvenView");  
#115
Sorry if I'm going to clog up the forums today  :-[
I cannot figure why the following gives me an error:
Code: ags
if (iInvHat1.GetProperty("IsHat"))

Error (line 43): Unexpected 'int'

IsHat is the Boolean property in the properties pane and set to true, so why not an integer??
#116
It seems that my code was creating a new set of sprites-slots each pass of dynamic sprites (even though I was reusing the same dynamic sprite), I assume that's normal, then I was pointing to the dynamic sprite itself and using it as the surface - drawing onto itself. If that makes sense  ??? it seem to kind of overload..
So wrote some new code that indexes the original sprite for the viewframe and resets the viewframe to regular the sprite before drawing onto that (instead of countless dynamic sprites drawing over top on another).

My internet is slow right now, can't seem to get mediafire to work, I will get that crash file up soon.

Question, aside from my oddball way of referencing ViewFrames:
Code: ags

       os = (v*100 + l*10 + f); // no more than 9 frames or 9 loops or 100 views!! gives a unique number to each viewframe.
       ViewFrame *origFrame = Game.GetViewFrame(v, l, f);
       OriginalSprite[os] = origFrame.Graphic; 

Do viewframes have their own unique ID#'s?
#117
So now I've built this function, to iterate through each frame of the four walking loops of a view and draw the sprite from the corresponding frame of another loop onto the walking-loop-frame-sprite (replace the graphic with a new Dynamic Sprite)

Code: ags

// main global script file
DynamicSprite *frame[1000];

void Swapper(int swapX, int swapY)
{
 Character *SwapChar;
 SwapChar = Character.GetAtScreenXY(swapX, swapY); 
 if (SwapChar == null || SwapChar == player)
  return;
 //if (cRat.ActiveInventory == iHat1) 
 int hatV = 3;
  
 if (SwapChar == cNpc)
 {
   int vs = SwapChar.NormalView;
   
   for (int l = 0; l < 3; l++)
   {     
     for (int f = 0; f < Game.GetFrameCountForLoop(vs, l); f++)
     {
     ViewFrame *head = Game.GetViewFrame(vs, l, f);  // selects the correct viewframe for this new dynamicSprite
     ViewFrame *hatF = Game.GetViewFrame(hatV, l, f); // selects the correct viewframe for this new hat
     Display("printing Hat: View%d Loop%d Frame%d onto Character: View%d Loop%d Frame%d", hatV, l, f, vs, l, f);
     if (head == null || hatF == null) 
      Display("Pointing to No Frame");
     int sp = head.Graphic; // locates the original sprite# for this viewframe  
     frame[sp] = DynamicSprite.CreateFromExistingSprite(sp); // make dynamicsprite with same index# as original, use a stock sprite for the DynamicSprite
     DrawingSurface *surface = frame[sp].GetDrawingSurface();
     Display("got the sprite to draw on %d", sp);
     surface.DrawImage(37, -23, hatF.Graphic); //draws the correct hat position onto the DynamicSprite
     surface.Release();
     
     head.Graphic = frame[sp].Graphic;  //changes this viewframe to new dynamicSprite  
     }
   }
 }
}


But then after a few moments I get this crash/error..

Quote---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x0041E779 ; program pointer is +3330, ACI version 3.4.0.13, gtags (0,74)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and post the details on the AGS Technical Forum.



Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.

An error file CrashInfo.dmp has been created. You may be asked to upload this file when reporting this problem on the AGS Forums. (code 0)
---------------------------
OK   
---------------------------

It seems as if I am having too many dynamic sprites going on, can someone help explain this to me?
It looks like it would point to a dynamic sprite instead of the original graphic on a second pass if there was any re-use of sprites/graphics in subsequent loops, but my test indicates the original sprite-slot for each pass.
#118
Thanks for your help CR
I think I get it now. Was hoping to be able to manipulate the original sprites, but now I see that is not possible.

What I think I will do is make a large array of DynamicSprites to correspond with each ViewFrame of the characters so that I can redraw them as I need
(end goal is to be able to layer on different hats and glasses, like Mr Potato Head :P )
#119
Here's what i was able to make work:

Code: ags

// main global script file
DynamicSprite *frame1;

void Swapper(int swapX, int swapY)
{
 Character *SwapChar;
 SwapChar = Character.GetAtScreenXY(swapX, swapY); 
 if (SwapChar == cNpc)
 {
   frame1 = DynamicSprite.CreateFromExistingSprite(37);
   DrawingSurface *surface = frame1.GetDrawingSurface();
   surface.DrawImage(32, -23, 17);
   surface.Release();
   ViewFrame *head = Game.GetViewFrame(SwapChar.View, 0, 0);
   head.Graphic = frame1.Graphic;
   //frame1.Delete();
   Display("drew on sprite");
 }
}

-declared the DynamicSprite outside of the function
-did not delete it.

so now the questions are:
1) Can I do this for a dozen frames for a dozen characters without some kind of memory leak?
2) Is it possible to write over the sprite slot and then delete the dynamic sprite so I don't have to hold them in RAM? and don't have to have arrays of DynamicSprites?

Thanks for your help
#120
So what I'm trying to do is use dynamic sprites to help me alter sprites in my game, then those sprites will be used in character views.
ie: I want to draw a hat on each frame of a walk cycle.
I searched the forums and manual, and created this abomination that makes the game crash:
Code: ags

void Swapper(int swapX, int swapY)
{
 Character *SwapChar;
 SwapChar = Character.GetAtScreenXY(swapX, swapY); 
 if (SwapChar == cNpc)
 {
   DynamicSprite *frame1 = DynamicSprite.CreateFromExistingSprite(37);
   DrawingSurface *surface = frame1.GetDrawingSurface();
   surface.DrawImage(35, 110, 17);
   surface.Release();
   ViewFrame *head = Game.GetViewFrame(SwapChar.View, 0, 0);
   head.Graphic = frame1.Graphic;
   frame1.Delete();
   Display("drew on sprite");
 }
}


help.
SMF spam blocked by CleanTalk