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

Topics - JpSoft

#21
i need create something like this

Code: ags

function whatever()
{
String Resultado;
...
code...
...
return Resultado
}


But i cant find the way. I remember i read something about this some weeks ago, with some one posting about one way to create functions which returns strings , but i was unable to find the topic. Please, any help is very usefull.

Jp
#22
Yes, i readed a lot of different topics about the only pluggin created to give AGS network capabilities, but for what i understood it is unssupported from a long time ago, and the pluggin was simple and even buggy from the beginning. The Pluggin creator probably feels discouraged since nobody uses it (i believe there are no releases in the GB with multiplayer capabilities)  ::) Of course, if nobody uses it, why you will improve the work?

I donwloaded it and give it a LONG try, but looks like is absolutely impossible to make it compatible with AGS 2.72 (previous step before upgrade to 3.x.x).  For practice purpouses, AGS actually do not have any kind of support for Network games.  :-[ (If someone can update the existing pluggin to work with AGS 3.x you will be my hero  ;D)

I believe, for what i read in the AGS changes log, that AGS become from a Aplication to create AdvGames into a Medium-level progaming language oriented to AdvGames, but not limited to it. The supression of the interaction editor in versions 3.X and highers makes that now create a game is 98 percent time writing code. Since amlost all features can now be declared in run-time (and more to come, hopefully) makes AGS a really powerfull tool which can be used for more things that just create the simple AGs created with the first versions.

But the Network capabilities are highly demanded today for languages and game-makers creators, and probably a lot of people choose diferent options just for this reason. I personally give a try to different options in the last months (wintermute, gamemaker, sci studio, 3D studio and many others) and for sure AGS is FAIRLY the most complete with the 3.0.0 version. But it have a litlle hole there, and everyone knows that the new era games works around interactivty with other humans

My knoweledgments in C++ are limited, but i believe enough to create a new pluggin with someothers colaboration (could be a very interesting way to improve my skill with this language). Since this is not really a MONSTER job (many games here requires 100x more work than this) i hope many programmers and scripters join the proyect. I just want let you all know that im the first to offer my services.

Any one else? You can reply here or PM to start the work. Updates can be posted in this topic.

JpSoft
#23
I know i could prove this by myself, but it needs a lot of work creating differet characters and so, and maybe someone knows the right answer. Is there any limit in AGS about the number of characters that can be in the same room in one specified moment? I minds, can i have 300 characters in the current room? Or there is any kind of limitation?

Jp
#24
Im unable to find the way to just disable all the interface in the same way the predefined save-restore-quit works. I know i can use a full-scree gui instead, but i dont believe this is the best way. I tried using DisableInterface but it dont works. Anyone knows how it works?

Jp
#25
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
#26
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
#27
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
#28
Im creating a module to give a 3D aspect to the scenarios.Its my first module so im sorry if it is not very well explained. Basically, the room need 2 backgrounds, where the 2nd is static (to read the background) and the first one is where the drawing functions works. Its designed for a 640x400 game only, but it could be adjusted with MaxX and MaxY variables.

Code: ags

// MODULO Perspectiva

int MaxX = 320;
int MaxY = 200;
int VarianteX, LineaADibujar, Ancho, StartX;
bool EnPantallaX, EnPantallaY, Mostrar;
float zoom,  aux;
int zoomint, altura, newwidth, newheight;

function Perspectiva()  // Give a deep aspect to the scenario

{
DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
LineaADibujar = 0;
while (LineaADibujar < 200)
  {
  VarianteX = -40+(LineaADibujar*2/5); // Between -40 y 40
  StartX = GetViewportX()+(VarianteX);
  if (StartX < 0) StartX = 0;
  Ancho = 400-(LineaADibujar*4/5); // Between 400 y 240
  if (StartX+400 > 959) StartX = 959-400;
  DynamicSprite* sprite = DynamicSprite.CreateFromBackground(1, StartX, GetViewportY()+LineaADibujar, Ancho,1);
  surface.DrawImage(GetViewportX(),GetViewportY()+ LineaADibujar, sprite.Graphic, 0, 320, 1);
  sprite.Delete();
  LineaADibujar++;
  }

altura = object[0].Y-GetViewportY(); // Distance to the top
if (altura <= 0) zoom=0.8; // If up of the screen, draw it small
if (altura > 0)
  {
  zoom = 0.8+(IntToFloat(altura)*0.0076);
  if (zoom > 2.5) zoom = 2.5;
  }
zoomint = FloatToInt(zoom, eRoundNearest);

if ((object[0].X > GetViewportX()) && (object[0].X < GetViewportX()+319)) EnPantallaX = true;
else EnPantallaX = false;
if ((object[0].Y > GetViewportY()) && (object[0].Y < GetViewportY()+199)) EnPantallaY = true;
else EnPantallaY = false;
if ((EnPantallaX == true) && (EnPantallaY == true)) Mostrar = true;
else Mostrar = false;
if (Mostrar == true)
  {
  cCharacter.SayBackground ("Object on Screen");
  DynamicSprite* sprite = DynamicSprite.CreateFromExistingSprite(object[0].Graphic);
  newwidth = FloatToInt(IntToFloat(sprite.Width)*zoom, eRoundNearest);
  newheight = FloatToInt(IntToFloat(sprite.Height)*zoom, eRoundNearest);
  sprite.Resize(newwidth,newheight);
  surface.DrawImage(object[0].X, object[0].Y-newheight, sprite.Graphic);
  // Why object[0].Graphic = sprite.Graphic doesnt works??
    
  }
else cCharacter.SayBackground ("Not now");

surface.Release();
}


The trouble is near to the bottom: when i try to assign the resized image to the object[0] (its only for test, later i can add a loop from 0 to object_count) suddenly the object dissapears from the screen. Anyone can help me with this? The X position is not yet adjusted, but it can be easily dome (hopefully)

Here is a link with the source code im working for testing purposes.

http://rapidshare.com/files/117975563/FWars.rar

Wich also have the easy3D module 1.0.4 updated to AGS 3.0

Thanks

Jp


#29
I have a custom struct declared in the global script

(this is an example since i dont have the source code with me)

Code: ags
struct People_Profile
  {
  string Name;
  int Age;
  bool Sex;
  }


And a array with that struct

Code: ags

People_Profile Humans[50]; 


It works perfect in my global script, so i guess is well implemented. Now what i need is be able to export all this data to every room, since i got an error importing or exporting since AGS ask for a variable or function (it do not recognize People_Profile with imports)

How i can export the array and import it from the room scripts?

Thanks

Jp
#30
I just installed AGS 3.0.1 and opened my game with it. First thing i did: press F5 to verify... and i get this...

GlobalScript.ash(12): Unknown preprocessor directive 'DEFINE'
GlobalScript.ash(13): Unknown preprocessor directive 'DEFINE'
GlobalScript.ash(14): Unknown preprocessor directive 'DEFINE'
GlobalScript.ash(15): Unknown preprocessor directive 'DEFINE'
GlobalScript.ash(16): Unknown preprocessor directive 'DEFINE'
GlobalScript.ash(17): Unknown preprocessor directive 'DEFINE'
GlobalScript.ash(21): Unknown preprocessor directive 'DEFINE'
GlobalScript.ash(24): Unknown preprocessor directive 'DEFINE'
GlobalScript.ash(25): Unknown preprocessor directive 'DEFINE'
GlobalScript.ash(26): Unknown preprocessor directive 'DEFINE'
GlobalScript.ash(27): Unknown preprocessor directive 'DEFINE'
GlobalScript.ash(28): Unknown preprocessor directive 'DEFINE'
GlobalScript.ash(29): Unknown preprocessor directive 'DEFINE'
GlobalScript.ash(30): Unknown preprocessor directive 'DEFINE'
GlobalScript.ash(31): Unknown preprocessor directive 'DEFINE'
GlobalScript.ash(32): Unknown preprocessor directive 'DEFINE'
GlobalScript.ash(33): Unknown preprocessor directive 'DEFINE'
GlobalScript.ash(34): Unknown preprocessor directive 'DEFINE'
GlobalScript.ash(35): Unknown preprocessor directive 'DEFINE'

the code of my global script...

Code: ags

#DEFINE mio  1
#DEFINE suyo  2
#DEFINE neutral  3
#DEFINE unknow  0
#DEFINE suyounknow  4
#DEFINE suyoobjetivo  5

// Definir sonidos

#DEFINE m_intro               1


#DEFINE s_ametralladora               1
#DEFINE s_gentehablando               8
#DEFINE s_mardefondo                  3
#DEFINE s_click                       4
#DEFINE s_noclick                     5
#DEFINE s_granclick                   6
#DEFINE s_tanquemoviendo              7
#DEFINE s_otraciudad                  2
#DEFINE s_yescomander                 9
#DEFINE s_ambientevacio              10
#DEFINE s_howmayiserveyou            11
#DEFINE s_ventisca                   12


fisrt line of code is 12 and last 35. I checked the forums and looks like #DEFINE is not remove from AGS. I only read that the demo game can´t be compiled for something like this, but could it be solved or i must replace the definitions?

jp
#31
I checked the help file and searched here, but i dont found nothing about, so i guess my doubt is to simple, but i cant figure how i can fix it.

On section On_Click y added that when right buttons is clicked then do nothing. (on_click function works perfect, even the wheel support)

But right click still work on GUI´s buttons  ??? How i can solve this? I found a thread about something like this but was 3 years ago and reading the code i assume that it was in a old version (i begin with 2.72)

Thanks for any help

Jp
#32
Trying to improve the overall appareance of the game interface, we decide to include translucent GUIs instead solid ones.

So, we create this image



You can check it, in case the error is in the image itself.

Then we put it as background image of the GUI, but the GUI controls also become translucents  ??? We tried with everything (since is the first time we work with alpha-channels) but there is no way to make the GUI translucent and the controls solid.

We create all the images with Photofiltre Studio. I posted this here since i believe is a script issue that could be solved (hopefully).

Thanks

Jp

PS If i posted this in the wrong place, just feel free to move it wherever it must be placed
#33
Im trying to create a function to allow the NPC´s interact with room regions in the same way as the player character but i dont found an specific way so i just change the player character for any NPC is in the room and check if it is in any region.

Are there any other way? This solution slow down the game a lot  :(

jpsoft
#34
Adventure Related Talk & Chat / Easy BG desig
Sun 04/05/2008 21:18:57
I dont know if someone else post about this before...

What about create a program to create BG´s very easy. The program could load patterns and then the user just need add colour, textures and more stuff. Even it could have predefined objects (as chairs, doors, etc) so create BGs will be easy even for people like me  ::)

Something similar could be created to allow easy design 2D characters with good graphical quality.

Most parts i can imagine are very easy to program (in delphi) even qhen i dont have drawing skills to start, but for sure if this program exists much more people will be ready to create their own AG.

Jp
#35
Im sorry, but i was unable to solve this by myself. Adding some features to the game, i decided add a custom GUI when the player pauses the game called gCustomPause  which have visible set to popupmodal.

So, at Keypress, when players press"P" i add gCustomPause.Visible = True;

But, even when the game do not process clicks or keyboard inputs and all animations stopped (only the button in the GUI to close it responds) the game still is working; The game still works in the background, and i can see that the clock is still runing ??? (internal clock routines are in the RepExec section)

But, if i change the gCustomPause.Visible = True for Display ("Pause, press any key to continue...") everything in the game stop (even the RepExec routines)

How i can obtain that when i call the gCustomPause? I check all the manual and the forums and i was unable to find something similar. And its supposed that a popup GUI pauses the game when you call it from a script.

Thanks for any help.

JpSoft

#36
UPDATED 02-may-2008

4 Different units : soldiers, tanks, artyllery and towers (defense only). Improve your attack and your defense researching technologies, increase your money with investments, spy your enemy... a lot of different ways to win the war!!

Game user interface includes:

-Minimap to control the overall situation (game map is 1280*840).
-Wheel support to scroll the main map.
-Custom autosave, save game and restore game.
-Drag&drop windows for a better administration of the game.
-Shortcut keys for everything you can do in the game.
-Custom help.








Some graphic improvements (we hope so) and last buttons in the status bar added. Working in more graphics (main background, animations, flags, options menu) and looking for free sound effects to add.

At this point, overall progress is as follow:

Scripting: 95 % (maybe some extra features will be added before release)
graphics: 50 % (There is a lot of work to do yet)
sound & music: 0 %
Release Estimation: Around May 15th (including english translation)
Documentation will be in PDF format (Spanish only  :()

JpSoft

PS If anyone want contribute with a translation to any language, just let us know and we could send you the txt file. Its only 120 lines to translate  (nobody? just 120 lines?)
#37
Critics' Lounge / tank sprite
Tue 29/04/2008 23:00:52
This sprites are for our RTS game, any opinion will be more than welcome

Original size (41x17)


5x



Original size (32x32)


5x zoom


We used some predefined images and modify them to avoid copyright violations  ;D

JpSoft
#38
Adventure Related Talk & Chat / AGSWar
Sat 26/04/2008 22:33:33
This is our first post whit this nick, even when i already released a game as JpGames 1 year ago (march 2007). Moved from Venezuela to Spain, i decided change my nick since im not working with my old friends anymore.

Im working in a RTS game using AGS and it is almost complete; im just adding sounds, some screen effects, AI levels and more stuff. A single game takes around 45 minutes - 1 hour in the standard difficult when you are the programmer and knows how the AI works  ;D

Im looking for someone who can improve the BG of the main map. It is a 640x400 32-bit so you can be very creative. Just let me know via PM and i will send you the BMP (i prefer work with BMP's). Also, if you thing you can create a nice GUI buttons in 8x8 pixels and 30x30 pixels, i could send you the sprites (i recognize that the GUI is very poor for visual)

Finally, if someone want download  the beta-version to beta-test the game, just let me know and i will be more than happy to let you know where you could download it. Beta-version do not have sounds, fade-effects and its just the engine, but it can be played anyway (the engine have almost 4000 lines of code so i want check if there is any failure)

I checked the forums for another RTS games in AGS and its hard to find one (i think some people is working in one called "troppers" right now and thats all) so i believe the engine is, at least, original, even when i inspired myself in MS Age of Empires and a MMORPG called astrowars.

I avoided post in "in production" since the screenshots are very poor visually (yet) and i dont want you can create a poor overall-impression of the game.

Thanks for your time, and of course, thanks to CJ for AGS Ver 3.0  8) (sometimes i really dont understand why Delphi 7.0 is too complicated  and AGS is too easy >:()

JpSoft
SMF spam blocked by CleanTalk