null1024 Posted July 9, 2006 Report Share Posted July 9, 2006 Here is a small GMD showing top-of-water paralax Link to comment Share on other sites More sharing options...
Godmaster Posted July 9, 2006 Report Share Posted July 9, 2006 Hmm... using speed can't be very precise, because of the view scrolling, I suggest this method, that I use: For a static background: draw_background(background,view_xview,view_yview) For the furthest parallax: for (i=0; i< room_width/1.5; i+=put background width here)draw_background(background name,i+view_xview/1.5, view_yview/1.5) For the middle parallax: for (i=0; i< room_width/2; i+=" put background width here")draw_background(background name,i+view_yview/2, view_xview/2) For the nearest parallax: for (i=0; i< room_width/2.5; i+=" put background width here")draw_background(background name,i+view_xview/2.5, view_yview/2) I hope can help... Link to comment Share on other sites More sharing options...
Kain Posted July 9, 2006 Report Share Posted July 9, 2006 I can't download the file no matter what I do. Anyway, tiling your own background while drawing only the amount of times needed requires one tricky algorithm (but you can probably get away with being sloppy): i=x1-((x1 mod bw)-(bx mod bw))-bw*((x1 mod bw)<(bx mod bw)); for(i=i; i<=x2; i+=bw){ draw_background(background,i,by); } -x1 and x2 are the start and end of the area you want it to be drawn (namely "view_xview" and "view_xview+view_wview" respectively) -bx and by are the positions of the background you want to be drawn (usually view_x/yview multiplied by something between 0 and 2). -bw is the width of the background. Anyway, here's a complete paralax system ala Sonic 3. With a little editing, this system could easily be split into having two seperate paralax systems for above and below the water line. http://fast.filespace.org/KainSirusque/paralax.gm6 Forgive the crappy server, I don't know the best place to upload random .gm6 files. Edit: GM 5.x version: http://fast.filespace.org/KainSirusque/paralax.gmd Link to comment Share on other sites More sharing options...
Godmaster Posted July 9, 2006 Report Share Posted July 9, 2006 wow, it can work faster than my "repeating backgrounds"! good job! Link to comment Share on other sites More sharing options...
LarkSS Posted July 10, 2006 Report Share Posted July 10, 2006 can't download the file no matter what I do. Me niether. =/ Anyway, here's a complete paralax system ala Sonic 3. With a little editing, this system could easily be split into having two seperate paralax systems for above and below the water line.http://fast.filespace.org/KainSirusque/paralax.gm6 Forgive the crappy server, I don't know the best place to upload random .gm6 files. Edit: GM 5.x version: http://fast.filespace.org/KainSirusque/paralax.gmd I looked at the GM5 version and just saw some classic paralax. I thought the topic was supposed to show off a water effect... Anyways, add some vertical paralax to that ( just a little bit ) and it'll look nice. BTW, shouldn't your examples go under fangame assistance since that's where tutorials go? This is just a programming discussion part of the forum where you talking about how things can be done. ( Yes, I see that you have done that too ) Link to comment Share on other sites More sharing options...
VectorSatyr Posted July 10, 2006 Report Share Posted July 10, 2006 BTW, shouldn't your examples go under fangame assistance since that's where tutorials go? No, that's where help topics go, and tutorials are used to address those help topics. Tutorials actually go HERE. Link to comment Share on other sites More sharing options...
Kain Posted July 10, 2006 Report Share Posted July 10, 2006 Ah, yes. I thought there was something extra about water-line's paralax, but I couldn't remember what. It'd take a tiny bit of calculation to work it correctly at any room height, but very possible. Link to comment Share on other sites More sharing options...
null1024 Posted July 10, 2006 Author Report Share Posted July 10, 2006 Save the Attachment.htm that shows up when you do the Save target As, and rename it to Water.gmd. Link to comment Share on other sites More sharing options...
Recommended Posts