一场超长辩论赛,pycharm编程序好,还是VSCode编程序好?

那就先把panda3d用pip卸了,再重装

啊啊啊啊,我不会用pip但我会用pycharm

那就用pycharm把它卸了:)

果真是超长辩论
image

dui

打卡贴都1000的,这不多

好了,重新打包

我正在用GPT改成c++

全都在水评论是吧

既然都在水,那么我也水一波

#include "pandaFramework.h"
#include "pandaSystem.h"
#include "windowFramework.h"
#include "camera.h"
#include "nodePath.h"
#include "genericAsyncTask.h"
#include "collisionTraverser.h"
#include "collisionNode.h"
#include "collisionBox.h"
#include "collisionRay.h"
#include "collisionHandlerQueue.h"

PandaFramework framework;
WindowFramework *window;
NodePath cameraNP;

bool keyMap[256] = {false}; // 按键状态映射
float moveSpeed = 10.0f;

// 键盘按下事件
void on_key_down(const Event *event, void *data) {
    string key = event->get_name();
    keyMap[key[0]] = true;
}

// 键盘松开事件
void on_key_up(const Event *event, void *data) {
    string key = event->get_name();
    keyMap[key[0]] = false;
}

// 更新相机位置
AsyncTask::DoneStatus update_camera(GenericAsyncTask *task, void *data) {
    float dt = ClockObject::get_global_clock()->get_dt();

    if (keyMap['w']) cameraNP.set_pos(cameraNP, 0, moveSpeed * dt, 0);
    if (keyMap['s']) cameraNP.set_pos(cameraNP, 0, -moveSpeed * dt, 0);
    if (keyMap['a']) cameraNP.set_pos(cameraNP, -moveSpeed * dt, 0, 0);
    if (keyMap['d']) cameraNP.set_pos(cameraNP, moveSpeed * dt, 0, 0);
    if (keyMap[' ']) cameraNP.set_z(cameraNP.get_z() + moveSpeed * dt);
    if (keyMap['x']) cameraNP.set_z(cameraNP.get_z() - moveSpeed * dt);

    return AsyncTask::DS_cont;
}

int main(int argc, char *argv[]) {
    framework.open_framework(argc, argv);
    framework.set_window_title("Minecraft Clone in C++");

    window = framework.open_window();
    if (!window) return 1;

    cameraNP = window->get_camera_group();
    cameraNP.set_pos(0, 0, 7);

    // 绑定按键事件
    framework.define_key("w", "Move Forward", on_key_down, nullptr);
    framework.define_key("w-up", "Stop Moving Forward", on_key_up, nullptr);
    framework.define_key("s", "Move Backward", on_key_down, nullptr);
    framework.define_key("s-up", "Stop Moving Backward", on_key_up, nullptr);
    framework.define_key("a", "Move Left", on_key_down, nullptr);
    framework.define_key("a-up", "Stop Moving Left", on_key_up, nullptr);
    framework.define_key("d", "Move Right", on_key_down, nullptr);
    framework.define_key("d-up", "Stop Moving Right", on_key_up, nullptr);
    framework.define_key("space", "Move Up", on_key_down, nullptr);
    framework.define_key("space-up", "Stop Moving Up", on_key_up, nullptr);
    framework.define_key("x", "Move Down", on_key_down, nullptr);
    framework.define_key("x-up", "Stop Moving Down", on_key_up, nullptr);

    // 添加更新任务
    AsyncTaskManager::get_global_ptr()->add(new GenericAsyncTask("update_camera", update_camera, nullptr));

    // 运行 Panda3D 主循环
    framework.main_loop();
    framework.close_framework();
    return 0;
}

这些貌似要自己写
可是我不会QAQ

yes我再让他填

。。。。。。。。。。。gpt不行的,我上次用他改,给我改成反的了

用deepseek

你还得让他手写egg文件

我记得刚毅版是用c++改的,网上搜搜

又得输一大堆cd

#include

#include <conio.h>

#include

#include

#include

#include <windows.h>

#include <time.h>

#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)

using namespace std;

int fallspeed;

int jumpspeed = -3;

int gravity = 1;

int y = 400, x = 500;

int restartposy, restartposx, face, health = 1000, lasthealth = 1000, breath = 100, hungry = 1000, dienum;

bool attack, defense, hurt, mode;

struct TNT {

int y;

int x;

int time;

bool issave;

};

struct BLOCK {

int color;

string ch;

string type;

};

struct MOB {

int fallspeed;

int health;

bool hurt;

int y;

int x;

int attack;

string shap;

bool isenemy;

int color;

string name;

};

struct ARROW {

string shap;

double y;

double x;

double fallspeed;

double plusx;

};

TNT tnt[20];

string die;

ARROW arrow[100];

MOB mobs[50] = {

{0, 1000, 0, 0, 0, 100, “危”, true, 7, “危”},

{0, 10, 0, 0, 0, 10, " ", true, 7, " "},

{0, 1000, 0, 0, 0, 100, “MM”, false, 7, “MM”},

{0, 100000, 0, 90, 70,-100,“AC”, true ,7,“Accept”},

{0 ,10000 ,0 ,90 ,70 ,500 ,“BO” ,true ,7 ,“BOSS”},

{0 ,100000 ,0 ,90 ,70 ,-1000 ,“AK” ,true ,7 ,“AK”}

};

MOB mob[100] = {

{0 ,1000 ,0 ,92 ,4 ,100 ,“WA” ,true ,7 ,“Wrong Anwser”},

{0 ,1000 ,0 ,92 ,4 ,100 ,“TL” ,true ,7 ,“Time Limit Error”},

{0 ,2000 ,0 ,92 ,4 ,300 ,“CE” ,true ,7 ,“Compile Error”},

};

