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

#121
After almost 1 week working on this issue, i finally solved this adding a new empty BG frame; so, now, the map is created  on BG(1) and BG(0) is used to show the perspective.

This is not the correct topic, but could be very usefull a way to just use a dynamic aprite as a BG frame.

Thanks

JP
#122
Quote from: Gilbot V7000a on Fri 20/06/2008 11:01:14
Hmmm these look certainly like bugs (I have no idea why you can't define the contents of Strings directly, unless CJ has a good reason; also the (null) problem is strange too).

As you're using V3.0.0, can you try the most recent official version (V3.0.1, back up your game first) and see whether the problems persist? If this is not fixed yet, you can always post a message in the V3.0.2 beta thread to prompt CJ to look at this threade (as he may not check beginners' forum that frequent) and maybe, you'll get a fix in time when V3.0.2 comes out. (Too bad I'm not a mod in beginners' tech forum, otherwise I'll just move this to technical forum.)



I tried the update to 3.0.1 but i have too many troubles so i downgarde it again. Anycase i will create a recopilation of the malfunctions and post it in the technical forum. (i even have a serious crash, which needed close the AGS, delete manually the .trs file and then reopen the AGS)

Jp
#123
Solved after an entire night working...

Looks like the translations do not work in the same way the main engine, so multiple strings variables displayed do not work properly.

For example:
Code: ags
String mensaje1 = "This is the begin";
String mensaje2 = "... and this is the end";
String mensaje3 = String.Format("%s%s",mensaje1,mensaje2);


Give you "This is the begin... and this is the end" always, even if you are using a translation of the game.

To avoid this, i just did this...
Code: ags
String mensaje1 = String.Format("This is the begin");
String mensaje2 = String.Format( "... and this is the end");
String mensaje3 = String.Format("%s%s",mensaje1,mensaje2);


And then i get the correct translated message. So i decided add the string format to every string i declared in the game and now the translation works perfect.

I found some malfunctions during the various tests i did. For example, if the las line is...

Code: ags
String mensaje3 = String.Format("(%s%s)",mensaje1,mensaje2);


What i get in the screen is "((null))"  ::)

Hope this helps anyone else.

Jp
#124
ALready checked the forums and i dont found nothing...

Using AGS 3.00

I begun trying to translate the main game into english to release the final beta version. Of course, i just translate basic issues related with text in buttons and labels to make the game understable for non-spanish speakers.
The first i noticed is that now the translation file is not separated in different rooms (like it was in AGS 2.72 as i noticed when translating paul quest). Maybe it was posted before, but I'm unable to find the topic related.
Second, almost all the translation works, but i have many fails:

1- In the global script, i have declared this array

String SDificultad[6];
Export SDificultad;

Then, in game start, i assign values to the arrays:
SDificultad[1] = "Muy Facil";
SDificultad[2] = "Facil";
SDificultad[3] = "Estandard
SDificultad[4] = "Dificil
SDificultad[5] = "Muy Dificil";

This text appears in the translation file and i translated it, but when the translation file is compiled, it still shows the spanish words. Maybe something with arrays? I trying updating the translation and even  i delete it and create a new one and still have the same trouble.

2.- One label need have a very LONG text (more than 500 characters), so waht i did was this declaration:

String text1campana, text2campana;

Acording to what the game needs, i adjusted the value of this 2 variables and finally:

LabelCampana.Text  = String.Format("%s%s",text1campana, text2campana);

The game works perfect in the default language and all the text appears in the translation file, but again when the translation file is compiled and used, it shows the default language strings.

3- My game dont use hospots at all; you cant find one in all the rooms, but the translation file still have "hotspot 1" till "hotspot  40". Is this a known BUG? I neither found nothing about this in older topics.

Thanks for any help

Jp
#125
Quote from: GarageGothic on Thu 12/06/2008 22:52:49
I should mention that I tested CreateFromBackground, and it seems to work as it should, at least in the latest beta. There were some problems in earlier versions with GetPixel returning incorrect values for drawn surfaces though, so perhaps your issue is related to that bug.

You are right; i were confused since the BG changes remain until the players leaves the room (when the BG frame is restored).

Now, adding the funtion to give and eyer-bird perspective, im having a lot of troubles with random-maps. Since the room just have 1 BG frame (where i need redraw every time the player changes the viewport) i need be able to use the original sprite drawed to get the original room aspect. But i dont find the way to use dynamic sprites for BGs andi dont find nothing in the current drawing options.

Using AGS 3.0. I tried to upgrade the game to 3.0.1 but i had too many troubles so i just downgrade again. Of course, i will upgrade for sure if 3.0.x includes something like Room.GetDrawingSurfaceForWalkableArea(int AreaNumber)  ;D

I hope anyone have sugerences, thanks

Jp
#126
About Paul Quest...
Quote
The AGS Review Panel has left a comment about this game:
Extremely shoddy. Download links to RapidShare.

