• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.


  • Content count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About trapeze

  • Rank
  1. Quote:Original post by Kazgoroth Probably neither of those. No one can give you a sensible response to that unless you tell us what your goals are however. something i will need to work in the industry. more specifically, computer networks, communications, telecommunications and whatnot.
  2. Quote:Original post by Promit Most likely neither. What languages do you already know? hm... matlab.. please don't laugh out loud... i do know a bit C/C++.
  3. i am thinking about learning even though i know very little of them. but, i don't know which is better ? by being better it may depend on my purposes. however, i would like to hear from others. thx.
  4. HI All Thx for your kindly help. I've got one quicky questoin. How can I check the return value of fread() ?
  5. Quote:For example, if this is the command string: d:/project/program.exe -foo1.raw -foo2.raw argc would equal 3, and argv would contain the following: argv[0] = "d:/project/program.exe" argv[1] = "-foo1.raw" argv[2] = "-foo2.raw" Spaces separate the parameters for programs. It is up to the program itself to decipher the meaning of each argument, or use tokens (such as -parm and /parm) I only type like programname foo1.raw foo2.raw and it works.
  6. The code is not long. I'm posting it here. ------------------------------------------------- #include <iostream> using namespace std; int main(int argc, char *argv[]) { FILE *file; int BytesPerPixel; int Size = 256; if (argc < 3) { cout << "usage: program_name input_image.raw output_image.raw[ [BytesPerPixel = 1] [Size = 256]" << endl; return 0; } if (argc < 4) { BytesPerPixel = 1; } else { BytesPerPixel = atoi(argv[3]); if (argc >= 5) { Size = atoi(argv[4]); } } unsigned char Imagedata[Size][Size][BytesPerPixel]; if (!(file=fopen(argv[1],"rb"))) { cout << "ERROR" << argv[1] <<endl; exit(1); } fread(Imagedata, sizeof(unsigned char), Size*Size*BytesPerPixel, file); fclose(file); if (!(file=fopen(argv[2],"wb"))) { cout << "ERROR" << argv[2] << endl; exit(1); } fwrite(Imagedata, sizeof(unsigned char), Size*Size*BytesPerPixel, file); fclose(file); return 0; } ------------------------------------------------------ This code just reads pic in and writes the same pic out. The problem is about the values stored in Imagedata...
  7. [quoteThen it sounds likely that the code path where the printing is done is not reached, or that the output stream is never flushed before end of execution. Perhaps try sending a std::flush to cout would help. Otherwise, post the relevant code.[/quote] Thx. you mean adding using std::flush; at the beginning ?
  8. Quote:Original post by Shuger If you can't use debugger, you can always display picture[0][0][0] as number instead of char THX ! But nothing showed up on my screen.
  9. Quote:Original post by grekster It could be that Picture[0][0][0] is storing a value that doesnt have a char representation to show when you pass it to cout. I cant remember exactly which values do or dont display something but IIRC the values from 0 to 15 roughly wont show anything. If you have a debugger try stepping through and manually check the memory at Picture[0][0][0]. THX !! I tried to debug but failed. I googled and tried what they said to debug with Dev but I couldn't make it...
  10. part of the code, reading an image file into memory -------------------------------------------------------- unsigned char Picture[Size][Size][BytesPerPixel]; if (!(file=fopen(argv[1],"rb"))) { cout << "Cannot open picture: " << argv[1] <<endl; exit(1); } fread(Picture, sizeof(unsigned char), Size*Size*BytesPerPixel, file); fclose(file); --------------------------------------------------------- when i tryied to get the value of the 1st element in Picture, i put cout << Picture[0][0][0] << endl; after fread(.... before flose(file); , it turned out to be nothing printed on my WinXP command prompt. However, the image file was stored successfully because i got the desired image after end of execution(store pic and spit out the exact same pic). the problem is i couldn't get the values stored in Picture. any ideas ? thx. ...racking my brain....
  11. THX guys ! That worked ! I guess I was dizzy since I've been C++ing for over 9 hrs.. and is still going..
  12. #include <iostream> using namespace std; int main() { int a[2][13] ={ {90, 23, 26, 31, 50, 71, 39, 31, 61, 80, 11, 20, 41}, {50, 31, 29, 31, 50, 31, 30, 61, 34, 70, 38, 90, 41}, }; cout << *a[2][8] <<endl; return 0; } ----------- my Dev-C++ says ... invalid type argument of `unary *' if i use cout << a[2][8] <<endl; , it says 207744 why is this ? plz help~~~~ thx.
  13. Quote:Original post by Feralrath std::fill(occurrence + 0, occurrence + 10, 0); Thx ! That worked !
  14. Quote:Original post by Antheus Quote:i don't know how to plot. i can't find the funtions. x-axis is 0-9,10-19,..,90-99. y-axis is the result above. What kind of graphics, or is it text-mode only? C++ has no concept of graphics, either at language, or standard library level. So you'll need to find some way to draw or represent the histogram graphically yourself, or use some third-party library. The simplest way is probably to use cout and print some symbol in shape of histogram. Quote:also, how can i generate zero array at once for occurrence w/o typing them out ? Use a for loop or std::fill. thx ! i believe i can figure out the "for loop" method. however, i've no ideas for "std::fill". what's this ?
  15. #include<iostream> using namespace std; int main() { int i; int j; int k; int occurrence[10]={0,0,0,0,0,0,0,0,0,0}; int data[10]={6,14,82,42,46,32,97,44,27,68}; for (j=0; j<10; j++) { for (i=0; i<10; i++) { if ((data[j] >= 10*i) && (data[j] < 10*i+9)) occurrence[i]++; } } cout << "occurrence # is "; for (k=0; k<10; k++) cout << occurrence[k]<<" "; } ---------------------------------------------------------- i don't know how to plot. i can't find the funtions. x-axis is 0-9,10-19,..,90-99. y-axis is the result above. also, how can i generate zero array at once for occurrence w/o typing them out ? great thx !