ENIGMA Progress Report

Posted by JoshDreamland on Jan. 6, 2008, 3:09 p.m.

Didn't think I gave up JUST yet, did you?

Hell no. ENIGMA's still going.

I NEED SOME TEAM MEMBERS. IS THAT UNDERSTOOD?

I need some people who are skilled with C++ to GIVE ME A FUCKING HAND WITH THIS PROJECT.

I CAN _*NOT*_ DO IT ALONE. OK?

If you have ANY talent that you think would benefit ENIGMA, please speak up.

Anyway, onto progress.

I never updated you guys on my last big creations, so you are in for a hell of a surprise, I think.

As you may have noticed, 64D has no parser. Deal with it for me, and click these links yourself. I'm hoping the parser will be back up soon. JUST DO IT.

Not Very Interactive Game

That's mostly a show of power. In case you can't or would rather not download, that shows 3000 triangles forming a lava flow, with something or other moving under it.

Feel free to edit the sprite, just DON'T RUN THE GAME WITHOUT UNZIPPING.

I'll fix the bug involved later. For now, just unzip it.

So Josh, what's the code behind that?

Here you go. Don't run it in GM or it'll freeze your whole system.

Create event:

[pre]

for (i=0; i<PCOUNT; i+=1)

{

prcolor=make_color_rgb(255,random_integer(255),0);

prx=room_width/2+random(128)-64;

pry=-random(520);

prdir=random_integer(360);

}

proto_object.x=64;

proto_object.hspeed=1;

[/pre]

Draw event:

[pre]

for (i=0; i<PCOUNT; i+=1)

{

draw_set_color(prcolor);

draw_set_alpha(.5);

draw_primitive_begin(pr_trianglestrip);

draw_vertex(prx+8,pry/*,c_red,.5*/);

draw_vertex(prx,pry+16/*,c_green,.5*/);

draw_vertex(prx+16,pry+16/*,c_blue,.5*/);

draw_primitive_end();

pry+=8;

dist=point_distance(prx,pry,proto_object.x,312);

if (dist<64 && pry<312)

{

dirt=point_direction(proto_object.x,312,prx,pry);

dirt+=(dirt-90)/12;

prx=proto_object.x+lengthdir_x(min(64,dist*2),dirt);

pry=312+lengthdir_y(min(64,dist*2),dirt);

}

if (pry>room_height)

{

prx=room_width/2+random(128)-64;

pry=-16-random_integer(32);

int rn=random_integer(10);

if (rn==1)

prx-=16;

else if (rn==2)

prx+=16;

}

}

dirt=point_direction(64,64,mouse_x,mouse_y);

draw_line(64,64,64+lengthdir_x(32,dirt),64+lengthdir_y(32,dirt));

draw_sprite(sprite0,0,proto_object.x,312);

proto_object.x+=proto_object.hspeed;

if (proto_object.x<64)

{

proto_object.hspeed+=.01;

if (proto_object.hspeed>1)

proto_object.hspeed=1;

}

if (proto_object.x>room_width-64)

{

proto_object.hspeed-=.01;

if (proto_object.hspeed<-1)

proto_object.hspeed=-1;

}

[/pre]

Keep in mind:

ENIGMA has random_integer() as well as casting. GM doesn't.

So, where does that put us with completed functions?

/**Bare minumum functions******************************************************

void dispstr(char* str, double value)

int show_error(ARG errortext, ARG2 fatal)

double point_direction(ARG x1,ARG2 y1,ARG3 x2,ARG4 y2)

double point_distance(ARG x1, ARG2 y1, ARG3 x2, ARG4 y2)

******************************************************************************/

/**Standard drawing functions**************************************************

c_aqua, c_black, c_blue, c_dkgray, c_fuchsia, c_gray, c_green,

c_lime, c_ltgray, c_maroon, c_navy, c_olive, c_purple, c_red,

c_silver, c_teal, c_white, c_yellow

void draw_clear(ARG color)

void draw_set_color(ARG color)

void draw_set_color_rgb(ARG red, ARG2 green, ARG3 blue)

int draw_set_alpha(ARG alpha)

void draw_set_color_rgba(ARG red, ARG2 green, ARG3 blue, ARG4 alpha)

int draw_get_color()

int make_color_rgb(ARG red, ARG2 green, ARG3 blue)

int color_get_red(ARG color)

int color_get_green(ARG color)

int color_get_blue(ARG color)

******************************************************************************/