BLOCK block[32] = {

{6,“██”,“block”}, //土块

{8,“██”,“block”}, //石头

{2,“██”,“block”}, //草方块

{15,“██”,“block”}, //雪块

{4,“██”,“block”}, //岩浆块

{14,“▓▓”,“fallblock”}, //沙块

{8,“II”,“fallblock”}, //铁砧

{9,“██”,“water”}, //水

};

int board[1005][1005];

int setboard[1005][1005];

int bag[100];

int clear_buffer() {

while (kbhit()) {

if (getch() != EOF);

for (int i = 1; i <= 256; i++) {

if (GetAsyncKeyState(i));

}

}

return 0;

}

void color(int a) {

SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), a);

}

int init() {

for (int j = 0; j < 100; j++) {

bag[j] = 0;

}

for (int i = 0; i < 1000; i++) {

for (int j = 0; j < 1000; j++) {

board[i][j] = 0;

}

}

double lasty = rand() % 101 + 400;

for (int i = 5; i < 1000; i += 5) {

double y = rand() % 21 - 10 + lasty;

y = min(450.0, y);

double high = lasty;

int dirt = rand() % 5 + 2;

for (int j = i - 5; j < i; j++) {

high += (y - lasty) / 5;

for (int k = 999; k >= (int)high; k–) {

if (k == (int)high) {

setboard[k][j] = 3;

if (high <= 350) {

setboard[k][j] = 4;

}

} else if (k - dirt <= (int)high) {

setboard[k][j] = 1;

} else {

setboard[k][j] = 2;

}

}

}

lasty = y;

}

return 0;

}

int main() {

srand((int)time(0));

for (int i = 0; i < 20; i++) {

tnt[i].time = -2;

}

init();

while (1) {

system(“cls”);

if (!mode) {

move();

}

check();

bomb();

Arrowmove();

mobmove();

print();

Sleep(30);

}

return 0;

}

#include <iostream>
#include <conio.h>
#include <string>
#include <map>
#include <cmath>
#include <windows.h>
#include <time.h>

#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)

using namespace std;

int fallspeed;
int jumpspeed = -3;
int gravity = 1;
int y = 400, x = 500;
int restartposy, restartposx, face, health = 1000, lasthealth = 1000, breath = 100, hungry = 1000, dienum;
bool attack, defense, hurt, mode;

struct TNT {
int y;
int x;
int time;
bool issave;
};

struct BLOCK {
int color;
string ch;
string type;
};

struct MOB {
int fallspeed;
int health;
bool hurt;
int y;
int x;
int attack;
string shap;
bool isenemy;
int color;
string name;
};

struct ARROW {
string shap;
double y;
double x;
double fallspeed;
double plusx;
};

TNT tnt[20];
string die;
ARROW arrow[100];
MOB mobs[50] = {
{0, 1000, 0, 0, 0, 100, "危", true, 7, "危"},
{0, 10, 0, 0, 0, 10, " ", true, 7, " "},
{0, 1000, 0, 0, 0, 100, "MM", false, 7, "MM"},
{0, 100000, 0, 90, 70,-100,"AC", true ,7,"Accept"},
{0 ,10000 ,0 ,90 ,70 ,500 ,"BO" ,true ,7 ,"BOSS"},
{0 ,100000 ,0 ,90 ,70 ,-1000 ,"AK" ,true ,7 ,"AK"}
};

MOB mob[100] = {
{0 ,1000 ,0 ,92 ,4 ,100 ,"WA" ,true ,7 ,"Wrong Anwser"},
{0 ,1000 ,0 ,92 ,4 ,100 ,"TL" ,true ,7 ,"Time Limit Error"},
{0 ,2000 ,0 ,92 ,4 ,300 ,"CE" ,true ,7 ,"Compile Error"},
};

BLOCK block[32] = {
{6,"██","block"}, //土块
{8,"██","block"}, //石头
{2,"██","block"}, //草方块
{15,"██","block"}, //雪块
{4,"██","block"}, //岩浆块
{14,"▓▓","fallblock"}, //沙块
{8,"II","fallblock"}, //铁砧
{9,"██","water"}, //水
};

int board[1005][1005];
int setboard[1005][1005];
int bag[100];

int clear_buffer() {
while (kbhit()) {
if (getch() != EOF);
for (int i = 1; i <= 256; i++) {
if (GetAsyncKeyState(i));
}
}
return 0;
}

void color(int a) {
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), a);
}

int init() {
for (int j = 0; j < 100; j++) {
bag[j] = 0;
}
for (int i = 0; i < 1000; i++) {
for (int j = 0; j < 1000; j++) {
board[i][j] = 0;
}
}
double lasty = rand() % 101 + 400;
for (int i = 5; i < 1000; i += 5) {
double y = rand() % 21 - 10 + lasty;
y = min(450.0, y);
double high = lasty;
int dirt = rand() % 5 + 2;
for (int j = i - 5; j < i; j++) {
high += (y - lasty) / 5;
for (int k = 999; k >= (int)high; k--) {
if (k == (int)high) {
setboard[k][j] = 3;
if (high <= 350) {
setboard[k][j] = 4;
}
} else if (k - dirt <= (int)high) {
setboard[k][j] = 1;
} else {
setboard[k][j] = 2;
}
}
}
lasty = y;
}
return 0;
}

int main() {
srand((int)time(0));
for (int i = 0; i < 20; i++) {
tnt[i].time = -2;
}
init();
while (1) {
system("cls");
if (!mode) {
move();
}
check();
bomb();
Arrowmove();
mobmove();
print();
Sleep(30);
}
return 0;
}

估计还差亿点点把