T
TDSrock
Guest
So I'm seeing this notation happen a couple times:
The logic I see here is that Gamemaker supports associative arrays but require the '?' to use them. Am I correct here?
Code:
player[? "type"]
player[? "type"]
That's accessor syntax for ds_map. So, if you doSo I'm seeing this notation happen a couple times:
The logic I see here is that Gamemaker supports associative arrays but require the '?' to use them. Am I correct here?Code:player[? "type"]
player = ds_map_create();
player[?"x"] = 1;
ds_map_set(player, "x", 1);
Those are ds_maps and ? is their accessor. You can look both these things in the manual.So I'm seeing this notation happen a couple times:
The logic I see here is that Gamemaker supports associative arrays but require the '?' to use them. Am I correct here?Code:player[? "type"]
I don't think a single person had sound. I pissed around with dynamic audio buffers, but it just wasn't happening. I didnt have enough experience and almost no reference to any of this stuff. Even Mike didn't piss with it, so its probably more trouble and more time consumeing than its worth.no sound unfortunately
My game has sound.I don't think a single person had sound. I pissed around with dynamic audio buffers, but it just wasn't happening. I didnt have enough experience and almost no reference to any of this stuff. Even Mike didn't piss with it, so its probably more trouble and more time consumeing than its worth.
Yeah I had a quick look at audio buffers, I'll be interested to see how @Nocturne made the sounds (guess is you loaded actual sound files to create the buffers from originally)I don't think a single person had sound. I pissed around with dynamic audio buffers, but it just wasn't happening. I didnt have enough experience and almost no reference to any of this stuff. Even Mike didn't piss with it, so its probably more trouble and more time consuming than its worth.
Nope! All generated procedurally, basically through trial and error, just plugging in numbers and seeing what happens.Yeah I had a quick look at audio buffers, I'll be interested to see how @Nocturne made the sounds (guess is you loaded actual sound files to create the buffers from originally)
///////////////////////////////////////////////////////
//first run innitials
///////////////////////////////////////////////////////
if room_speed!=60{
room_speed=60;
draw_set_color(c_white);
window_set_size( 800, 600 );
window_set_position(-400+display_get_width()*.5,-300+display_get_height()*.5)
texture_set_interpolation(0)
texture_set_repeat(1)
///sound
//buff_beep=buffer_create(32768,buffer_fixed,1)
//buffer_seek(buff_beep,buffer_seek_start,0)
//repeat(32768/4410){buffer_write(buff_beep,buffer_u8,90)}
//snd_beep=audio_create_buffer_sound(buff_beep,buffer_u8,4410,0,32768,audio_mono)
///player
p_x=256;
p_y=256;
p_z=0;
p_swing=0;
att=0;
p_xprev=0;
p_yprev=0;
p_turn_ac=0;
p_gun_type=0;
p_dir=0;
p_zdir=0;
mouse_lock=0
c_brown=make_color_rgb(70, 20, 9);
/////////////////////////////////////////////////////////
//RESOURCES: levels: textures:
/////////////////////////////////////////////////////////
mod_level[5]=d3d_model_create();
mod_level[4]=d3d_model_create();
mod_level[3]=d3d_model_create();
mod_level[2]=d3d_model_create();
mod_level[1]=d3d_model_create();
col_level[0]=ds_grid_create(4096/32,4096/32)
super_string="CCCCCCCC________________________________________________________________________________________________________________________CCCCCCCC________________________________________________________________________________________________________________________CCCCCCCC________________________________________________________________________________________________________________________CCCCCCCC________________________________________________________________________________________________________________________CCCCCCCC____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________MMMMM___________________________________________________________________________________________________________________________M_______________________________________________________________________________________________________________________________M_______________________________________________________________________________________________________________________________M_______________________________________________________________________________________________________________________________M_______________________________________________________________________________________________________________________________M_______________________________________________________________________________________________________________________________M_______________________________________________________________________________________________________________________________M_______________________________________________________________________________________________________________________________M_______________________________________________________________________________________________________________________________M_______________________________________________________________________________________________________________________________M_______________________________________________________________________________________________________________________________MMMMMMMM________________________________________________________________________________________________________________________________________________________________WWWWWWWWWWWWWWWWWWWW____________________________________________________________________________________________________________W__________________W____________________________________________________________________________________________________________W__________________W____________________________________________________________________________________________________________W__________________W____________________________________________________________________________________________________________W__________________W____________________________________________________________________________________________________________W__________________W____________________________________________________________________________________________________________W__________________W____________________________________________________________________________________________________________W__________________W____________________________________________________________________________________________________________W__________________W____________________________________________________________________________________________________________W__________________W____________________________________________________________________________________________________________W__________________W____________________________________________________________________________________________________________WWWWWWWW____WWWWWWWW____________________________________________________________________________________________________________WWWWWWWWW__WWWWWWWWW____________________________________________________________________________________________________________W____WWWW__WWWW____W____________________________________________________________________________________________________________W____WWWW__WWWW____W____________________________________________________________________________________________________________W____WWWW__WWWW____W____________________________________________________________________________________________________________W____WWWW__WWWW____W____________________________________________________________________________________________________________W____WWWW__WWWW____W____________________________________________________________________________________________________________W____WWWW__WWWW____W____________________________________________________________________________________________________________W____WWWW__WWWW____W____________________________________________________________________________________________________________W____WWWW__WWWW____W____________________________________________________________________________________________________________W__________________W____________________________________________________________________________________________________________W_________P________W____________________________________________________________________________________________________________WWWWWWWW____WWWWWWWW_________________________________________________________________________________________CCCCCCC____CCCCCCCCCCCCCC________CCCCCCCCCCCCCCCCCCCCCCCCCC_____________________________________________________________________M________________________________________________________M______________________________________________________________________M________________________________________________________M______________________________________________________________________M________________________________________________________M______________________________________________________________________M________________________________________________________M______________________________________________________________________M________________________________________________________M______________________________________________________________________M________________________________________________________M______________________________________________________________________M________________________________________________________M______________________________________________________________________M________________________________________________________M______________________________________________________________________M________________________________________________________M______________________________________________________________________M________________________________________________________M______________________________________________________________________CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC____CCCCCCCC____________________________________________________________________________________________________________CCCCCCCC____CCCCCCCC____________________________________________________________________________________________________________C__________________C____________________________________________________________________________________________________________C__________________C____________________________________________________________________________________________________________C__________________C____________________________________________________________________________________________________________C__________________C____________________________________________________________________________________________________________C__________________C____________________________________________________________________________________________________________C__________________C____________________________________________________________________________________________________________C__________________C____________________________________________________________________________________________________________C__________________C____________________________________________________________________________________________________________C__________________C____________________________________________________________________________________________________________C__________________C____________________________________________________________________________________________________________CCCCCCCCCCCCCCCCCCCC____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________"
//var string_level=levels[0,0]
var xx=0, yy=0; ii=0;
repeat((room_height/32))
{
repeat((room_width/32))
{
ii+=1
var temp=string_char_at(super_string,ii)
if temp="W" { d3d_model_block(mod_level[0],xx*32,(yy*32),0,(xx*32)+32,(yy*32)+32,96,2,6); d3d_model_block(mod_level[0],(xx*32)+8,(yy*32)+8,96,(xx*32)+24,(yy*32)+24,96+24,1,1); ds_grid_add(col_level[0],xx,yy,1) }
if temp="M" { d3d_model_block(mod_level[1],xx*32,(yy*32),0,(xx*32)+32,(yy*32)+32,96,2,6); d3d_model_block(mod_level[1],(xx*32)+8,(yy*32)+8,96,(xx*32)+24,(yy*32)+24,96+24,1,1); ds_grid_add(col_level[0],xx,yy,1) }
if temp="C" { d3d_model_block(mod_level[2],xx*32,(yy*32),0,(xx*32)+32,(yy*32)+32,64,2,4); var chance=choose(1,0) if chance=0
{ var z=64; d3d_model_cone(mod_level[4],(xx*32),(yy*32),z+8,(xx*32)+32,(yy*32)+32,z+42,4,4,1,8)
d3d_model_cylinder(mod_level[3],(xx*32)+8,(yy*32)+8,z,(xx*32)+24,(yy*32)+24,z+8,1,1,0,8)
d3d_model_cone(mod_level[4],(xx*32),(yy*32),z+20,(xx*32)+32,(yy*32)+32,z+60,4,4,1,8)
d3d_model_cone(mod_level[4],(xx*32)+4,(yy*32)+4,z+42,(xx*32)+32-4,(yy*32)+32-4,z+72,4,4,1,8) } ds_grid_add(col_level[0],xx,yy,1) }
if temp="P" then {p_x=(xx*32)+16; p_y=(yy*32)+16;}
//if temp="E" {ds_list_add(enemy_list,)}
xx+=1
}
yy+=1
xx=0
}
///gen textures
var surf=surface_create(32,32);
surface_set_target(surf)
draw_set_color(c_white)
draw_rectangle(0,0,31,31,0)
draw_set_color(c_black)
draw_rectangle(0,0,31,31,1)
draw_set_color(c_white)
surface_reset_target();
tex_wall=background_create_from_surface(surf,0,0,32,32,0,0);
surface_free(surf);
var surf=surface_create(32,32);
surface_set_target(surf)
draw_set_color(c_white)
draw_rectangle(0,0,31,31,0)
repeat(63){
var alp=64+irandom(64)
var c_temp=make_color_rgb(alp, alp, alp);
var rx=irandom(32)
var ry=-16+irandom(32)
draw_set_color(c_temp)
draw_rectangle(rx,ry-1,rx-1,ry+32,0)}
draw_set_color(c_white)
surface_reset_target();
tex_rough=background_create_from_surface(surf,0,0,32,32,0,0);
surface_free(surf);
var surf=surface_create(32,32);
surface_set_target(surf)
draw_set_color(c_white)
draw_rectangle(0,0,31,31,0)
draw_set_color(c_black)
draw_rectangle(-1,0,15,15,1)
draw_rectangle(15,0,32,15,1)
draw_rectangle(0,15,31,31,1)
draw_set_color(c_white)
surface_reset_target();
tex_brick=background_create_from_surface(surf,0,0,32,32,0,0);
surface_free(surf);
//draw_rectangle(xx,yy,xx+1,yy+1,0)
d3d_set_fog(1,c_black,200,700)
d3d_start();
}
//////////////////////////////////////////////////////////////////////////////
//MAIN LOOP
//////////////////////////////////////////////////////////////////////////////
///player handleing
var joy_x=keyboard_check(ord("D"))-keyboard_check(ord("A"));
var joy_y=keyboard_check(ord("S"))-keyboard_check(ord("W"));
var joy_dir=point_direction(0,0,joy_x,joy_y);
var joy_dist=point_distance(0,0,joy_x,joy_y);
if keyboard_check_pressed(vk_escape){game_end();}
if keyboard_check_pressed(ord("c"))and mouse_lock=0 {mouse_lock=1} else {mouse_lock=0}
if mouse_check_button_pressed(mb_left) and att=0{ att=-1}
if att=-1 then p_swing+=15
if att=3 then p_swing-=5
if p_swing>=90 then att=3
if p_swing<0 then {p_swing=0; att=0;}
if mouse_lock=0{
p_dir+=((display_get_width()*.5)-(display_mouse_get_x()))/12
display_mouse_set((display_get_width()*.5),display_mouse_get_y())
}
if joy_dist>0{
//player smooth collide
p_xprev=p_x;
p_yprev=p_y;
var xdif=p_x+lengthdir_x(2,joy_dir-90+p_dir);
var ydif=p_y+lengthdir_y(2,joy_dir-90+p_dir);
p_x=p_xprev;
p_y=p_yprev;
var p_hsp=2;
var p_vsp=2;
if ds_grid_get(col_level[0],(p_x+16)/32,(p_y)/32,)=1 and xdif>p_x then p_hsp=0
if ds_grid_get(col_level[0],(p_x-16)/32,(p_y)/32,)=1 and xdif<p_x then p_hsp=0
if ds_grid_get(col_level[0],(p_x)/32,(p_y-16)/32,)=1 and ydif<p_y then p_vsp=0
if ds_grid_get(col_level[0],(p_x)/32,(p_y+16)/32,)=1 and ydif>p_y then p_vsp=0
p_x+=lengthdir_x(p_hsp,joy_dir-90+p_dir);
p_y+=lengthdir_y(p_vsp,joy_dir-90+p_dir);
}
///////////////////////////////////////////////////////////////////////////////
//MAIN DRAW LOOP
////////////////////////////////////////////////////////////////////////////////
d3d_set_projection(p_x,p_y,16,p_x+lengthdir_x(1,p_dir),p_y+lengthdir_y(1,p_dir),16,0,0,1)
d3d_transform_set_identity();
d3d_transform_add_rotation_y(-p_swing)
d3d_transform_add_rotation_z(p_dir+15)
d3d_transform_add_scaling(.5,.5,.5)
d3d_transform_add_translation(p_x+lengthdir_x(-1.2,p_dir+90)+lengthdir_x(9,p_dir),p_y+lengthdir_y(-1.2,p_dir+90)+lengthdir_y(9,p_dir),14)
draw_set_color(c_gray)
d3d_draw_block(-1,-.1,0,1,.1,5,-1,1,1)
draw_set_color(c_red)
d3d_draw_block(-1,-.3,-.3,1,.3,0,-1,1,1)
d3d_draw_block(-.4,-.3,-2,.4,.3,0,-1,1,1)
d3d_transform_set_identity();
draw_set_color(c_dkgray)
d3d_model_draw(mod_level[1],0,0,0,background_get_texture(tex_brick))
draw_set_color(c_green)
d3d_model_draw(mod_level[4],0,0,0,background_get_texture(tex_rough))
draw_set_color(c_brown)
d3d_model_draw(mod_level[3],0,0,0,background_get_texture(tex_rough))
draw_set_color(c_brown)
d3d_model_draw(mod_level[2],0,0,0,background_get_texture(tex_rough))
draw_set_color(c_yellow)
d3d_model_draw(mod_level[0],0,0,0,background_get_texture(tex_brick))
draw_set_color(c_white)
I have sounds. They are surprisingly easy to do using trial and error. I made myself jump sound and sweet death sound.I don't think a single person had sound.
We still have about 12 hours. Plenty of time.Jam is over? There's no time at all? How much time do we have yet? Maybe I still can make my sh** playable
Unlike you, I have just a couple of hours a day. But, as it was said here already :Although I had plenty of time, I never felt like going back to work on this. I'm not gonna enter.
Limits always stimulate creativity
September 16 at 23:59 GMT
23:59 GMT
GMT
I was not able to participate in the competition, do you think you will host this again in the future?
On a personal note: I loved the way people reacted to this Jam and how many people actually submitted games, considering it was the first Jam. If moderators and participants agree, I will definitely host the Jam again, probably with revisions after gathering feedback from this version.
You're correct in that assumption.I'm assuming those aren't going to be the same when you recompile it.
Since I haven't yet published the list and I just started now the recompilation process (and your name is one of the last ones), I'm going to allow it. However, you should have read the first post clearly, so consider this a one-time bonus:Could I make a quick update to my script (to automatically set the room variables at the start of the game) to account for this?
After the validation period ends, an executable will be made available per script with just one room with one instance in it and the script in the instance's Draw Event (no kind of configuration will be performed, e.g. changing room size. This means Room Setting will be the complete GM defaults);
Hint: resize the application surface or enable views for the size you want, disabling the application_surface (look at the Pushy example for the second version).I'm actually having trouble figuring out how to do it correctly... If I change the room size and use window_set_size(800, 608), the window gets changed to the correct dimensions, but the game is super burry. I have interpolation set to off already, I don't know what to do to fix it. Maybe I can just change the room_speed and let the dimensions be the default
NOTE: I will be compiling the game with GM:S version 1.4.1757, so make sure your script works in this version!
Ah, I see. The window dimensions get changed but the dimensions of the application surface stay the same. Good to know!resize the application surface
Well, I can't give you much more help / time, there are three entries to recompile before yours (recompiling doesn't take that long) so either cope with just changing the room_speed or do it in the next minutesAh, I see. The window dimensions get changed but the dimensions of the application surface stay the same. Good to know!
However, I have moved some things around and still no luck. I resize the game window, and then the application_surface to 800x608. Then I exit the script for that frame to allow the changes to take place. When the next frame loads the game draws things perfectly fine, but any sprites that I have created are super blurry. I can't figure out how to fix it :/
texture_set_interpolation(false);
NOTE: I will be compiling the game with GM:S version 1.4.1757, so make sure your script works in this version!