Jump to content


Flaming Penguins

Member Since 17 Dec 2005
Offline Last Active Apr 11 2013 05:54 AM

Posts I've Made

In Topic: Loading a .TXT file to an array [SOLVED]

19 August 2012 - 07:03 PM

Is the map height and width the same for all map files?

You could just use the "file_text_eoln/eof" commands. This would allow that map to be any size and not need a preset size.

I'm planning for all my maps to be the same size, but I'll definitely keep this in mind.

Read strings and process them, instead of reading reals. For each string read, file_text_readln() to get to the next line. For getting a one-line string into your array, you can use a combination of real() and string_char_at().

Thank you, this works much better! (read: at all) Now I'm faced with a different problem. There is a column of zeroes inserted on the left of the array (map[0,X]). Is this something to do with newlines, maybe? /shrug


if file_exists("map.txt"){

    var nFile;
    var nString;
    
    nFile = file_text_open_read("map.txt");
    
    for (i = 0; i < MAP_HEIGHT; i += 1){
        
        nString = file_text_read_string(nFile);
        
        for (n = 0; n < MAP_WIDTH; n += 1){
        
            map[n,i] = real(string_char_at(nString,n));

        }
        
        file_text_readln(nFile);
    }
    
file_text_close(nFile);

}



EDIT- Awesome, got it! I changed:

map[n,i] = real(string_char_at(nString,n));

to:

map[n,i] = real(string_char_at(nString,n+1));

Thanks again!

In Topic: FSM Question

28 February 2011 - 04:52 AM

Aights, I actually tried it out, and it seems to do the job not bad. Many thanks, good sir.

In Topic: Death Worm - V1.04 (final)

11 March 2007 - 09:36 PM

My highscore so far is 4199 and I've consumed 607 animals. Do I win? =P
I absolutely love this game -It's about the only gm game I actually play regularly- but I agree that more stuff should've happened after 2000. Might I suggest a mass-bombing with those underground bombs (preferably something else though, as you can dodge those bombs by going under them) that forces you to jump up out of the ground. Besides that, however, I must admit I have no suggestions.
Also, although you probably won't know what I'm talking about here, I think it would be cool to have a Dune version, where the planes are Atreides ornithopters, the tanks are harvesters or somesuch, the soldiers are Fremen, and the worm is a Sandworm (obviously).
And lastly, I agree that this game could make some money, but I'd prefer if it had more material past the aliens. And it would be nice to have more worm-health-things. Perhaps they could appear more often when your lower on health?
Anyway, 9.2/10! :)

Edit- Oh, and after a certain point, you could stop adding new stuff and just somehow program it to, say, drop more and more bombs to automatically increase the difficulty over time.

In Topic: Venomx Rts Engine ! "10/10"

07 March 2007 - 06:46 AM

Tried creating a turret next to the enemy base:

ERROR in
action number 1
of Step Event
for object maingunt:

Error in code at line 6:

if (distance_to_object(object) < 500) and can_fire = true{

at position 44: Unknown variable can_fire


------------------(Clicked "Ignore")---------------------

ERROR in
action number 1
of Draw Event
for object maingunt:

Error in code at line 30:

draw_sprite_ext(gtmainshad,-2,x-0,y+2,1,1,point_direction(x,y,xt,yt),c_white,1);

at position 65: Unknown variable xt


The game itself was great, btw. :D

In Topic: Gmphysics - Version 5 Prebeta Released

28 December 2006 - 03:07 AM

Is there a version of this as a .exe I can get to just play around with?

Seconded.