• 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.

sliders_alpha

Members
  • Content count

    21
  • Joined

  • Last visited

Community Reputation

107 Neutral

About sliders_alpha

  • Rank
    Member

Personal Information

  • Location
    France
  1. Hi, Fisrt of all this is not just about comparing the 2 tech but also about what I'm going to do. My purpose is to make a minecraft Clone, each chunk is like mojang cut into 16 display list, when a player remove or add a block then this display list is being re-rendered. My question is, is it more advantageous to use display list rather than VBO? From my understanding Displaylist uses CPU power and VBO uses GPU power. And nowaday we tend to use portable laptop with high end CPU and a lot of ram but with a very low end GPU. what do you think? Thanks.
  2. [quote]why not have that as part of your current sector's information?[/quote] because their is 5626 sector in RAM at all time, this would only add 5.626MB but I'm trying to reduce memory usage, every pieces count. from what I read using statics the way I do it is "ok" since they are all defined as final, and thus never changing . [code] public class Global { //Sector size public static final int CHUNK_Z = 16; public static final int CHUNK_HEIGHT = 256; public static final int CHUNK_X = 16; //nb de display list par chunk public static final int DL_Y = 16; //windows parameter public static final int WINDOW_HEIGHT = 480; public static final int WINDOW_WIDTH = 640; public static final int WINDOW_BITPERPIX = 32; //paths public static final String ROOT_DIRECTORIE = "C:\\MEngCl\\"; public static final String TEXTURES_PATH = ROOT_DIRECTORIE+"Textures\\"; public static final String WORLD_PATH = ROOT_DIRECTORIE+"World\\"; //display area public static final short DISPLAY_AREA = 30; } [/code] thanks for your awnsers ;)
  3. Hi, So i'm a student in information systems, or to put it more simply java based website for corporation. Recently I've taken quite some interest in making a minecraft clone, because I like learning new stuff and I want a better minecraft. I'm working on the graphical engine and I noticed that using a static class containing[list] [*]view distance [*]Sector size [*]installation paths [*]an array of Texture (slick object) [/list] Could be really usefull, instead of having to pass down and down those data. Now, what do you think? is this a good idea to do this? in my line of work static attributes or classes are considered as evil. It messes up with our unit testing and mocking. As my teacher say, if you want to do static classes go back to procedural languages, you are doing objects now. But this is not a information system, so does these rules still apply? thanks.
  4. damn, looks like I'll need to do as mojang did and implement a "region" system. anyway serializable is not bringing anything usefull to the table, good to know.
  5. mmh, I'm not getting result as good as you Antheus with you code (slightly modified for 3D arrays) : [code] public void storeToDisk(String path) throws IOException{ long time = System.currentTimeMillis(); final RandomAccessFile fs = new RandomAccessFile(path +x+","+z+".txt", "rw"); final ByteBuffer bb = fs.getChannel().map(MapMode.READ_WRITE, 0, (Global.CHUNK_HEIGHT*Global.CHUNK_X*Global.CHUNK_Z)* 2); for(short yy=0; yy<Global.CHUNK_HEIGHT; yy++){ for(short zz=0; zz<Global.CHUNK_Z; zz++){ for(short xx=0; xx<Global.CHUNK_X; xx++){ bb.putShort(sect[xx][yy][zz]); } } } fs.getChannel().force(true); fs.getFD().sync(); fs.close(); System.out.println("write time : " + (System.currentTimeMillis() - time)+"ms"); Global.totalTime += (System.currentTimeMillis() - time); } [/code] [quote] //with synch 19ms, 16ms, 14ms, 57ms, 77ms, 21ms, 56ms, 15ms, 9ms, 74ms, 10ms, 9ms, 74ms, 18ms, 22ms, 66ms, 31ms, 50ms, 18ms, 49ms, 72ms, 18ms, 16ms, 68ms, 17ms, 23ms, 66ms, 17ms, 23ms, 72ms, 17ms, 17ms, 75ms, 17ms, 17ms, 66ms, total write time : 1308ms //without synch 24ms, 32ms, 15ms, 57ms, 16ms, 22ms, 56ms, 28ms, 14ms, 75ms, 17ms, 17ms, 48ms, 26ms, 15ms, 66ms, 14ms, 60ms, 15ms, 17ms, 62ms, 28ms, 17ms, 58ms, 16ms, 14ms, 52ms, 29ms, 17ms, 78ms, 14ms, 17ms, 61ms, 15ms, 25ms, 68ms, total write time : 1208ms [/quote] Also, yesterday I changed my chunk2text methods, adding some bufferedWriter, it basically takes the same time [code] public void storeToDisk(String path) throws IOException{ long time = System.currentTimeMillis(); File file = new File(path+x+","+z+".txt"); FileWriter fw = new FileWriter(file); BufferedWriter out = new BufferedWriter(fw); for(short yy=0; yy<Global.CHUNK_HEIGHT; yy++){ for(short zz=0; zz<Global.CHUNK_Z; zz++){ String s = ""; for(short xx=0; xx<Global.CHUNK_X; xx++){ s += String.valueOf(sect[xx][yy][zz]); s += ","; } out.write(s); } } out.close(); System.out.println("write time : " + (System.currentTimeMillis() - time)); Global.totalTime += (System.currentTimeMillis() - time); } [/code] [quote] 38ms, 33ms, 29ms, 30ms, 27ms, 28ms, 33ms, 31ms, 28ms, 28ms, 29ms, 33ms, 28ms, 28ms, 31ms, 28ms, 29ms, 32ms, 28ms, 30ms, 31ms, 30ms, 33ms, 30ms, 30ms, 33ms, 29ms, 29ms, 30ms, 28ms, 34ms, 30ms, 32ms, 58ms, 33ms, 31ms, total write time : 1124ms [/quote]
  6. aaah, I'm not using byte, but short, wich double the size. futhermore, i'm inserting a "," betwen each value, getting even a bigger file. [quote] [color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=3][left][background=rgb(250, 251, 252)]It is possible that the OS does the file open asynchronosly, so the actual open call returns immediatly and the cost of it gets tacked onto your writing/reading if it is done immediatly afterwards.[/background][/left][/size][/font][/color] [color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=3][left][background=rgb(250, 251, 252)]Try doubling the amount of data you write and see how much the time increases.[/background][/left][/size][/font][/color] [color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=3][left][background=rgb(250, 251, 252)][/quote][/background][/left][/size][/font][/color] [color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=3][left][background=rgb(250, 251, 252)]Amazing, I would never have though about that, your theory is indeed correct,[/background][/left][/size][/font][/color] [color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=3][left][background=rgb(250, 251, 252)]when doubling the amount of data to write the write time is only increased by 1-2ms.[/background][/left][/size][/font][/color] [b][color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=3][left][background=rgb(250, 251, 252)]Therefore the file access time must be about 62ms.[/background][/left][/size][/font][/color][/b] [color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=3][left][background=rgb(250, 251, 252)]The reading time is far longer because in addition to opening the file I'm also decoding it, getting each value betwen ",".[/background][/left][/size][/font][/color] [left][color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=1]...[/size][/font][/color][/left] [left][color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=1]trying your code Antheus =D[/size][/font][/color][/left]
  7. the thing is, the world is generated as the player explore (minecraft clone). if the player only goes toward the east this one file containing everything will be filled with 75% of 0. Someone else told me that actually using a database such as MySQL could be usefull. 1 column for the coordinates (primary key), 1 column for the data. Since I only open a session at the beginning of the game I won't lose time like when I need to acces 900 separated text files. In addition to that I can even uses indexes for equality seach (on the coordinates) to speed those database access. .... calculating the coordinate is not time consuming since the player position on the sector grid is always being tracked. a sector contains more information but I'm only storing the data, since the coordinate are stored inside, storing the file with it's coordinate name is also quick. [code] public class Sector{ byte[][][] data; int x,y; int DL; //some methods } [/code] I also noticed something weird today, using [b]System.currentTimeMillis()[/b] [b]opening a file = 0ms[/b] writing = 65ms [b]closing = 0 ms[/b] same thing for reading, shouldn't opening the file be time consuming?
  8. Hi, for my game I have to store game sectors, each sector is an array of 16x16x256 byte. What I did is make a method to write sectors into a single string inside a file named after it's coordinate, and one to read them and rebuilt my object in RAM. But my write time is about 65ms and read time 135ms wich is quite long since a scene is composed of 900 sectors.. Then someone told me to use serializable objects instead, after reading some documentation about it I don't see how to use this. If I serialize object A,B,C and D then I can only get them back in the same order, but I need to acces files according to their coordinate, not their storage order. is it me or the serializable class is not what I'm looking for? thanks
  9. [quote] [left][background=rgb(250, 251, 252)]Minecraft isn't infinite *grrrr* [/background][/left] [left][color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=3][background=rgb(250, 251, 252)][img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img][/quote][/background][/size][/font][/color][/left] [left][color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=3][background=rgb(250, 251, 252)]a VERY BIG procedural world then [img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img] [/background][/size][/font][/color][/left] thanks for the pic noizec, it really helped =D however erasing according to the last access time sounds quite tricky to implement So I made a simplier version (used your graph, hope you don't mind) : [url="http://www.youtube.com/watch?v=OLnb8NRqAuM"]http://www.youtube.com/watch?v=OLnb8NRqAuM[/url]
  10. It's true that by expanding the cache size from radius+1 to radius*radius would allow me to load chunks in a unique thread. however are you sure that it changes anything for when a player is going back and forth? look at this, if the player is going back and forth, the red lines keeps getting loaded/unloaded. but not having to be in a hurry to load chunk is quite nice^^
  11. well I'm not choosing wich chunk to cache, I'm caching EVERY chunk around the player. [img]http://public.gamedev.net/uploads/monthly_04_2012/post-197666-0-96149300-1335814160_thumb.png[/img] for now I'm only working with 49 Chunk but storing 600-900 chunk on RAM is more than acceptable. it would take around 400Mb and today's computer have at least 4GB of ram, why shouldn't I use it?
  12. you were both right, making an array of reference to chunk does not allocate anything it just creates reference. then I have to instanciate a class and link it to this reference. [quote] [left][background=rgb(250, 251, 252)]I see no problem in line of theory. Keep in mind however that wrapping the world to reset it around the origin might be more problematic than expected. I can tell for sure Bullet (a physics API I'm using) wouldn't allow you to do so. If you're going to write your own physics, keep in mind the periodic "re-centering" operation will likely have to be supported somehow.[/background][/left] [/quote] well I'm planning on coding everything, i'm doing this for fun^^ what kind of other type of infinite world algorythm is there out there? I searched the first 10 pages of google and each camera implementation is the same. the camera never moves, the world does. therefore I don't see any other way to do it. [quote] [left][color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=3][background=rgb(250, 251, 252)]It is possible to do something like what you have drawn in the first two images, let the camera move forward for a few chunks (say 1024*16 units) and keep streaming (letting the model "grow", without changing camera position). Then, wrap to the origin only when a certain rationale is met, such as distance from the origin > 1024*16. This is fairly easy: just subtract a constant such as 1024*16 along a certain axis.[/background][/size][/font][/color][/left] [left][color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=3][background=rgb(250, 251, 252)][/quote][/background][/size][/font][/color][/left] [left][color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=3][background=rgb(250, 251, 252)]why? basically you are asking me to do exactly the same thing but to increase the "reset" distance from 1 chunk to 1024 chunk.[/background][/size][/font][/color][/left] [left][color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=3][background=rgb(250, 251, 252)]what will it changes?[/background][/size][/font][/color][/left]
  13. yeah but I'm using java, Since i'm declaring an array of chunk. I think that even If I put nothing inside a cell the memory for it is still allocated. I just thought about something, it's all ok if the player start a 0,0. but how to move it back to where he was last time? my current thought is to store the chunk name and the coordinate on the chunk.
  14. Hi, I want to make a minecraft clone but I don't know if I'm going in the right way or not. having never took any game programming courses I might be re-invented the wheel^^ first thing first, my world is stored in a 2D sectors array. I give the illusion of movement by drawing the world backward when the player wants to go forward. [img]http://public.gamedev.net/uploads/monthly_04_2012/post-197666-0-64050400-1335789331_thumb.png[/img] and here is my Idea for infinite world generation. [img]http://public.gamedev.net/uploads/monthly_04_2012/post-197666-0-64208800-1335789443_thumb.png[/img] (in reality I have a bigger array called cache which contains the world sectors and the sourrounding ones, this cache object is managing hard disk access on it's own to always give to the world quick access to new sectors) what do you think? thanks
  15. thanks for your awnser, but I still don't get it =p I have to make some 1.0f translation, because once the first layer of the chunk is displayed I have to draw the next one, wich is 1.0f above.