Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Simple Game C++

Name: Kellex 2013-07-17 10:07

Hello, i got a simple question, im making a C++ console game, and i got a whole function(void) for each map of the levels, and they look very similar. in the source code the functions have these names...

m1();
m2();
m3();
m4();

if you look the differences between each void you look it only changes a few times the char of each map, like char Map, char Map2 etc...

I want to make just a void for all maps, and that some other variable changes the Map each time a map is loaded......

Also i think it would work to put an int between a line like this

char Map"here should goes the int"[10][10];

that way i just change the int value in every map loading to make it work......

Thanks

Name: Kellex 2013-07-17 10:08

BTW here is the whole source code....

http://pastebin.com/u0urRRaN

Name: Anonymous 2013-07-17 10:28

BRUTEFORCE-ORIENTED PROGRAMMING

Name: Anonymous 2013-07-17 10:37

The jews are after me

Name: Anonymous 2013-07-17 20:39

Name: Anonymous 2013-07-18 0:41

>>2
simple game
1050 lines of code

I did Warcraft 2 in 1400 lines! Complete with GUI widget!

And Symta is just 1230 lines of Common Lisp.

That is amazing how people bloat simplest apps.

Name: Kellex 2013-07-18 8:56

>>5

Wooaaaa jeez you are awesome, thank you very much!!!!!


>>6
Well well, i want to see that, share the source code.....

Name: Anonymous 2013-07-18 12:12

by the way,
                // Goal
            else if (Map.data[py2][px2] == '-') {
                    // Quit game loop if out of maps
                if (Level + 1 >= sizeof(Maps) / sizeof(*Maps))
                    break;
                    // Go to next map
                SetMap(Level + 1);
            }

needs to be
                // Goal
            else if (Map.data[py2][px2] == '-') {
                    // Quit game loop if out of maps
                if (Level + 1 >= sizeof(Maps) / sizeof(*Maps))
                    break;
                    // Go to next map
                SetMap(Level + 1);
                DrawMap();
                continue;
            }

and

            // Initialize vairables
        Hp = HpStart;

needs to be


            // Initialize vairables
        Hp = HpStart;
        Keys = 0;

Name: Anonymous 2013-07-18 12:16

>>6
cryptic oneliners a shit.

well structured code better

Name: Anonymous 2013-07-18 12:24

>>6
Nikita doesn't write, ``apps,'' you imposteur!

Name: Anonymous 2013-07-18 16:55

Friends don't let friends modify private data.

Name: Kellex 2013-07-20 8:37

>>8

Thank you a lot!!!, you awesome!!!!!

Name: Anonymous 2013-07-20 10:43

I'M GOING TO GET MAD IF MODSHIT KEEPS DELETING THREADS BUT LEAVES THE "PLEASE HELP /PROG/" THREADS. FUCKING SHIT.

Name: Anonymous 2013-07-20 11:04

>>13
but... is that not why we are here? to help?

Name: Anonymous 2013-07-20 11:37

>>14
No. And who gets to define why anyone is here? This is not a free school run by volunteers who get nothing in return. That's a stupid idea and anyone with anything to contribute will leave such a stale environment.

Name: Anonymous 2013-07-20 17:07

>>13
Kike shit isn't relevant. ``PLEASE HALP'' threads are. Fuck off to /jewpol/ already.

Name: Anonymous 2013-07-20 17:18

>>16
Stay on /g/, tard.

Name: Anonymous 2013-07-20 17:19

>>17
I'd rather stay on top of your mom.

Name: Anonymous 2013-07-20 17:26

Any community that gets its laughs by pretending to be idiots will eventually be flooded by actual idiots who think they're in good company.

Name: Anonymous 2013-07-20 17:34

>>18
nigger

>>19
kike

Name: Anonymous 2013-07-20 17:59

please nikiketa, could you please explain how symta works to us dumb goyim? the code is unreadable.

Name: Anonymous 2013-07-20 18:17

>>21
Honestly, I don't know myself. When I start programming the results ends completely unrelated to the start goal. Lisp is a mental attitude rather than a programming language. It uses a certain process of the mind expressed spontaneously through keyboard. I'm concerned with retaining that process. Not to deny that LISP is a thinking people's programming language, but when I'm lisping if I ever catch myself thinking, I'm in trouble--I know something is wrong. I hate static languages. I have to change language to my own way of doing it. That's all I know. The whole thing of programming Symta is not to control it but to be swept away by it. If you're swept away by it you can't wait to do it again and the same magical moments always come. My own feelings about the direction in which LISP should go are that there should be much less stress on static exhibitionism and much more on dynamic content, on what might be termed humanity in programming and the freedom to express all that you want.

Name: Anonymous 2013-07-20 18:23

The question in this topic has been resolved. Please refrain from posting any further, or make sure to sage your posts.

Name: Anonymous 2013-07-20 18:28

>>7
Well well, i want to see that, share the source code.....
http://sym.at.ua/load/symcraft_v0_1/1-1-0-3

Name: Anonymous 2013-07-20 18:30

>>23
fuck this guy is annoying

Name: Anonymous 2013-07-20 18:35

>>22
Why common lisp and not scheme?

Name: Anonymous 2013-07-20 18:37

>>26
Because as opposed to most of /prog/, I learned Lisp from OnLisp book, and not from SICP.

see http://www.paulgraham.com/onlisp.html

Name: Anonymous 2013-07-20 20:03

>>27
on lisp is not a beginners book. how did you learn from it?

Name: Anonymous 2013-07-20 21:17

Name: Anonymous 2013-07-21 3:46

>>29
wow, Nikita is actually helping someone learn lisp. moderation seems to be bringing out the best in him.

Name: Anonymous 2013-07-21 4:46

>>30
This Modberg is a kike: first he kicked out my anti-Jew threads, now he deleted my CP thread with cute loli. I will wait till Modsky gets bored and leaves for /g/ood.

Name: Anonymous 2013-07-21 9:52

>>31
Nikita confirmed for pedophile. Not surprised.

Name: Anonymous 2013-07-22 5:33

>>27
ON NIMP

Don't change these.
Name: Email:
Entire Thread Thread List