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 - LeChuck

#81
So I found a way to load the game in the editor. I created a new set of game files, THEN I was able to load the game (without closing the editor). This is the only way I'm able to work on my game: Loading another game and then load the game I wanna work on. Go figure.
#82
KhrisMUC, yup, this error has occured on all other PCs I have tried to run the editor with this game on. However, loading other games I've made previously works fine on all computers, just not this game for some reason. And I'm sure the files are extracted properly, as I have extracted the exact same rar file on my old computer and this new one, where it worked on the old one and not on the new one. So I figure it's got something to do with codecs or some weird stuff, I just dont know what could cause this.

Absolutely nothing happens when I try to load the ac2game.dta file. Within a fraction of a second the load game screen appears again. No error messages at all. Somebody help! :(
#83
I've been working on a game for a while now, on one spesific computer. I use Winrar to backup the entire game folder (including AGS 2.72), and I've had to go back to previous versions several times so I know this method should be working great. However, when trying to load the game on two other computers, it fails miserably.


... then I select the game's ac2game.dta file, a few fractions of a second it shows this menu again:



So what I'm asking is why this is happening. If I open it back up on the machine I used to build the game, it will work fine, but on my new one it won't load. What could be causing this? Not the required ogg support on my current pc perhaps? I am all out of ideas.


#84
Somewhere along the road, my game accidentally got turned from 16-bit into 32-bit colour mode. During that time I imported a lot of sprites. I discovered the error, and turned 16-bit back on. Then, a lot of sprites imported show a yellow warning label.

This doesn't seem affect the normal gameplay, but once the game is restarted in-game, certain sprites disappear / become invisible for no apparent reason at all. Worst of all: it's not even consistent, sometimes one spesific sprite will show, but suddenly the next time I enter the screen it's gone. I'm thinking it's because I turned back on 16-bit colour mode with imported 32-bit sprites.

Today I turned 32-bit colour mode back on. I've messed around ingame for half an hour now and has hit no graphical errors that would happen within 2 or 3 minutes when I run it in 16-bit colour mode. Has anyone else had this kind of experience? Is this a viable explanation or are the gods fooling me and having a laugh?

What are the disadvantages as to having 32-bit colour mode today? I would think all computers made in the last five years would support it. Speed is really all that matters to me, as my game doesn't require the transparency options etc. that 32-bit offers. AND FINALLY: Is there a way for me to go back into 16-bit colour mode and convert all those sprites with a warning label (imported in 32-bit mode) back into 16-bit? There are literally hundreds of sprites, and would take forever to do by hand.  :(
#85
Does anyone know if you can get a gradually changing transparency using this module without resorting to 32-bit / png's with alpha channels? It wouldn't matter if it wasn't as smooth as using an alpha channeled png... I tried messing around with moving around huge objects / GUIs with different transparency simulating darkness, but it totally killed my new computer. My game's in 16-bit colour and I'd like to keep it that way for performanence reasons.
#86
Thank you Ashen! That did exactly what I wanted to do and then some. Is writing to dat files giving anyone else headaches or is it just me?  :)
#87
The code I posted is indeed one continuous piece of code and not copy / pasted from around the global script. Thanks for explainging the part about declaring pointers... but I'm still a little lost as you're about to find out.  :o

I am absolutely trying to detect whether or not gamedata.dat does exist or not, in case there was any doubt.  I made some changes to the code...

Code: ags


  SetRestartPoint();
    
  // if gamedata.dat is not present, create a new one with blank values
	File *input = File.Open("gamedata.dat",eFileRead);
	if (input == null) { // This should work when reading from the file?
	   input.Close();
	 
	   File *output = File.Open("gamedata.dat", eFileWrite);
	   gamerestartedwithcommentary = 0;
	   hasstartedcommentary = 0; 
	   output.WriteInt(gamerestartedwithcommentary);
	   output.WriteInt(hasstartedcommentary);
	   output.Close();
	}
  //input.Close(); // Can I successfully close a file twice in case the file does exist?
		
  
  
  // read back from gamedata.dat if commentary mode is on
	File.Open("gamedata.dat", eFileRead); // What's wrong with this part?
	gamerestartedwithcommentary = input.ReadInt();
	input.Close();
	
	// if commentary mode is on
	if (gamerestartedwithcommentary == 1) {
	    hasstartedcommentary = 1;
	    SetGlobalInt(240, 1);

	    File.Open("gamedata.dat", eFileWrite);
	    gamerestartedwithcommentary = 0;
	    output.WriteInt(gamerestartedwithcommentary); // Error message: Undefined token output
	    output.Close();
	}
	
  
   SetFadeColor(255, 255, 255);
   Wait(40);
   StartCutscene(eSkipESCOnly);
	


