Jump to content


DingleNutZ

Member Since 15 Nov 2010
Offline Last Active Apr 19 2012 10:48 AM

Topics I've Started

3 in a row problem

17 April 2012 - 06:04 AM

Hey everyone. im protoyping a game in game maker and im having a little bit of trouble coming up with a script for checking if 3 objects are touching, then to change the youngest object into another instance, so heres my code so far:
for(i=0; i<=5; i+=1){
    for(j=0; j<=5; j+=1){
        for(k=1; k<=2; k+=1;){
            switch(field[i,j]==k){
                case field[i+1,j]==k: switch(field[i,j]==k){
                    case field[i+1,j]==k: return true; 
                    case field[i-1,j]==k: return true; 
                    case field[i,j+1]==k: return true; 
                    case field[i,j-1]==k: return true;}
                case field[i-1,j]==k: switch(field[i,j]==k){
                    case field[i+1,j]==k: return true; 
                    case field[i-1,j]==k: return true; 
                    case field[i,j+1]==k: return true; 
                    case field[i,j-1]==k: return true; }
                case field[i,j+1]==k: switch(field[i,j]==k){
                    case field[i+1,j]==k: return true; 
                    case field[i-1,j]==k: return true; 
                    case field[i,j+1]==k: return true; 
                    case field[i,j-1]==k: return true; }
                case field[i,j-1]==k: switch(field[i,j]==k){
                    case field[i+1,j]==k: return true; 
                    case field[i-1,j]==k: return true; 
                    case field[i,j+1]==k: return true; 
                    case field[i,j-1]==k: return true; }
                    
             }
        }
    }
}
/*
q1=instance_position(50+(64*i),155+(64*j),obj_1);
q2=instance_position(50+(64*i),155+(64*j),obj_1);
q3=instance_position(50+(64*i),155+(64*j),obj_1);
min(q1,q2,q3);
*/
The field array is the grid that im trying to find the connections on, var i is the x axis and var j is the y axis. k is the instance type (eg, obj1, obj2, etc..), starting at one. the code only needs to find if an instance is next to it, or above it, not on the diagonal. and it only needs to find an instance that is the same object as it.
the commented code is something i was trying out to try and figure out the youngest instance, the numbers in there are used to get the x and y co-ords as they are not stored in the field array. the field array is used to store if something is in there or not. (now that i read this, it seems kinda hard to understand, the i and j vars represent the x and y positions in the array, if you know what i mean.)
So does any one have any ideas on how i can make it work?
i was thinking once i have found the youngest instance, i can store it's co-ords in a temp var, delete the touching instances, then set the instance represented by k+1 into co-ords previously occupied by the youngest instance.
also, how would i be able to go about checking more than 3 instances?
sorry if this is hard to understand. thankyou very much for any help in advance.

Mitch

Script not entering for loop

07 April 2012 - 06:59 AM

