Kann es sein, daß die Kollisionsabfrage noch nicht richtig funktioniert? Hab es eben auf der Plus4 World im Browser gespielt und bin bei jedem zweiten Gegner draufgegangen, auf dem ich springen wollte. Ansonsten müßte der Spielfluss ein klein wenig geschmeidiger werden, sonst aber eine super Portierung.
Beiträge von RKSoft
-
-
Cool, ein Pitfall Klon.
-
Als ich mir das Video angesehen habe, kam mir gleich mein Problem von damals in den Sinn als ich meinen Plus/4 an einem S/W Röhrenfernseher dran hatte. Dieser zeigte diese Störung ebenfalls, verschob dabei aber auch die entsprechenden Zeilen; wie eine Welle. Hatte ich irgendwann hier im F64 mal angesprochen, aber niemand reagierte darauf. Ich kann dir leider auch nicht helfen, würde mich aber freuen, wenn jemand weiß, was und woran das liegt?
-
Ich selber habe zwei 8Bitdo SNES Controller (Classic, also ohne die 2 analogen Sticks). Habe mir aber über die Amazone zwei SNES Controller mit USB Dongle gekauft um keine Kabel nutzen zu müssen. Für Systeme mit mehr als die 6 Buttons habe ich mir 2 kabelgebundene PSX Controller über die Amazone gekauft: https://www.amazon.de/USB-Game…on-Joystick/dp/B08CMWKY5W plus 2 USB Verlängerungskabel. Als System auf nutze ich RetroPie mit Emustation. Im übrigen hab ich mir im Netz ein Komplettpaket mit Emulatoren und Roms gezogen, diese drauf gepackt und erstmal bearbeitet. Ich brauche nicht jeden Müll davon.
-
Bestellung für 1x 2022 ist raus! Vielen Dank an alle Beteiligten für diese tolle Aktion!
Schließe mich ihm an. Danke und Bestellung + Bezahlung sind raus.
-
Cooles Spiel. Würde mir mehr Portierungen vom MSX zum C64 oder auch C16 gern sehen.
-
Sieht echt geil aus
-
Ist zwar nicht so ganz meine Richtung von Spielen, aber das sieht ja richtig, richtig gut aus. Bin auf das Endergebnis gespannt.
-
Mußte ja echt schmunzeln über eure Kommentare. Wieso tut ihr euch für die Story nicht einfach zusammen und einer baut nen Adventure mit Billdern von WebFritzi ? Ein Community BASIC Adventure Projekt, wäre bestimmt richtig lustig.
-
Die Grafik find ich klasse gemacht. Tolles Spiel!
-
Sieht super aus bisher. Bin ja mal gespannt darauf
-
Auch von mir einen riesigen Dank an ZeHa für das tolle Heft. Es kam gestern bei mir an. Super gemacht, wieder mal. Euch allen einen guten Rutsch ins Jahr 2022.
-
Bestellung ist raus inkl. Email. Und wieder mal ein großes Dankeschön an ZeHa für deine Mühen und an alle Einsender für ihre Programme. Ich freue mich schon darauf, in den Heft zu schmökern.
-
Ich habe selber einen 3630 und würde sowas nicht machen. Dafür ist mir der Druker zu schade für. Aber vielleicht meldet sich ja noch jemand, der sowas gemacht hat?!
-
Interessant, was man in BASIC noch so anstellen kann. Allerdings steig auch ich nicht durch den Code.
-
Sich eine 360 zu zulegen find ich persönlich schon klasse. Habe selber die alte, weiße Fatlady und eine 360E (sieht wie die erste Xbox One aus). Letztere verwende ich, wenn ich mal darauf spiele will/würde. Mittlerweile steht neben der Xbox One X auch eine Series S im Wohnzimmer, daher mußte die 360 weichen. Ist aber kein Problem, da sehr viele 360 Spiele auch auf der Xbox One/Series laufen. Siehe https://www.xbox.com/de-DE/games/backward-compatibility
Der größte Nachteil an der 360 ist der Controller. Die analogen Sticks neigen zu driften (gehen also nicht korrekt in 0 Stellung). Bei der Xbox One/Series hast du das Problem nicht, da die Deadzone höher eingestellt ist. Und gleich ein Warnung vorweg: KAUF KEINE 360 CONTROLLER VON DRITTHERSTELLERN (nur Originall von Microsoft sollte der Controller sein). Alle von mir gekauften Controller von Drittherstellern neigten zu Driften oder hatten mit den Buttons probleme. Ich habe vorletzte Woche ausgemistest und über 7 Controller weggeschmissen. Also, Finger weg von dem Billig-China-Dreck!
Übrigens, ich kaufe heute noch 360 Spiele im XBL Shop (Tomb Raider Legend und Anniversary sind derzeit im Angebot, Red Dead Redemption) und spiele sie auf der One. Ein Vorteil sind auch die wesentlich kürzeren Ladezeiten, wenn du 360 Spiele auf One/Series abspielst.
-
Mal The Dark Picuture Anthology versucht? Gibt mittlerweile 3 Teile davon, wovon ich bereits 1 und 2 durchgespielt habe. Passen genau ins Schema LiS und bieten zudem noch Horror bzw. Gruselelemente.
-
Krass, die Figur sieht ja mal richtig klasse aus.
-
Ich programmiere auch gern im DIV DX (damals DIV Games Studio für MSDOS) für Windows und finde prozedure Programmierung irgendwie besseer als objektorientierte Programmierung. Hier mal ein (sorry, etwas längeres) Tutorial von mir, wie man ein tile-basiertes Jump & Run Spiel im Stil von M*rio programmiert. Grafiken für Sprites usw. werden da aber nachgeladen.
Ansonsten würde ich mir einfach das BASIC vom 128er mit einer viel höheren Geschwindigkeit wünschen, um Actionspiele programmieren zu können.
Code- Program Jumpman;
- /*
- Code: Main
- */
- Const
- anim_max_counter = 3;
- offset_x = 2;
- offset_y = 4;
- /*
- Effect types:
- 0 - 10 Points
- 1 - 20 Points
- 2 - 50 Points
- 3 - 100 Points
- 4 - 200 Points
- 5 - 400 Points
- 6 - 800 Points
- 7 - 1000 Points
- 8 - 2000 Points
- 9 - 4000 Points
- 10 - 8000 Points
- 11 - 1UP
- 12 - Coin
- */
- EFFECT_10 = 0;
- EFFECT_20 = 1;
- EFFECT_50 = 2;
- EFFECT_100 = 3;
- EFFECT_200 = 4;
- EFFECT_400 = 5;
- EFFECT_800 = 6;
- EFFECT_1000 = 7;
- EFFECT_2000 = 8;
- EFFECT_4000 = 9;
- EFFECT_8000 = 10;
- EFFECT_1UP = 11;
- EFFECT_COIN = 12;
- /*
- ---------------------------
- CONST ONLY FOR TILEBASED MAP
- */
- MAXSPRITES = 200;
- MAXTILES = 500;
- TYLE_NONE = 0;
- TYLE_HARD = 1;
- TYLE_SOFT = 2;
- TYLE_CRASH = 3;
- /*
- ---------------------------
- */
- Global
- /*
- --------------------------------
- VARIABLES ONLY FOR TILEBASED MAP
- */
- gfx_map;
- gfx_tileset;
- map[MAXTILES, MAXTILES];
- mapsize_x = 3392;
- mapsize_y = 416;
- spritesize_x = 32;
- spritesize_y = 32;
- tilesize_x = 16;
- tilesize_y = 16;
- Struct config
- map_width;
- map_height;
- tile_width;
- tile_height;
- sprite_width;
- sprite_height;
- End
- Struct sprites[MAXSPRITES]
- no;
- x;
- y;
- procid;
- End
- /* Info:
- These values use to define collision types for every tile used on map (compare with tileset.pcx!)
- Values:
- 0 - none
- 1 - hard
- 2 - ground is hard but you can jump and walk through (means no falling!)
- 3 - crashable block
- */
- tileTyp[] =
- 2, 1, 1, 1, 1, 1, 1, 1, /* <-- tiles */
- 0, 0, 0, 0, 0, /* <-- tiles with background */
- 2, 2, 0, 0, 1, 3, 1, /* <-- ground for jumping through */
- 0, 0, 0, 0, 0, 3, 1, 0, 1, 1, /* <-- ground for jumping through */
- 1, 1, 1, 1, 1, 1, 1, 1, /* <-- ground for jumping through */
- 0, 0, 0, 0, 0, 0, 0, /* <-- background tiles */
- 1, 1, 1, 1, 2, 2, 1, 3, 1, 1, 1, 1, /* <-- hardmap with background */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* <-- Castle Background */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* <-- Castle Background */
- 0, 0, 0, 0, 0, 0, 0; /* <-- Castle Background */
- /*
- --------------------------------
- */
- anim_count;
- file_enemies;
- file_effects;
- file_extras;
- file_font8x8w;
- file_font8x16w;
- file_player;
- font_coins;
- font_gamestatus;
- font_level;
- font_lives;
- font_score;
- font_time;
- font_world;
- game;
- gfx_background;
- gfx_title;
- program_continue = false;
- time_count;
- /*
- Global player vars
- */
- player_coins;
- player_dead;
- player_jump = false;
- player_jump_clean_flag = false;
- player_jump_offset;
- player_jump_power;
- player_level;
- player_lives;
- player_score;
- player_time;
- player_win;
- player_world;
- player_x;
- player_xm;
- player_y;
- player_ym;
- /*
- End of: Global player vars
- */
- Local
- goomba_dead;
- koopa_dead;
- temp;
- temp1;
- temp2;
- temp3;
- xm;
- ym;
- Begin
- set_mode(m320x200); set_fps(30, 2);
- file_enemies = load_fpg("enemies.fpg");
- file_effects = load_fpg("effects.fpg");
- file_extras = load_fpg("extras.fpg");
- file_player = load_fpg("player.fpg");
- file_font8x8w = load_fnt("smb8x8w.fnt");
- file_font8x16w = load_fnt("smb8x16w.fnt");
- gfx_title = load_map("title.pcx");
- animcounter();
- Loop
- /*
- Code: Title
- */
- game = false;
- player_dead = false; player_win = false; program_continue = false; setup_level(0); While (NOT program_continue); Frame; End
- x = 160; y = 100; file = 0; graph = gfx_title; fade_on();
- Loop
- If (key(_esc)) exit("Jumpman quits here!", 1); End
- If (key(_space)) player_dead = true; program_continue = false; Break; End
- Frame;
- End
- While (!program_continue); Frame; End
- fade_off(); Frame(3000); stop_scroll(0);
- /*
- Code: Initial the game
- */
- player_coins = 0; player_level = 1; player_lives = 4; player_score = 0; player_world = 1;
- font_score = write_int(file_font8x8w, 76, 15, 2, &player_score); font_lives = write_int(file_font8x8w, 96, 7, 1, &player_lives);
- font_coins = write_int(file_font8x8w, 144, 15, 2, &player_coins); font_world = write_int(file_font8x8w, 196, 15, 0, &player_world);
- font_level = write_int(file_font8x8w, 212, 15, 0, &player_level); font_time = write_int(file_font8x8w, 276, 15, 1, &player_time);
- /*
- Code: Game
- */
- Loop
- player_dead = false; player_win = false; program_continue = false; setup_level(player_level); While (!program_continue); Frame; End
- file = file_extras; graph = 1; x = 0; y = 0; time_count = 0; fade_on();
- While (game)
- time_count ++; if (time_count > 25) time_count = 0; player_time --; If (player_time < 1) player_dead = true; program_continue = false; Break; End; End
- If (key(_esc)) player_dead = true; program_continue = false; Break; End
- Frame;
- End
- While (!program_continue); Frame; End
- If (player_dead)
- player_lives --;
- If (player_lives < 0)
- font_gamestatus = write(file_font8x16w, 160, 100, 1, "game over"); Frame(10000); fade_off(); Frame(2000); delete_text(font_gamestatus);
- Break;
- End
- End
- fade_off(); Frame(2000); stop_scroll(0);
- End
- /*
- Code: Uninitial the game
- */
- delete_text(font_coins); delete_text(font_level); delete_text(font_lives); delete_text(font_score); delete_text(font_time); delete_text(font_world);
- graph = 0; Frame;
- End
- End
- Process animcounter()
- Begin
- Loop
- anim_count ++; If (anim_count > anim_max_counter + 3) anim_count = 0; End
- Frame;
- End
- End
- /*
- End of: Main
- */
- /*
- Code: Title
- */
- Process title()
- Private
- scrollbg;
- Begin
- While (!program_continue); Frame; End
- ctype = c_scroll; file = 0; graph = 0; x = 160; y = 0; z = -999;
- scroll[0].x0 = 0; scroll[0].y0 = 0; scroll[0].x1 = 0; scroll[0].y1 = 0; xm = 1;
- Repeat
- If (x + xm < 160 OR x + xm > mapsize_x - 160) xm = -xm; End
- If (x + xm > 160 && x + xm < mapsize_x - 160) scroll[0].x0 += xm; scrollbg++; If (scrollbg > 1) scrollbg = 0; scroll.x1 += xm; End; End
- x += xm; Frame;
- Until (!game OR player_dead)
- program_continue = true; game = false;
- End
- /*
- End of: Title
- */
- /*
- Process: Player
- */
- Process player(x, y)
- Private
- animcount = 1;
- animcountcount = 0;
- offset_x_multiplicator = 1;
- player_duck = false;
- player_sizeX;
- player_sizeY;
- running = false;
- stop = false;
- Begin
- While (!program_continue); Frame; End
- ctype = c_scroll; file = file_player; graph = 1; z = -1;
- If (x > mapsize_x / 2) scroll[0].x0 = mapsize_x - 120; Else scroll[0].x0 = 0; End
- scroll[0].y0 = 0; scroll[0].x1 = scroll[0].x0; scroll[0].y1 = scroll[0].y0;
- player_jump = false; player_jump_clean_flag = false; player_jump_offset = 0; player_jump_power = 0;
- player_sizeX = 10; player_sizeY = 20; player_x = x; player_xm = 0; player_y = y; player_ym = 0;
- Repeat
- x = player_x; y = player_y; player_duck = false;
- /* Code: Controls
- - Key left Shift = running
- - Key Left = move left
- - Key Right = move right
- - Key Up = jump
- - Key Down = duck
- */
- If (key(_l_shift)) running = true; offset_x_multiplicator = 2; Else running = false; offset_x_multiplicator = 1; End
- If (key(_up))
- If (!player_jump && !player_jump_clean_flag)
- From temp = -4 To 4;
- If (GetTileTyp(x + temp, y + 1) != TYLE_NONE) player_jump = true: player_jump_offset = 0; player_jump_power = 0; player_jump_clean_flag = true; Break; End
- End
- End
- If (player_jump) player_jump_power ++; if (player_jump_power > 16) player_jump_power = 8; End; End
- Else
- player_jump_clean_flag = false;
- If (key(_down)) player_duck = true; End
- End
- If (key(_left))
- flags = 1; player_xm --: if (player_xm < -(offset_x * offset_x_multiplicator)) player_xm = -(offset_x * offset_x_multiplicator); end
- Else
- If (key(_right))
- flags = 0; player_xm ++: If (player_xm > (offset_x * offset_x_multiplicator)) player_xm = (offset_x * offset_x_multiplicator); End
- Else
- If (player_xm > 0) player_xm --; Else If (player_xm < 0) player_xm ++; End; End
- End
- End
- /*
- End of: Controls
- */
- /* Code: Jumping or Falling
- - jumping
- - falling
- */
- If (player_jump)
- player_ym --: If (player_ym < -offset_y) player_ym = -offset_y; End
- player_jump_offset ++; If (player_jump_offset > player_jump_power) player_jump = false; End
- Else
- player_ym ++; If (player_ym > offset_y + 1) player_ym = offset_y + 1; End
- End
- /*
- End of: Jumping or Falling
- */
- /* Code: Collisions
- - left
- - right
- - up
- - down
- */
- If (player_xm < 0)
- temp = 1;
- While (temp < player_sizeY)
- temp2 = 0;
- While (temp2 > player_xm)
- If (GetTileTyp(x - player_sizeX + temp2, y - temp) == TYLE_HARD) stop = true; Break; End
- If (GetTileTyp(x - player_sizeX + temp2, y - temp) == TYLE_CRASH) stop = true; Break; End
- temp2 --;
- End
- temp ++;
- if (stop) stop = false; Break; End
- End
- player_xm = temp2;
- Else
- if (player_xm > 0)
- temp = 1;
- While (temp < player_sizeY)
- temp2 = 0;
- While (temp2 < player_xm)
- If (GetTileTyp(x + player_sizeX + temp2, y - temp) == TYLE_HARD) stop = true; Break; End
- If (GetTileTyp(x + player_sizeX + temp2, y - temp) == TYLE_CRASH) stop = true; Break; End
- temp2 ++;
- End
- temp ++;
- if (stop) stop = false; Break; End
- End
- player_xm = temp2;
- End
- End
- If (player_ym < 0)
- temp = -(player_sizeX / 2);
- While (temp < (player_sizeX / 2))
- temp2 = 0;
- While (temp2 > player_ym)
- If (GetTileTyp(x + player_xm + temp, y + temp2 - player_sizeY) == TYLE_HARD) stop = true; Break; End
- If (GetTileTyp(x + player_xm + temp, y + temp2 - player_sizeY) == TYLE_CRASH) stop = true; Break; End
- temp2 --;
- End
- If (stop) stop = false; Break; End
- temp ++;
- End
- player_ym = temp2;
- Else
- If (player_ym > 0)
- temp = -(player_sizeX / 2);
- While (temp < (player_sizeX / 2))
- temp2 = 0;
- While (temp2 < player_ym)
- If (GetTileTyp(x + player_xm + temp, y + temp2) != TYLE_NONE) stop =true; Break; End
- temp2 ++;
- End
- If (stop) stop = false; Break; End
- temp ++;
- End
- player_ym = temp2;
- End
- End
- /*
- * End of: Collisions
- */
- /* Code: Graphics
- - player sprite
- - scrolling
- */
- If (x + player_xm < 10 OR x + player_xm + player_sizeX > mapsize_x) player_xm = 0; End
- If (player_xm <> 0)
- If (running)
- animcountcount ++; If (animcountcount > 1) animcountcount = 0; animcount ++; if (animcount > 2) animcount = 1; End; End
- graph = 8 + animcount;
- Else
- animcountcount ++; If (animcountcount > 2) animcountcount = 0; animcount ++; if (animcount > 3) animcount = 1; End; End
- graph = animcount;
- End
- Else
- From temp = -6 To 6; If (GetTileTyp(x + player_xm + temp, y + player_ym + 1) != TYLE_NONE) graph = 1; End; End
- If (player_duck && !player_ym) graph = 7; End
- End
- If (player_ym < 0) graph = 5; If (running) graph = 11; End; End
- If (player_ym > 0) graph = 6; End
- If (x + player_xm > 120 && x + player_xm < mapsize_x - 120) scroll[0].x0 += player_xm; scroll.x1 += (player_xm / 2); End
- x += player_xm; y += player_ym; Frame; player_x = x; player_y = y;
- /*
- End of: Graphics
- */
- Until (!game OR player_dead OR player_win)
- If (player_dead) death_animation(x, y, file, 14, true); Return; End
- If (player_win) Return; End
- program_continue = true; game = false;
- End
- Process player_wins(x, y)
- Private
- animcount = 1;
- animcountcount;
- Begin
- If (!game) Return; End
- ctype = c_scroll; file = file_player; graph = 8; z = -999;
- ym = 1;
- Repeat
- ym ++; if (ym > offset_y + 1) ym = offset_y + 1; End
- If (ym > 0)
- temp = 0;
- While (temp < ym)
- If (GetTileTyp(x, y + temp) != TYLE_NONE) ym = temp; Break; End
- temp ++;
- End
- End
- y += ym; Frame;
- Until (ym == 0 OR y - scroll[0].y0 > 240)
- xm = offset_x; flags = 0;
- From temp1 = 0 to 30;
- ym ++; if (ym > offset_y + 1) ym = offset_y + 1; End
- If (ym > 0)
- temp = 0;
- While (temp < ym)
- If (GetTileTyp(x, y + temp) != TYLE_NONE) ym = temp; Break; End
- temp ++;
- End
- End
- y += ym;
- animcountcount ++; If (animcountcount > 2) animcountcount = 0; animcount ++; If (animcount > 3) animcount = 1; End; End
- if (x + 32 < mapsize_x) xm ++: if (xm > offset_x) xm = offset_x; End; End
- x += xm; graph = animcount; Frame;
- End
- graph = 12; Frame(2000); graph = 13; Frame(4000); program_continue = true; game = false;
- xm = offset_x; flags = 0; fade_off();
- From temp = 0 to 10;
- animcountcount ++; If (animcountcount > 2) animcountcount = 0; animcount ++; If (animcount > 3) animcount = 1; End; End
- if (x + 32 < mapsize_x) xm ++: if (xm > offset_x) xm = offset_x; End; End
- x += xm; graph = animcount; Frame;
- End
- End
- /*
- End of: Player
- */
- /* Player Functions:
- ChangePlayerCoins(x, y, coins)
- */
- Function ChangePlayerCoins(x, y, coins)
- Begin
- player_score += 10 * coins; player_coins += coins;
- If (player_coins > 99) player_coins = 0; player_lives ++; If (player_lives > 99) player_lives = 99; End; End
- effects(x + 8, y, EFFECT_COIN); Return;
- End
- /* -------------------------------------------------------------------------------------------------------- */
- /* -------------------------------------------------------------------------------------------------------- */
- /* Enemies:
- goomba(x, y)
- koopa(x, y)
- */
- Process goomba(x, y)
- Private
- oldpos_x;
- oldpos_y;
- stop = false;
- Begin
- While (!program_continue); Frame; End
- ctype = c_scroll; file = file_enemies; graph = 1; oldpos_x = x; oldpos_y = y; z = 1;
- goomba_dead = false;
- Loop
- /* Note: Wait till sprite is near the scrolling window! */
- Repeat
- If (!game) Return; End
- Frame;
- Until ((scroll[0].x0 + 320 + 64 > x && scroll[0].x0 < x) OR (scroll[0].x0 > x && scroll[0].x0 - 64 < x))
- If (x > scroll[0].x0) xm = -1; Else xm = 1; End
- /* Note: Main code */
- Loop
- /* Code: Collisions
- - left
- - right
- - down
- - player
- - other enemies
- */
- If (GetTileTyp(x + (xm * 8), y - 8) == TYLE_HARD) xm = -xm; End
- ym ++; If (ym > offset_y + 1) ym = offset_y + 1; End
- If (ym > 0)
- From temp = -4 to 4;
- temp2 = 0;
- While (temp2 < ym)
- If (GetTileTyp(x + xm + temp, y + temp2) != TYLE_NONE) stop = true; Break; End
- temp2 ++;
- End
- If (stop) stop = false; Break; End
- End
- ym = temp2;
- End
- If (collision(type player) && !player_dead)
- If (player_y < y - 10)
- player_score += 10; effects(x, y - 16, EFFECT_10);
- player_jump = true; player_jump_offset = 0; player_jump_power = 4; player_ym = -offset_y;
- goomba_dead = true;
- Else
- player_dead = true; program_continue = false;
- End
- End
- If (collision(Type goomba) OR collision(Type koopa)) xm = -xm; End
- /*
- End of: Collisions
- */
- If (x + xm < 16 OR x + xm > mapsize_x - 16) xm = -xm; End
- If (anim_count == 0) If (graph == 1) graph = 2; Else graph = 1; End; End
- If (xm > 0) flags = 1; Else flags = 0; End
- x += xm; y += ym; Frame;
- If (goomba_dead) death_animation(x, y, file, graph, false); Return; End
- If (!game) Return; End
- If (x < scroll[0].x0 - 128) Break; End
- If (y > scroll[0].y0 + 232) Break; End
- End
- /* Note: Wait till (start pos) sprite is right away from the scrolling window! */
- x = -128; y = -128;
- Repeat
- If (!game) Return; End
- Frame;
- Until (oldpos_x < scroll[0].x0 -64 or oldpos_x > scroll[0].x0 + 320 + 64)
- x = oldpos_x; y = oldpos_y;
- End
- End
- Process koopa(x, y)
- Private
- oldpos_x;
- oldpos_y;
- reverse;
- stop;
- Begin
- While (!program_continue); Frame; End
- ctype = c_scroll; file = file_enemies; graph = 4; oldpos_x = x; oldpos_y = y; z = 1;
- koopa_dead = false;
- Loop
- /* Note: Wait till sprite is near the scrolling window! */
- Repeat
- If (not game) Return; End
- Frame;
- Until (scroll[0].x0 + 320 + 32 < oldpos_x OR scroll[0].x0 + 320 + 320 + 32 > oldpos_x)
- If (x < scroll[0]) xm = -1; Else xm = 1; End
- /* Note: Main code */
- Loop
- /* Code: Collisions
- - left / right
- - down
- - player
- - other enemies
- */
- If (GetTileTyp(x + (xm * 16), y - 8) == TYLE_HARD) xm = -xm; graph = 6; Frame(500); End
- ym ++; If (ym > offset_y + 1) ym = offset_y + 1; End
- if (ym > 0)
- From temp = -4 to 4;
- temp2 = 0;
- While (temp2 < ym)
- If (GetTileTyp(x + xm + temp, y + temp2) != TYLE_NONE) stop = true; Break; End
- temp2 ++;
- End
- If (stop) stop = false; Break; End
- End
- ym = temp2;
- End
- If (collision(type player) && !player_dead)
- If (player_y < y - 10)
- player_score += 10; effects(x, y - 16, EFFECT_10);
- player_jump = true; player_jump_offset = 0; player_jump_power = 4; player_ym = -offset_y;
- koopa_dead = true;
- Else
- player_dead = true; program_continue = false;
- End
- End
- temp = collision(Type goomba); if (temp) reverse = true; xm = -xm; graph = 6; Frame(500); temp.xm = -temp.xm; End
- temp = collision(Type koopa); if (temp) reverse = true; xm = -xm; graph = 6; Frame(500); temp.xm = -temp.xm; End
- /*
- End of: Collisions
- */
- If (x + xm < 16 or x + xm > mapsize_x - 16) xm = -xm; graph = 6; Frame(500); End
- If (xm < 0) flags = 0; Else flags = 1; End
- If (anim_count == 0) if (graph == 4) graph = 5; Else graph = 4; End; End
- x += xm; y += ym; Frame;
- If (koopa_dead) death_animation(x, y, file, 7, false); Return; End
- If (!game) Return; End
- If (x < scroll[0].x0 - 128) Break; End
- If (y > scroll[0].y0 + 232) Break; End
- End
- /* Note: Wait till (start pos) sprite is right away from the scrolling window! */
- x = -128; y = -128;
- Repeat
- If (!game) Return; End
- Frame;
- Until (scroll[0].x0 + 320 + 32 < oldpos_x or scroll[0].x0 + 320 + 320 + 32 > oldpos_x)
- Repeat
- If (!game) Return; End
- Frame;
- Until (scroll[0].x0 > oldpos_x and scroll[0].x0 + 320 < oldpos_x)
- x = oldpos_x; y = oldpos_y;
- End
- End
- /* -------------------------------------------------------------------------------------------------------- */
- /*
- Processes:
- block_coin(x, y, typ)
- block_crash(x, y, typ)
- coin(x, y)
- death_animation(x, y, file, graph, gamquit)
- deepwater(x, y)
- effects(x, y, typ)
- final(x, y)
- setup_level(stage)
- water(x, y)
- */
- Process block_coin(x, y, typ)
- /* Info:
- Coin Block with 1xCoin = 0
- Coin Block with 10xCoin = 1
- */
- Private
- count;
- tile;
- Begin
- While (!program_continue); Frame; End
- ctype = c_scroll; z = 0; file = file_extras; graph = 6; If (typ == 1) count = 10; Else count = 1; End
- tile = GetTile(x, y);
- Repeat
- If (anim_count == 0) graph ++; If (graph > 9) graph = 6; End; End
- If (collision(type player) && player_x > x - 4 && player_x < x + 20 && player_y > y + 2)
- player_jump = false; player_jump_offset = 0; player_jump_power = 0; player_ym = 0;
- ChangeTile(x, y, 0, true); refresh_scroll(0);
- From temp = 0 To 3; y -= 2;
- temp2 = collision(Type goomba); If (temp2) temp2.goomba_dead = true; End
- temp2 = collision(Type koopa); If (temp2) temp2.koopa_dead = true; End
- Frame;
- End
- count --; ChangePlayerCoins(x, y - 8, 1);
- From temp = 0 To 3; y += 2; Frame; End; ChangeTile(x, y, tile, true); refresh_scroll(0);
- End
- Frame;
- Until (!game OR count < 1)
- End
- Process block_crash(x, y, typ)
- /* Info:
- Crash Block = 0
- Crash Block with 1xCoin = 1
- Crash Block with 10xCoin = 2
- */
- Private
- count;
- tile;
- Begin
- While (NOT program_continue); Frame; End
- ctype = c_scroll; z = 0; file = file_extras; graph = 10; If (typ == 2) count = 10; Else count = 1; End
- tile = GetTile(x, y) - 1;
- Repeat
- If (anim_count == 0) graph ++; If (graph > 13) graph = 10; End; End
- If (collision(type player) && player_x > x - 4 && player_x < x + 20 && player_y > y + 2)
- player_jump = false; player_jump_offset = 0; player_jump_power = 0; player_ym = 0;
- ChangeTile(x, y, 0, true); refresh_scroll(0);
- From temp = 0 To 3; y -= 2;
- temp2 = collision(Type goomba); If (temp2) temp2.goomba_dead = true; End
- temp2 = collision(Type koopa); If (temp2) temp2.koopa_dead = true; End
- Frame;
- End
- if (typ > 0) count --; ChangePlayerCoins(x, y - 8, 1); End
- From temp = 0 To 3; y += 2; Frame; End
- If (typ > 0 && count < 1) ChangeTile(x, y, tile, true); refresh_scroll(0); End
- End
- Frame;
- Until (!game OR count < 1)
- End
- Process coin(x, y)
- Begin
- While (!program_continue); Frame; End
- ctype = c_scroll; z = 0; file = file_extras; graph = 2;
- Repeat
- If (anim_count == 0) graph ++; If (graph > 5) graph = 2; End; End
- If (collision(type player)) ChangePlayerCoins(x, y, 10); Return; End
- Frame;
- Until (!game)
- End
- Process death_animation(x, y, file, graph, gamequit)
- Begin
- If (!game) Return; End
- ctype = c_scroll; z = -999;
- From temp = 0 To 6;
- ym -- ; If (ym < -offset_y) ym = -offset_y; End
- y += ym; Frame;
- End
- Repeat
- ym ++; If (ym > offset_y + 1) ym = offset_y + 1; End
- y += ym; Frame;
- Until (y - scroll[0].y0 > 264)
- If (gamequit) program_continue = true; game = false; End
- End
- Process deepwater(x, y)
- Begin
- While (!program_continue); Frame; End
- ctype = c_scroll; file = file_enemies; graph = 12; z = -900;
- Repeat
- If (collision(type player) && !player_dead) player_dead = true; program_continue = false; End
- Frame;
- Until (!game)
- End
- Process effects(x, y, typ)
- Begin
- If (!game) Return; End
- While (!program_continue); Frame; End
- ctype = c_scroll; z = -9999;
- Switch (typ)
- Case EFFECT_20: file = file_effects; graph = 2; From temp = 0 To 10; y --; Frame; End; Frame(2000); End
- Case EFFECT_50: file = file_effects; graph = 3; From temp = 0 To 10; y --; Frame; End; Frame(2000); End
- Case EFFECT_100: file = file_effects; graph = 4; From temp = 0 To 10; y --; Frame; End; Frame(2000); End
- Case EFFECT_200: file = file_effects; graph = 5; From temp = 0 To 10; y --; Frame; End; Frame(2000); End
- Case EFFECT_400: file = file_effects; graph = 6; From temp = 0 To 10; y --; Frame; End; Frame(2000); End
- Case EFFECT_800: file = file_effects; graph = 7; From temp = 0 To 10; y --; Frame; End; Frame(2000); End
- Case EFFECT_1000: file = file_effects; graph = 8; From temp = 0 To 10; y --; Frame; End; Frame(2000); End
- Case EFFECT_2000: file = file_effects; graph = 9; From temp = 0 To 10; y --; Frame; End; Frame(2000); End
- Case EFFECT_4000: file = file_effects; graph = 10; From temp = 0 To 10; y --; Frame; End; Frame(2000); End
- Case EFFECT_8000: file = file_effects; graph = 11; From temp = 0 To 10; y --; Frame; End; Frame(2000); End
- Case EFFECT_1UP: file = file_effects; graph = 12; From temp = 0 To 10; y --; Frame; End; Frame(2000); End
- Case EFFECT_COIN: file = file_extras; graph = 2; From temp = 0 To 10; y --; Frame; if (anim_count == 0) graph ++; if (graph > 5) graph = 2; End; End; End; effects(x, y, EFFECT_10); End
- Default: file = file_effects; graph = 1; From temp = 0 To 10; y --; Frame; End; Frame(2000); End
- End
- End
- Process final(x, y)
- Begin
- While (!program_continue); Frame; End
- ctype = c_scroll; z = 0; file = file_extras; graph = 14;
- Repeat;
- If (collision(type player) && !player_dead) player_win = true; player_wins(x - 2, player_y); End
- Frame;
- Until (!game)
- End
- Process setup_level(stage)
- Begin
- unload_map(gfx_background);
- If (!gfx_tileset) gfx_tileset = load_map("tileset.pcx"); End
- /* set up map & create scrolling window */
- Switch (stage)
- Case 1: /* Level 1 */
- If (!LoadMap(stage)) exit("Level not found!", 0); End
- gfx_background = load_map("hills.pcx"); start_scroll(0, 0, gfx_map, gfx_background, 0, 4);
- /*----------------------------------------*/
- End
- Default: /* Titlescreen */
- If (!LoadMap(1)) exit("Level not found!", 0); End
- gfx_background = load_map("hills.pcx"); start_scroll(0, 0, gfx_map, gfx_background, 0, 4); title();
- /*----------------------------------------*/
- End
- End
- /* put sprites on map */
- temp = 0; While (temp < maxSprites)
- Switch (sprites[temp].no - 1)
- Case 0; if (stage > 0) player(sprites[temp].x + 16, sprites[temp].y + 32); End; End
- Case 1; goomba(sprites[temp].x, sprites[temp].y + 31); End
- Case 2; koopa(sprites[temp].x, sprites[temp].y); End
- Case 3; coin(sprites[temp].x, sprites[temp].y); End
- Case 4; block_coin(sprites[temp].x, sprites[temp].y, 0); End
- Case 5; block_crash(sprites[temp].x, sprites[temp].y, 0); End
- Case 6; final(sprites[temp].x + 8, sprites[temp].y - 44); End
- Case 7; water(sprites[temp].x + 16, sprites[temp].y + 32); End
- Case 8; deepwater(sprites[temp].x + 16, sprites[temp].y + 32); End
- End
- temp ++;
- End
- player_time = 399; game = true; program_continue = true;
- End
- Process water(x, y)
- Begin
- While (!program_continue); Frame; End
- ctype = c_scroll; file = file_enemies; graph = 8; z = -900;
- Repeat
- If (anim_count == 0) graph ++; if (graph > 11) graph = 8; End; End
- If (collision(type player) && !player_dead) player_dead = true; program_continue = false; End
- Frame;
- Until (!game)
- End
- /*
- End of: Processes
- */
- /*
- Info: Usefull tilebased functions
- ChangeTile(x, y, no, only_visibility)
- CreateMap()
- GetTile(x, y)
- GetTileTyp(x, y)
- LoadMap(lvl)
- ResetMap()
- */
- Function ChangeTile(x, y, no, only_visibility)
- Begin
- /* Info:
- - calculate the tile coordinate from x and y - check its values are valid
- - if changes make on map, too! (not only visibility - see coin blocks for moving animation)
- - if tile number to set is 0, it deletes the 16x16 block from screen
- - if tile number isn't 0, it copies the 16x16 tile from gfx_tiles into the (DIV DX) map gfx_map
- */
- If (x < 0 OR x > mapsize_x OR y < 0 OR y > mapsize_y OR no < 0 OR no > SIZEOF(tileTyp)) Return(0); End
- x = x / tilesize_x; y = y / tilesize_y;
- if (!only_visibility) map[x, y] = no; End
- If (no == 0)
- temp = 0; While (temp < tilesize_x)
- temp1 = 0; While (temp1 < tilesize_y)
- map_put_pixel(0, gfx_map, (x * tilesize_x) + temp, (y * tilesize_y) + temp1, 0);
- temp1 ++;
- End
- temp ++;
- End
- Else
- map_block_copy(0, gfx_map, (x * tilesize_x), (y * tilesize_y), gfx_tileset, (no - 1) * tilesize_x, 0, tilesize_x, tilesize_y);
- End
- Return(1);
- End
- Function CreateMap()
- Begin
- /* Info:
- - create new (DIV DX) map with the size of mapSizeX & mapSizeY
- - put tiles on (DIV DX) map with map_block_copy
- */
- gfx_map = new_map(mapsize_x, mapsize_y, 0, 0, 0);
- temp = 0;
- While (temp < MAXTILES)
- temp1 = 0;
- While (temp1 < MAXTILES)
- temp2 = map[temp, temp1] - 1; x = temp * tilesize_x; y = temp1 * tilesize_y;
- If (temp2 < 0 or x < 0 or x > mapsize_x or y < 0 or y > mapsize_y) temp1 ++; Continue; End
- If (temp2 == 18 or temp2 == 25)
- block_crash(x, y, 0);
- map_block_copy(0, gfx_map, x, y, gfx_tileset, ((temp2 - 1) * tilesize_x), 0, tilesize_x, tilesize_y);
- Else map_block_copy(0, gfx_map, x, y, gfx_tileset, (temp2 * tilesize_x), 0, tilesize_x, tilesize_y); End
- temp1 ++;
- End
- temp ++;
- End
- save_pcx(0, gfx_map, "test.pcx");
- Return(1);
- End
- Function GetTile(x, y)
- Begin
- If (x < 0 OR x > mapsize_x OR y < 0 OR y > mapsize_y) Return(0); End
- x = x / tilesize_x; y = y / tilesize_y; Return(map[x, y]);
- End
- Function GetTileTyp(x, y)
- Begin
- If (x < 0 OR x > mapsize_x OR y < 0 OR y > mapsize_y) Return(TYLE_NONE); End
- x = x / tilesize_x; y = y / tilesize_y; If (map[x, y] < 1 or map[x, y] > sizeof(tiletyp)) Return(TYLE_NONE); End
- temp = map[x, y] - 1; Return (tiletyp[temp]);
- End
- Function LoadMap(lvl)
- Private
- file_handle;
- fname;
- Begin
- /* Info:
- - clear map
- - check if map file exists
- - check if sprite file exists
- - load map and sprites
- */
- ResetMap();
- fname = itoa(lvl);
- file_handle = fopen(fname + ".cfg", "r"); If (file_handle != 0) fread(&config, sizeof(config), file_handle); fclose(file_handle); End
- file_handle = fopen(fname + ".map", "r"); If (file_handle != 0) fread(&map, sizeof(map), file_handle); fclose(file_handle); End
- file_handle = fopen(fname + ".spr", "r"); If (file_handle != 0) fread(&sprites, sizeof(sprites), file_handle); fclose(file_handle); End
- if (config.map_width < 1 or config.map_width > 32767) Return(0); End
- if (config.map_height < 1 or config.map_height > 32767) Return(0); End
- If (config.tile_width < 16) Return(0); End
- If (config.tile_height < 16) Return(0); End
- If (config.sprite_width < 32) Return(0); End
- If (config.sprite_height < 32) Return(0); End
- mapsize_x = config.map_width; mapsize_y = config.map_height; tilesize_x = config.tile_width; tilesize_y = config.tile_height; spritesize_x = config.sprite_width; spritesize_y = config.sprite_height;
- If (mapsize_x / tilesize_x > MAXTILES) mapsize_x = MAXTILES * tilesize_x; End
- If (mapsize_y / tilesize_y > MAXTILES) mapsize_y = MAXTILES * tilesize_y; End
- Return (CreateMap());
- End
- Function ResetMap()
- Begin
- /* Info:
- - unload the (DIV DX) map
- - clear config datas
- - clear map datas
- - clear sprite datas
- */
- If (gfx_map) unload_map(gfx_map); End
- config.map_width = 0; config.map_height = 0; config.tile_width = 0; config.tile_height = 0; config.sprite_width = 0; config.sprite_height = 0;
- temp = 0; While (temp < MAXTILES); temp1 = 0; While (temp1 < MAXTILES); map[temp, temp1] = 0; temp1 ++; End; temp ++; End
- temp = 0; While (temp < MAXSPRITES) sprites[temp].no = -1; sprites[temp].x = 0; sprites[temp].y = 0; sprites[temp].procid = 0; temp ++; End
- End
- /*
- End of: Usefull Functions
- */
-
So, habe mir Boulder Dash DX für die Switch geholt. Die klassischen Level sind ja scheinbar wirklich alle drin. Die Steuerung ist etwas ungewöhnlich, da man (auf der Switch) mit dem linken Stick steuert (normal) und mit dem rechten Stick, je nach Richtung, gräbt. Find ich etwas blöd gemacht oder kann man das einstellen?
Die neuen DX Levels sehen grafisch nicht schlecht aus, wirken auf mich aber unübersichtlich gemacht. Die "neue" Spielfigur geht dabei irgendwie unter, da sie zu klein angezeigt wird. Habe 3 Wasserlevel gespielt und bin da durcheinander gekommen, da die Steine runterfallen trotz Wasser und man sich normal bewegt (so, als wäre kein Wasser). Vielleicht wäre tauchen besser gewesen?
Ich hätte mir insgesamt mehr in Richtung Boulder Dash vom NES gewünscht. Wußte ja anhand von Videos und Screenshots vorher, wie es aussieht. Dennoch ein schönes Spielchen für Zwischendurch. Aber damit es mich fesselt, muß da mehr gemacht werden dran.