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

#121
@Snarky less jittering would be amazing. Right now the sprite scaling is all handled by the mode7 module, which is pretty beyond me in terms of programming. I can try reading through it, but I doubt I would know what to change or how to change it unfortunately.
#122
Prototyping new elements:
-Bridges
-Tunnels
-Signal lights
-Station platforms
-Buildings
-Track variations, including
  -Rail switches
  -Changing the number of tracks (still figuring out a smoother transition for this one).

(Lots of placeholder graphics here. Also, please ignore the desert rock formations being in the "green" locale  (laugh) )

#123
There are multiple ways to do it, but you should only need nine objects. You can change each object's graphic depending on which inventory is used on it, and check each object's graphic when looking for the right combination.

You could also make the puzzle a GUI and use buttons instead of objects, and change each button's graphic. It's up to you.

But ultimately, you only need to check for which graphic is used, which can be done with simple if statements like
Code: ags
 if (oBox2.Graphic==6){
  //code here
}
It's still a lot of interactions but it at least simplifies the number of objects you need.

There are ways to simplify the number of interactions too, but someonecelse can probably explain that more efficiently than I can. this should at least get you started.
#124
Quote from: MIGGO on Sat 28/09/2024 17:33:08Imagine this, Melon Head started off as an isometric project! I took a little gameplay vid of the prototype:
I love this!! A shame you had to abandon the old vision for the project, so thanks for sharing the video. It looks fantastic.
#125
Updated to new version with a bug fixed in the string function.
#126
MODULE: QuickFill 0.1
EDIT: UPDATED TO NEW VERSION WITH BUG FIX.

Hello all! Are you sick of writing a ton of lines when defining the contents of an array? Especially when your project uses a million arrays? Quickfill is a tiny new script to save time and space by allowing you to fill an array all at once in one line of code.

Huge thanks to @Crimson Wizard for advice on how to script this. My first module!  ;-D

This is the initial release, version 0.1. Please report any bugs so I can fix them!!
DOWNLOAD HERE: https://www.mediafire.com/file/92lm7w2endt2mrv/QuickFill.zip/file

IMPORTANT: This module works only with AGS 3.6.0 or later.

Within this module, five functions are offered, allowing you to fill five types of arrays: int[], float[], bool[], String[], and Point*[].
These will produce the same result as doing it the long way.

For example, instead of doing this:
Code: ags
int MyArray[6];
MyArray[0] = 640;
MyArray[1] = 480;
MyArray[2] = 800;
MyArray[3] = 600;
MyArray[4] = 1280;
MyArray[5] = 720;
You'll simply do this:
Code: ags
int MyArray[];
MyArray = quickfill_int_array(6, "640,480,800,600,1280,720");

Script API:

To use the functions, first you declare whatever arrays you want (leave the size of the array blank. The function will declare the size later, so you will get an error if you do so now):
Code: ags
int MyIntArray[]; //sizes undefined
float MyFloatArray[];
bool MyBoolArray[];
String MyStringArray[];
Point* MyPointArray[];  //Note that you use Point *pointers here, not just regular Points.
Once you've declared your arrays, the specific functions available are:
Code: ags
int[] quickfill_int_array(int size, String values)
float[] quickfill_float_array(int size, String values)
bool[] quickfill_bool_array(int size, String values)
String[] quickfill_String_array(int size, String values)
Point*[] quickfill_Point_array(int size, String values)
You call the functions with the syntax below. The first parameter is always an int determining the size of the array, and the second is a String listing the values you want for each item.
IMPORTANT: Note the slight differences in punctuation within each function's String parameter, depending on the type of array.
Code: ags
//for ints, separate items in the String parameter by using commas.
MyIntArray = quickfill_int_array(5, "0,111,-20,36,-4"); //This line is all you need!! MyIntArray is now filled!

//for floats, the same syntax, commas to separate:
MyFloatArray = quickfill_float_array(4, "1.22,8.04,3.6,99.1"); //That's it!

//for bools, use 0 and 1 to represent true and false
MyBoolArray = quickfill_bool_array(7, "1,0,0,1,1,0,1"); //This fills the array with "true, false, false, true, true, false, true"

//Strings are more complicated, since we want them to be able to contain commas. Therefore, we separate String items using an asterisk.
//IMPORTANT NOTE: for this function, you must place an asterisk after the final item, not just between each one!
MyStringArray = quickfill_String_array(5, "Hello, world!*Hi, how are you?*I'm good, thanks. And you?*Just splendid.*Glad to hear it!*"); 
//all punctuation marks except the asterisks will be retained within each String.

//Finally, we use an asterisk to separate Points as well, since each point has both an x and a y coordinate.
//NOTE: Just as with the String array, you must place an asterisk after the final item!
MyPointArray = quickfill_Point_array(6, "1,4*10,200*-20,8*1400,35*-206,32*18,20*"); //this fills the six Points in the array with: 1,4 ; 10,200 ; -20,8 ; 1400,35 ; -206,32 ; 18,20