/**Standard math functions*****************************************************

double random(ARG n)

int random_set_seed(ARG seed)

int random_get_seed()

int randomize()

int random_integer(ARG x)

double abs(ARG x)

double ceil(ARG x)

double floor(ARG x)

double round(ARG x)

double sqr(ARG x)

double sqrt(ARG x)

double exp(ARG x)

double power(ARG x,ARG2 power)

double ln(ARG x)

double logn(ARG n,ARG2 x)

double log2(ARG x)

double log10(ARG x)

double sin(ARG x)

double cos(ARG x)

double tan(ARG x)

double arcsin(ARG x)

double arccos(ARG x)

double arctan(ARG x)

double arctan2(ARG y,ARG2 x)

double min(ARG value1, ARG2 value2)

double max(ARG value1, ARG2 value2)

int sign(ARG x)

double frac(ARG x)

double degtorad(ARG x)

double radtodeg(ARG x)

double lengthdir_x(ARG len,ARG2 dir)

double lengthdir_y(ARG len,ARG2 dir)

//Note:

///Both point_direction and point_distance are declared in EGMstd.h

******************************************************************************/

/**Primitive functions*****************************************************

pr_pointlist, pr_linelist, pr_linestrip, pr_trianglelist, pr_trianglestrip

pr_trianglefan, pr_lineloop, pr_quadlist, pr_quadstrip, pr_polygon

int draw_primitive_begin(ARG kind)

int draw_vertex(ARG x, ARG2 y)

int draw_vertex_color(ARG x, ARG2 y, ARG3 color, ARG4 alpha)

int draw_primitive_end()

******************************************************************************/

/**Standard drawing functions**************************************************

int draw_line(ARG x1,ARG2 y1,ARG3 x2,ARG4 y2)

int draw_line_width(ARG x1,ARG2 y1,ARG3 x2,ARG4 y2,ARG5 width)

int draw_line_color(ARG x1,ARG2 y1,ARG3 x2,ARG4 y2,ARG5 color1,ARG6 color2)

int draw_line_width_color(ARG x1,ARG2 y1,ARG3 x2,ARG4 y2,ARG5 width,ARG6 color1,ARG7 color2)

int draw_rectangle(ARG x1,ARG2 y1,ARG3 x2,ARG4 y2,ARG5 outline)

int draw_rectangle_angle(ARG x1,ARG2 y1,ARG3 x2,ARG4 y2,ARG5 outline,ARG6 angle)

int draw_rectangle_color(ARG x1,ARG2 y1,ARG3 x2,ARG4 y2,ARG5 color1,ARG6 color2,ARG7 color3,ARG8 color4,ARG9 outline)

******************************************************************************/

/**Window functions**************************************************

cr_default, cr_none, cr_arrow, cr_cross, cr_beam, cr_size_nesw, cr_size_ns, cr_size_nwse,

cr_size_we, cr_uparrow, cr_hourglass, cr_drag, cr_nodrop, cr_hsplit, cr_vsplit,

cr_multidrag, cr_sqlwait, cr_no, cr_appstart, cr_help, cr_handpoint, cr_size_all

int window_set_cursor(ARG cursor)

int fps;

int window_set_caption(ARG caption)

int window_get_x()

int window_get_y()

int window_set_position(ARG x, ARG2 y)

int window_set_visible(ARG visible)

int window_get_visible()

int window_minimize()

int window_show()

******************************************************************************/

Also: A couple of those functions are completely or semi untested, or just don't work. Those include the basic math functions such as min(), sqr(), logn(), etc. (Things that should just work), draw_rectangle_angle() (Haven't tested since I fixed some other bugs that may have led to it not working), window_set_cursor() (Glut doesn't like me for some reason there.) Window_set_visible works, but cannot be undone in the draw event for obvious reasons.

Other than that, make your own conclusions.

AND HELP ME OUT, SOMEONE. Gary and Dave can only do so much, they aren't dedicating their time to this like I have. And Dylan left me for a game. =[

END

Comments

RetroX 16 years, 3 months ago

That little test game is awesome. I wish I knew C++.

JoshDreamland 16 years, 3 months ago

You won't need to. That's the beauty of it.

RetroX 16 years, 3 months ago

When's ENIGMA going to come out? I've never heard of it until now.

gtvg 16 years, 3 months ago

That's a lot of triangles! It ran about 13 fps on my computer.

I'm glad to see you've made progress. Keep it up!

RetroX 16 years, 3 months ago

101 FPS on mine. Am I special?

JoshDreamland 16 years, 3 months ago

Graphics cards vary a lot today. It's 60 for me, which is the average I'd imagine. Kindarkous is probably using onboard, and you probably have a radeon.

ENIGMA will be out for a test run within a couple months I'd say. Especially if I can get help.

I'll need about another month to get all the basics in, and I don't know how long for the interface.

RetroX 16 years, 3 months ago

Oh, and could you do something on ENIGMA similar to GMPhysics? I bet it's too much work, but I'm just wondering.

JoshDreamland 16 years, 3 months ago

GMPhysics? That settles it, I'm contacting CoderChris.

I intend to do something like it, if Chris isn't able/willing to help.

RetroX 16 years, 3 months ago

Cool. ENIGMAPhysics would be something awesome.

sk8m8trix 16 years, 3 months ago

Ran at 120fps perfectly. I loved that effect, if I ever make a adventure platformer that would make a kickass waterfall.