This again gives me an error message saying undefined token output (see comment in the margin inside the code), but I'm sure that's not the only problem you can spot...
#88
Once again I'm having troubles with writing and reading simple ints from a dat file. My apologies for the last thread I created regarding a high score issue, a thread I'll come back to once I get the hang of this...  :-\

Alright here's the code so far, in the room we start in:

Code: ags

 // ROOM THAT THE INTRO STARTS IN
  SetRestartPoint();
  
  // if gamedata.dat is not present, create a new one with blank values
	File *output = File.Open("gamedata.dat", eFileWrite);
	if (output == null) {
	 gamerestartedwithcommentary = 0;
	 hasstartedcommentary = 0; 
	 output.WriteInt(gamerestartedwithcommentary);
	 output.WriteInt(hasstartedcommentary);
	}
	output.Close();
		
  
  
  // read back from gamedata.dat to find out if commentary mode is on
	File *input = File.Open("gamedata.dat", eFileRead);
	gamerestartedwithcommentary = input.ReadInt(); // THIS LINE'S THE TROUBLEMAKER (?)
	input.Close();
	
	// if commentary mode is on
	if (gamerestartedwithcommentary == 1) {
	    gamerestartedwithcommentary = 0;
	    hasstartedcommentary = 1;
	    SetGlobalInt(240, 1);

	    File *output2 = File.Open("gamedata.dat", eFileWrite); // SEE QUESTION 2
	    output2.WriteInt(gamerestartedwithcommentary);
	    output2.Close();
	}
	
  
	SetFadeColor(255, 255, 255);
	
	Wait(40);
	
	StartCutscene(eSkipESCOnly);



Compiling leaves me with the message "Error: FileReadInt: File read back in wrong order". What is going on?

Second question: Why can't I use the code "File *output = ...." twice? It left me with an error message saying "Variable 'output' already defined". So I threw in a 2 behind it and it compiled. I can't wrap my head around this. Do you have to store each int in its own variable? Can anyone explain this or maybe direct me somewhere that makes it easy to understand?
#89
Quote from: Snake on Sun 21/05/2006 16:12:37
I got it.
I had already named it gg1 like I showed in the first post.
But what I did was take the example in the manual a little too literal and had placed btn infront of gg1.
||--EDIT--||
I had figured that since cCharacter, gGui, oObject and such carried that letter infront, that btn was the same way.

Thanks for your help again, guys,


--Snake

Jesus Christ this had me upset indeed. I also took the manual too literary for my own good and kept trying to write btnButtonname. If this hasn't been updated in the latest manual (I'm using the 2.7 version), do this immidiately. Sorry for the bump but this had me so upset I couldn't help myself.
#90
I want to create a running game where the distance ran is measured with the help of a float value with two decimals. My problem is writing and reading this value to and from disk.

// room header
float stepcountinmeters = 0.00;
float stepcountinfeet = 0.00;

//rep exec
if (countdown == 0) { //game is finished
            float hiscore = stepcountinmeters;
   float hischandle = FileOpen("hiscore.dat", FILE_READ);         
   if ((hischandle == 0) || (hiscore > hischandle)){
   FileWriteInt(hischandle, hiscore);
            }
            FileClose(hischandle);
           
            Wait(40);
            cEgo.ChangeRoom(1);
}

Getting the obvious "cannot convert float to int" error when compiling, and that is expected, really. I know I can't use FileWriteInt to write a float value with, but what are my options here? Converting the float value to a string and then back again to be able to compare the numbers (for determining if the current score is the highscore)? I tried this, but it was a catastrophic failure.

I really do not want to lose the two decimal numbers by converting to an int.
#91
Thanks for clearing up the RawDraw issue for me. I've found a much simpler solution to my problem that didn't involve any math, although I'd use the Distance function in this thread if I decided I had no other choice.
#92
I'm trying to make my character automatically walk to the closest point on a rawdraw line. How do detect which coordinates on a rawdraw line that are the closest to a character?

Also, is there a way of changing the colour of the rawdraw line, or making it transparent?

Edit: does this belong in the technical forum?
#93
Thanks for the feedback everyone! It looks like Ashen came up with the easiest solution - to use the SetGameOption solution. This is what I used in the room's repeatedly execute script:

Code: ags

// remove pixel perfect clicking when hovering over crow
if ((mouse.x > cCrow.x-40) && (mouse.x < cCrow.x+40)) SetGameOption(OPT_PIXELPERFECT,  0);
else SetGameOption(OPT_PIXELPERFECT,  1);


All this really does is detect when the mouse is hovering over the characters' x coordinate and then turn off pixel perfect detection. I guess I could add something about the y coordinate too, but the way the game screen is set up, it doesn't really require me to.

I'm not proud of that code, but damn it works!
#94
I'm having a few characters that in are like stick figures, with thin arms and legs. These are difficult to hit, sometimes. I cannot simply draw a hotspot over the characters, as they move all over the screen. Is there a way to enlarge the "click zone"?
#95
I don't think that's even remotely possible.


Seriously though, throw a region on the part of the room you want to trigger the change room command, then edit that region's script file. Type in player.ChangeRoom(room number) and you're all set. That's the basic version.
#96
My god joelphilippage, that's the most hilarious 3d model I've ever seen! Make some really over the top animations for it and it will be the best game of all time! If you can remove some of the polygons on the body while maintaining the distorted face, it would lower the load on the CPU... but for Christ's sake DONT CHANGE THAT FACE!
#97
I've got this game that's grown to 170 megs without sprite compression turned on. This, of course, took a long time compiling. Depending on whether I ran photoshop or bittorrent, with only 512 megs of ram compiling often took 1-3 minutes. Then I tried turning ON sprite compression, just to see how much space I could save. I expected it to take at least twice as long as it used to. Guess what... it took about 20 seconds! And it still does, even after adding new sprites.

How the heck does this work?

Edit: I just gotta say, this discovery is really speeding up the game development. Is it on by default? If it is, I've probably turned it off a really long time ago to save time compiling. Running version 2.71.631 btw.
#98
I like this game, its interface design is original and fun, and the backgrounds good as well. It has a decent, polished feel to it. Rhyming is silly but not stupid in this case. It's actually one of the very few AGS games I want to finish all the way through!

Some annoyances though... first the bug where you walk as close to the edge of the image as you can, then click the exit cursor. You actually have to walk a few steps back and then click exit. I wonder why... ? 

Next problem is part of the interface. It's a bit annoying when having to make the bear turn towards the camera in order to find his mouth. Did you try making him face the player when finishing walking or animating? How was it? This problem became apparent especially after looking at the machinery inside the rollercoaster house, making him face away from the camera. I had to exit the house to make him face towards the camera so I could talk to the rat the first time I tried it. Later I found out I could left click on the rat to make the character turn.

I haven't finished it, but I'm working on that...
Spoiler
I've got the crowbar and the wrench... And I can't get any further.  : (
[close]
Any hints?
#99
Is there an easy way to trigger a screensaver, being sent to another room, after a certain period of time? It probably has go to somewhere in the global rep exec script but I have no idea how to find out whether the player moved his or her mouse and hit any buttons the last five minutes or now.

I tried snooping about the forums with little luck. Cheers!

Edit: The code below with a few additions made the screensaver work perfectly! Thanks a lot.
#100
AGS Games in Production / Life of D. Duck II
Sat 03/03/2007 00:53:16
Life of D. Duck II - It's DONE, completed game thread: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=35960.0

D. Duck is a champion. Having won Duckcity (Duckburg) marathon, his only goal left in life is winning the heart of Daisy. When D. Duck comes home with heart medicine for his sick old grandmother, fat Uncle Jubalon arrives at his doorstep. Unable to stop his uncle from breaking into the house, D. Duck is witness to an appetite unlike any other. As his girlfriend flees the scene, she seeks shelter in the loving arms of lucky Cousin Anton (Gladstone Gander). Take control over D. Duck as he struggles to handle his biggest problems yet, and meet up with popular Disney characters such as Uncle Scrooge, Magica De Spell and his three troublemaking nephews.

All dialogue and artwork made by aspiring artist Bjornar B, which will provide the project with exclusive material. Game design, animation and scripting by yours truly, heavily inspired by the amazing art of this fine, young craftsman. The soundtrack will feature several Commodore 64 tracks recorded straight from the sid files to give them that authentic retro feel that should go well along with the game's unique, lo-fi graphical style.

Game trailer (NEW!)



(click image or this link)


Screenshots


Status

DONE!

Finished game: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=35960.0
SMF spam blocked by CleanTalk