And that's it! I hope this saves you lots of time and scrolling through endless lines of array definitions. :)
#127
@Gal Shemesh Mostly the module works great, but I may have found two possible bugs.

1. You have
Code: ags
if ( userGUI ) userGUI.Visible = false;
within the FadeIn function and
Code: ags
if ( userGUI ) userGUI.Visible = true;
within the FadeOut function.

For me, this produced the opposite of the intended effect, removing GUI during fade in and making it visible after fade out. I swapped the two lines of code, and this fixed the problem.

2. Another issue I had was that my game involves hundreds of overlays, and the grayscale screenshot was appearing behind some of them. While this can produce very cool effects like having most of the screen be grayscale while some objects remain in color, that's not really the intended behavior of the module. Events that are in any of the game's repeatedly_execute_always functions will also continue to play when the game is paused, and if this involves overlays, this too can happen on top of the screenshot.

I fixed this by giving my pausegame GUI a very high ZOrder (1000), and then I added this statement to your module:
Code: ags
if( userGUI ){
      screenOverlay.ZOrder = userGUI.ZOrder-1;
    }
This fixed the problem for me by making the grayscale screenshot appear on top of all the overlays (which have ZOrder under 1000), but below the pausegameGUI. Unfortunately, this  would not fix the issue if the user does not pass a GUI when calling the function, or if the user does not put a high enough ZOrder on their GUI.


On a more positive note, I also made, for my game, some changes and additions to the module, if you're interested.

First, I changed the location of
Code: ags
if ( userGUI ) userGUI.Visible = true;
to before the screenshot is taken, which includes the GUI in the screenshot.

Then I changed the location of
Code: ags
if ( userGUI ) userGUI.Visible = false;
to BEFORE the fadeout, which means that the GUI fades out along with the grayscale screenshot, which I thought was a nice effect. Sadly, I don't think it's possible to have the GUI fade in along with grayscale screenshot without putting in separate fade-in code for the GUI itself (which is possible, but more complicated than fading it out with the screenshot).

I also added a speed parameter to both the fade in and fadeout functions:
Code: ags
static function grayscale::FadeIn(GUI* userGUI, int FadeSpeed)

and then used that parameter in the fading wait delay within each function:
Code: ags
    Wait(FadeSpeed); 
So now the user can set the speed of the fade, with 0 being an instant switch to grayscale and higher numbers increasing the slowness of the fade.

IMPORTANT CAVEAT: I don't know if this will work if you use the tween module (I am not using it).

EDIT:
Another caveat on adding the FadeSpeed parameter: because the screenshot fades its transparency in increments of 5% each update, passing a wait number above 6 or so for the speed makes the transition look a bit choppy. But I kept the transition speed at 5% each update because it allows for faster fading, whereas fading by 1% percent each update would be slow even at Wait(1).

I hope this is useful :)
#128
Hey @Gal Shemesh just wanted to let you know I'm using this module in the game I'm currently working on. Thanks for making it. :)
#129
I totally forgot about this... will have to try to think of something
#130
Quote from: heltenjon on Thu 19/09/2024 11:45:10Hmmmm... Mad Max Jack, Tunnel Vision and now this. I sense a pattern.  ;-D

What's the pattern? Transportation?  Or just "sprites coming toward the screen"? (laugh) Mostly I just like trains. I have an idea for a train-based platformer too.
#131
Quote from: WeeklyJournaling on Wed 18/09/2024 22:34:49Haha this looks amazing :O
I can't even imagine how you made it to be honest :D it's way beyond my skill level.
Awesome job

Thanks! In general it is made possible (especially the moving ground sprite) by the Mode7 module which I did not write, but I've been trying to use it as skillfully as I can.  (nod)

Programming what I've done so far has certainly not been easy though!  (laugh) Every new step has its own hurdles. I alternate between loving it and feeling wholly inadequate to the task. :P
#132
ONCOMING TRAIN TRAFFIC  ;-D  ;-D  ;-D

#133
Update: I've made a lot of progress on the "desert" environment sprites and have eliminated all the foliage placeholders (for now).

Here's a teaser screencap with a logo (subject to change  :-D).

#134
Thanks so much for playing and for the comments, @heltenjon. Always a pleasure!
#135
@AGA @tampie85 I just noticed that on mobile, under the "latest from our forums" section, all the linked forum posts are 10 months old. Is this a bug or just something not fully implemented yet?
#136
@heltenjon it's absolutely possible to make turns in mode7, but the tricky thing is that the tracks are hand drawn and hand animated, so they are not part of the moving ground sprite (I didn't want them to look too flat). This means I would would have to draw the curved tracks approaching, animating, and then re-straightening as well, and the straight ones already took forever to get right.  :tongue:

But going around curves does seem like an essential part of the experience, dang it.  >:(  I suppose this might be a time to try modeling the tracks in 3d and then just taking screenshots and painting over them... hmm. I'll have to think about it.

Mode7 doesn't really allow for up/down, so I would have to make an illusion of it, which i'm not currently sure how to do. That's what happens when it's all actually just 2d masquerading as 3d. I really want to create the illusion of going over a bridge, but I haven't figured out how to make that work either.  :-\

I'm not pushing myself toward a firm deadline on this, though, just trying to have fun with it, so maybe playing around and trying some things out will yield results.  (nod) Can't make any promises though.
#137
@bicilotti thank you! There will indeed be a least a modicum of gameplay, so let's hope you're right.  (laugh)

@Kastchey thanks very much! I really can't take full credit given how much of the real innovation comes from the mode7 module, which was certainly not made by me.  :)  But I'm absolutely trying to do the best that I can with it, and I'm glad the current result impresses someone besides me!  :-D I really appreciate the excitement and encouragement!
#138
Hey everyone,

I'm excited to announce my next game in production, a Train Simulator made in AGS;-D  It wouldn't have been possible without the Mode7 module by eri0o, which is still experimental and may change quite a bit.

I've been wanting to do a game like this ever since I got a taste of what AGS can do in this vein while I was making TUNNEL VISION. I don't know what it is about faux-3D environments with billboard sprites, but it gives me far more satisfaction than true 3D environments ever did. Long live faking it! :-D

Planned features:
-640x400 resolution (I'm getting around 50fps so far, which is great)
-5 different environments to play/drive in.
-"Relax mode" where you simply let the scenery go by, and enjoy the view. It will be somewhat customizable.
-"Task mode" where you have different goals in each environment, such as delivering passengers, dropping off freight cars, or clearing obstructions from the tracks.
-A high score system to keep track of your best runs.

As of right now, things are still in the VERY early stages, but I've finally got the hang of the Mode7 module after a long break working on other games.

CURRENT PROGRESS:

ART: 5% (basically just the tracks, terrain textures, sky, and some of the distant backdrops are done - all the passing objects and GUIs are placeholder graphics right now).
SOUND: 0% (that will probably come last).
PROGRAMMING: 8%? I have no idea. This is the sort of thing where unexpected hurdles come up frequently, so it's probably more like 5%.
GAME DESIGN: 35% - I'm still seeing what it's possible to do within a faux-3d environment, as well as trying to make "task mode" as engaging as possible. I've got some solid ideas for goals to accomplish in a few environments, but not for all of them.

Last but not least, HERE IS A VIDEO. As I said above, all the passing objects and GUIs are placeholder sprites, but I've been having a great time with it. Thanks for reading!  :)



#139
Quote from: Crimson Wizard on Wed 28/08/2024 12:13:52I tried a bit different fix based on the current downloadable module:

Code: ags

Code: ags
this.Objects[obin].ScreenVisible = this.Objects[obin].Visible
      && (obj_d_x + w > this._screen_x) && (obj_d_y + h > this._screen_y)
      && (obj_d_x < this._screen_width) && (obj_d_y < this._screen_height);


@Crimson Wizard Will this allow the objects to come back when they reappear on screen? If not, I can try scripting my own function within the room script.

Quote from: Crimson Wizard on Wed 28/08/2024 12:13:52BTW, in regards to speed, the game I'm testing displays a camera moving along the railroad in a "straight line", with only few objects around,
and it runs pretty well in Software renderer, making ~50 fps at average on my machine.

I've been getting the same speeds but am planning to add a lot more objects, as the ones there now are basically just test objects. But so far the speed has been very good, and I've been happy with it.

Quote from: eri0o on Wed 28/08/2024 11:57:12Obviously if you yank both and just rely on sprite scaling you can go much further: https://github.com/adventuregamestudio/ags/pull/2478#issuecomment-2253633845

@eri0o wow, this looks incredible! Is the ground here made up of object sprites?
#140
Quote from: Crimson Wizard on Wed 28/08/2024 07:18:14This may not be always the case. For instance, in RootBound's game, at least from the looks of it, the camera only moves forward, so any object past the camera will never bee seen again.

That's actually an illusion. The camera does in fact teleport back to the starting location repeatedly. I just did pretty well at making this seamless.

@eri0o my game actually doesn't involve any rotation, so I haven't run into these issues. I like the "zones" idea though. I might be able to script a function to remove objects once they leave the screen.

One last question though. Is it possible to make the objects appear when they are further away? Rught now they appear when the camera feels quite close to them. I didn't see an option to adjust this in the script API. If there isn't one, I can live with it, though. Thanks for your responses here.
SMF spam blocked by CleanTalk