My script here is not entering the for loop, any ideas on why this is happening?
MainFile = XML_Init(argument0,0);
for(i=0;i=20;i+=1)
{
    LineString = XML_Readln(MainFile);
    if(XML_Check_Tag(LineString,"Category",0)=global.TAG_OPENCLOSE_SINGLE){
        cat[i]=XML_Get_Contents(LineString,"Category",global.XML_Level,"Error");
    }
    //...this is repated a few times for different xml scripts. this section of the code works correctly
    if(XML_Check_Tag(LineString,"ProductDescription",0)=global.TAG_OPENCLOSE_SINGLE){
        des[i]=XML_Get_Contents(LineString,"ProductDescription",global.XML_Level,"Error");
    }
    file_text_readln(MainFile)
}
XML_Close(MainFile);
dct=string(date_current_datetime());
f=file_text_open_write(string("products")+dct+string(".sql"));
file_text_write_string(f,"INSERT INTO `zen_products` (`products_id`, `products_type`, `products_quantity`, `products_model`, `products_upc`, `products_isbn`, `products_ean`, `products_asin`, `products_sku`, `products_image`, `products_price`, `products_msrp`, `products_price_w`, `products_virtual`, `products_date_added`, `products_last_modified`, `products_date_available`, `products_weight`, `products_actual_weight`, `products_weight_type`, `products_dim_type`, `products_length`, `products_height`, `products_ready_to_ship`, `products_width`, `products_status`, `products_tax_class_id`, `manufacturers_id`, `products_ordered`, `products_quantity_order_min`, `products_quantity_order_units`, `products_priced_by_attribute`, `product_is_free`, `product_is_call`, `products_quantity_mixed`, `product_is_always_free_shipping`, `products_qty_box_status`, `products_quantity_order_max`, `products_sort_order`, `products_discount_type`, `products_discount_type_from`, `products_price_sorter`, `master_categories_id`, `products_mixed_discount_quantity`, `metatags_title_status`, `metatags_products_name_status`, `metatags_model_status`, `metatags_price_status`, `metatags_title_tagline_status`, `products_condition`, `products_secret`, `out_of_stock`, `products_diameter`) VALUES");
file_text_writeln(f);
for(j=0;j=20;j+=1){   //this for loop is not started
if (stk[j]>0){rts="1"}else{rts="0"};
if (rrp[j]>=200){fs=1;}else{fs=0;};
if (j=20){term=";"}else{term=","};
file_text_write_string(f,string("(")+string(pid[j])+string(",1,")+string(stk[j])+string(",")+string(pno[j])+string(",NULL,NULL,NULL,NULL,NULL,")+string(img[j])+string(".jpg,")+string(rrp[j])+string(",")+string(rrp[j])+string(",0,0,")+dct+string(",")+dct+string(",NULL,")+string(wgt[j])+string(",")+string(wgt[j])+string(",KGs,CM,")+string(bl[j])+string(",")+string(bh[j])+string(",")+string(rts)+string(",")+string(bw[j])+string(",")+rts+string(",1,")+string(pno[j])+string(",0,1,1,0,0,0,1,0,1,0,0,0,0,")+string(rrp[j])+string(",cat id,1,0,0,0,0,0,NULL,0,0,NULL)")+term);
file_text_writeln(f);
show_message("wroteline");
}
file_text_close(f);
show_message("done");

im not worried about script optimization or speed, i just want it to work.
Thank you in advance for any help.

Need a 3D artist good at high poly models

18 July 2011 - 10:40 AM

Hey everyone, If you would like a great graphics artist to join my team, upload, or pm me a link to some of your work, such as a video or image and i will contact you back if i like your artwork.
there is a royalty from the games for the 3D artist that gets chosen.
the type of work i will need will be High poly 3d models rendered into 2D, so you will need to be able to rig and render your models.

TD Space ship request

15 December 2010 - 03:25 AM

Hey everyone. im coding a game for someone and i need some sprite because im terrible at making them.
if some one could provide, i would be very grateful and give credit in the game.
i need:

Type:..........................Scale(Meters):

Light Fighter...................... 2
Heavy Fighter...................... 4
Bomber..............................8
Corvette............................16
Frigate............................ 32
Cruiser............................ 64
Destroyer.......................... 128
Battleship..........................256
Moon Base.......................... 512
Star Base.......................... 1024

the game designer would perfer a retro look to them if you could accomplish please.

can i please have them as .gifs please with 2 frames, one with thrusters on, on with thrusters off.
similar to this please: Posted Image

and also some planets:
TNO is "A trans-Neptunian object (TNO; also written transneptunian object) is any minor planet in the Solar System that orbits the Sun at a greater distance on average than Neptune. The Kuiper belt, scattered disk, and Oort cloud are three divisions of this volume of space." From wikipedia