I really feel a little hurt. I understand the rating, but not the comment. Anyway, thanks for the time you guys take to play the game. And a good job with the games page.

jp
#127
Quote from: GarageGothic on Sun 08/06/2008 15:41:09
One puzzle that DID stump me, on both my playthroughs of The Dig, was the lightbridges at the spires. I had turned the crystals as they should be, but whenever I clicked the button to activate it, there was a brief sound and nothing happened. I wasted a lot of time walking back and forth and watching tram sequences because I didn't get the bridges activated early in the game. Then, near the point of frustration, I tried holding down the mouse button over the in-game button instead of just clicking, and lo-and-behold a lightbridge extended across the pit - and unless I kept holding down the mouse button until it reached the other side, it would disappear. As far as I know, this is the only time in the game you have to hold-down instead of clicking the buttons. Strangely nobody else seems to have had problems with this as none of the walkthroughs I consulted mention this interface inconsistency.

I remember i had this same trouble  :( Its really funny to FINALLY know that i was not the only one...

jp
#128
Ok, i solved it, so i post here if anyone else have this same trouble.

First, as i said in the first post, my game only uses 2 cursor modes: mode 0 (usually Walk to, but i renamed it to Puntero) and mode 1 (usually Look at, but i renamed it to Atacar). Since eModeAtacar is only available during the game (where i dont have troubles) i will explain the issue with mode 0.

First at all, there is nothing with transparencys; Mode 0 works bad in some rooms and ok in others, ALWAYS with GUI controls, even with the same GUI showed in different rooms. Diference between this rooms? Only one: The cursor works OK in scrolling rooms, but wrong in the ones which not (yes, that is absolutely sure, dont ask me why  ???). There is another difference, but im not sure this is an absolute true: scrolling rooms have always number 100+, but i dont test with a scrolling room with a lower number (since my game dont have one)

I tried everything with the configuration of the mode 0; standardmode true or false, hotspot 0,0 or even out of the image borders, but it always make click at 2,2 position. Finally, i decide try another way and i created a new cursor mode: BINGO.

I taked eModePointer (since is the one AGS shows in some cases by default), changed it to be identical to eModePuntero (the only diferences are the number and the name) and it works perfect ALWAYS. Both modes uses the same sprite, with hotspot set to 0,0, standardmode=false.I even included a button to switch between this 2 modes at run time and you can see how the mouse-image moves when you click the button.

I believe this is an AGS bug (maybe its not a good idea rename the default cursor modes). As for me, i just changed all the code to use eModePointer replacing eModePuntero (which will remain unusefull)

Jp
#129
You can also add a "Change language GUI" where you could explain to the player what he must do if he want change the language, and optionally, the translations available.  :)

Of course, create your own launcher is a better solution, but it requires some knoweledge about it.

Jp
#130
Looking carefully at the mouse click, i checked that it works ALWAYS properly when click on objects, characters and hotspots, but some troubles become when click in some GUIs. Maybe its something about alpha channels? Anyone hear something about this in the past? I checked the forums but looks like I'm the first one with this issue.

The only thing i have clear until now is: if the GUI have a backgroundgraphic with alpha channel or with a single transparency, mouse click dont work properly, but if it is completely solid the mouse cursor works perfect.

Jp

EDIT I forgot to mention that if i change the alpha channeled image of the gui background for a solid one, then the click works perfect. Looks like itonly works bad when there are transparencys-translucencys ::)
#131
I released the drawing surface in the same function that creates the room background(function RandomMap). Inside this function i also try in many ways to find the solution, but i was unable, since looks like the new background is only displayed in the screen but not stored in the engine. (a clarification about this issue would be nice)

I found and alternative solution: i declared a dinamic sprite in the global script and created and exact copy of the room BG at the same time (just drawing 2 different surfaces at same time, 1 for background and another for use as a internal sprite);when finished, i just resized the sprite and assigned it as gui.backgroudngraphic (after release both surfaces). Since the sprite is a global variable, it can be deleted when player leaves room from room script. Of course, its not the ideal alternative, but the game works fine with it.

Example

In global Script=
DynamicSprite *sprite;

Inside function=
DrawingSurface *surface = Room.GetDrawingSurfaceFromBackgrond();
sprite = Create (roomWidth, RoomHeight);
DrawingSurface *secondsurface = sprite;
.
.
.
surface.DrawImage(stuff here);
secondsurface.Drawimage(the same stuff here);
.
.
.
surface.Release();
secondsurface.Release();
sprite.Resize(80,50);
gMinimap.BackGroundGraphich = sprite.Graphic;

In Room script, when player leaves room=
sprite.Delete();

Note that the game speed dont become too slow. Creating a total of 2560 sprites for each surface, randomizing it and matching it looks properly only takes 1.2 seconds in my old CPU (pentium 3 - 600 MHZ- 128 MB RAM) I tested it and is a enough good performance.

Thanks for your answers

Jp
#132
Quote from: GarageGothic on Thu 12/06/2008 17:08:46
Did you Release() the background's drawingsurface before creating the map sprite?

Yes, the drawings surface is released when the map-generator finish. Also, i tried wthout deleting the sprite until the player leaves the room, but whatever i do i only get a transparent sprite.
#133
Im sorry if I'm making to many answers... ::)

I finished the random-map generator, which creates a room using pre-defined tiles. The room BG is originally empty (just a big 1280*880 black screen). I used the getdrawingsurfacecreatefrombackground, drawed the tiles using the map generator and then release the surface. It looks fine and the game runs properly.

Now i want take a screenshot of the BG created, resize it and use as BG of the GUI minimap, but when i call create a sprite from background, all i have is a empty one (like the original BG).

Are there any way where i could use the new BG created image?

Thanks in advance...

Jp
#134
Checking the pixel-perfect detection for the eye-bird module, i found something already was there but i was not able to detect.

My game uses only 2 cursor modes: i changed the first one (usually walk to) to pointer and the second to attack. Everything works fine until now and i dont detect troubles since the script is defined to only cycle between this two modes. Both cursor sprites are 16x16 pixels and had the hotspot at 0,0 position.

Now, checking carefully where the cursor is clicking i found that the click is not in the top-left corner of the cursor; it makes click around pixel 3,3, and not 0,0 as i defined in the settings of the cursor mode. I tried changing it to 1,1 or even 8,8, but it ALWAYS makes click at 3,3 position. It works terrible for vertical sliders and even for small buttons.

Well, another project we are creating is a remake of SQ1, point and click and with digital audio. Im not working on this, but i contacted my friend to know how he fixed this trouble, but he also have the same trouble: the cursor makes click 2-3 pixels down and to the right than the settings for the cursor mode. (my game and this one are developed under AGS 3.0.)

Finally, i checked paul quest (created using AGS 2.72) and here the cursor looks like is working fine, but im not very sure since the source code of the game  is 8000 kms from me and im not absolutely sure i set the cursor hotspot to 0,0..

Is this a bug? Im missing something?

Any help is appreciated.

Jp
#135
I just want add that with this solution, the button pushed image will be displayed anyway when you right click over it  :-[

Jp
#136
Rep_exec section occurs even when the game is pause. So, just include all the rep_exec function inside something like this:

Section Rep_exec:

If (IsGamePaused() == 0)
  {
  // Everything you want to happens in the game
  }
else
  {
  // Things you want happens ALWAYS (allow save/restore game, quit game...)
  }

I had a trouble like this and the best way i founded was this.

Jp
#137
Yes, a object.setscale property could be very usefull, but its really not the big problem for this module. The scaling formula is easy to calculate and i only need add transparent borders  to the object original image (at both sides); so, when the object become fair, its just need reduce the empty space around the object (i hope i was enough clear). BTW its not necessary change the object coordinates  :D At least, in my game proyect, objects do not need find paths since they are static, and chars can be handly re-escaled. Im sure i will be able to make this module at least for static objects (i prefer have static objects in the game but with the 3D perspective)

My first try for this module was using the technique of divide the room in many horizonatal walkable areas, but it looks odd. Since you cant have more than 15 walkable areas in the screen at the same moment (to avoid a wrong result) the perspective was bad and the parallax effect did not work properly. That was the reason i coded it reading any line from the BG. (you can check that only the area you are looking is re-scaled  to avoid a low performance)

Thanks for your feedback. Im very excited about this idea to include in my game and i hope it will become to true. Of course, any new doubt i could have for the scripting, you all will know that  ;)ç

Thanks a lot

Jp

#138
Draw directly the objects (and chars) into the BGs do not works since the player needs interact with them at any moment. I feel i can now create the module to work perfect with static objects, but of course, to keep the animation while its re-scaled and repositioned looks to be a very hard thing to do (maybe some of the monsters-scripters could do that in some hours, but it could take me weeks)

I will finish the perspective module without animations. If anyone have a good idea to be able and keep the animations just let me know.

Jp

PS If someone wants to help in the project with the creation of this module would be very helpful
#139
Well, the idea of the module is to give a around 50 degrees perspective  from the backfround (which is actually a big scrolling room). It could be easily explained if you download the source code and run the game. The objects need be scaled acording to their position in the screen (if they are in the screen, of course): bigger when they are closer to the bottom of the screen and smaller when you scroll down.

The idea of this module is play a RTS game in 3D scenarios despite just plain 2D scenarios. The first part of the module works great (for the room ground) but of course, the hardest part is objects and characters. I tried with the Eady3D module, but it dosnt works for me.

Thanks for your help,

Jp

#140
What a fast and usefull answer! I already tested it and it works, the object keep the new graphic assigned.
But now, next time the object must be updated, the sprite will be bigger or smaller from the original one and zoom functions will not work properly. Any idea how i could store the default images to check it when i need them?

(im becoming to feel a headache when i try to imagine how i can make this module work with animated objects  ???)

Thanks a lot

Jp
SMF spam blocked by CleanTalk