Name.......Classification......................Pixels Drawn
Sun........Star..................................139,000
Jupiter....planet (gas giant)....................13,982
Saturn.....planet (gas giant)....................11,646
Uranus.....planet (gas giant)....................5,072
Neptune....planet (gas giant)....................4,924
Earth......planet (terrestrial)..................1,274
Venus......planet (terrestrial)..................1,210
Mars.......planet (terrestrial)..................678
Ganymede...moon..................................526
Titan......moon..................................515
Mercury....planet (terrestrial)..................488
Callisto...moon..................................482
Io.........moon..................................364
Luna.......moon..................................347
Europa.....moon..................................312
Triton.....moon..................................271
Eris.......planet (dwarf)........................240
Pluto......planet (dwarf)........................231
2005 FY9...TNO...................................180
Titania....Uranus................................158
Rhea.......Saturn................................153
Oberon.....Uranus................................152
Makemake...planet (dwarf)........................150
2003 EL61..TNO...................................149
Sedna......TNO...................................148
Iapetus....moon..................................147
Orcus......TNO...................................136
Quaoar.....TNO...................................126
Charon.....moon..................................121
Umbriel....moon..................................117
Ariel..... moon..................................116
Haumea.....planet (dwarf)........................115
Dione......moon..................................112
Tethys.....moon..................................107
2002 TC302.TNO...................................106
Ceres......planet (dwarf)........................95
Varuna.....TNO...................................89
2002 UX25..TNO...................................84
Ixion..... TNO...................................82
2002 MS4 TNO..................81
2003 MW12 TNO..................76
2006 QH181 TNO..................76
2004 XR190 TNO..................75
2005 RN43 TNO..................73
1995 SM55 TNO..................70
2002 AW197 TNO..................70
2004 GV9 TNO..................70
2005 RR43 TNO..................70
2003 AZ84 TNO..................69
2003 OP32 TNO..................67
2001 UR163 TNO..................64
2003 VS2 TNO..................64
1996 TL66 TNO..................63
2002 TX300 TNO..................62
2002 KX14 TNO..................58
2003 QW90 TNO..................58
2004 SB60 TNO..................58
2005 RM43 TNO..................58
Chaos.......TNO..................56
2004 TY364 TNO..................55
1996 TO66 TNO..................54
Pallas......asteroid.............53
Vesta.......asteroid.............53
2002 KW14 TNO..................53
2004 PR107 TNO..................53
2004 UX10 TNO..................53
Enceladus moon.................50
1999 DE9 TNO..................50
2001 QF298 TNO..................50
2005 TB190 TNO..................50
Huya........TNO..................50
Miranda.....moon.................47
2003 QX113 TNO..................46
1998 SN165 TNO..................46
2000 CN105 TNO..................44
2002 XV93 TNO..................44
2003 FY128 TNO..................44
2000 YW134 TNO..................43
1999 CD158 TNO..................42
2002 CY248 TNO..................42
2002 WC19 TNO..................42
Proteus.....moon.................42
Hygiea......asteroid.............41
1999 TC36 TNO..................41
1996 QG21 TNO..................40
2003 UZ117 TNO..................40
2006 HH123 TNO..................40
Mimas.......moon.................38
Nereid......moon.................34
Davida......asteroid.............33

the pixels drawn is how many pixels the actual image is, it doesnt include tranparency.

i cannot offer you an official position in the project, but i can ask to bring aboard if you wish.
if multiple people wish to make these sprites, please keep the same style as the first person sprites i approve of.

theres plenty more to keeps yas busy if ya want :D

thanx for any images, and if you want to work on the project, please PM me and i will see if the designer wants an artist

p.s sorry for the bad formatting, it looks perfect in the editor

Rover

16 November 2010 - 12:54 AM

hey there every one its been a while, but im back.
i have a site for yas, free unlimited life long hosting at:

pro-rover.com/upload

i would like to see it used, i pay heaps for it.

the site will be getting a facelift but the files will stay where you put them.

upload your games, sources and resources.