• What are you working on? V3
    2,001 replies, posted
[IMG]http://i163.photobucket.com/albums/t315/novemberdobby/test-1.gif[/IMG] those planets were orbiting each other :v:
[QUOTE=NovembrDobby;17321155][IMG]http://i163.photobucket.com/albums/t315/novemberdobby/test-1.gif[/IMG] those planets were orbiting each other :v:[/QUOTE] That's brilliant.
[QUOTE=r4nk_;17321072]If you're going to keep it as a console screen then you might aswell make the text doc contain the same char as the one that represents the wall in the real game. Then you're map files will look exactly like they do in game :( )[/QUOTE] That could get confusing if symbols start doubling up.
[QUOTE=NovembrDobby;17321155][IMG]http://i163.photobucket.com/albums/t315/novemberdobby/test-1.gif[/IMG] those planets were orbiting each other :v:[/QUOTE] That's really nice
does anyone have a solution to random numbers generating the SAME number? i'm making lists of a set of random waypoints: [code] protected override void Initialize() { ...... npc_test.Reset( new Vector2((float)screenWidth / 4, (float)screenHeight / 4)); npc_test.RandomizeWaypoint(); npc_test2.Reset( new Vector2((float)screenWidth / 4, (float)screenHeight / 4)); npc_test2.RandomizeWaypoint(); npc_test3.Reset( new Vector2((float)screenWidth / 2, (float)screenHeight / 2)); npc_test3.RandomizeWaypoint(); [/code] but it seems to be generating too fast. i use this to make a random waypoint: [code] // Method to generate a random position on the screen. private Vector2 GetRandomPosition() { Random rnd = new Random(); rnd.NextDouble(); return new Vector2((float)MathHelper.Lerp(10, 630, (float)rnd.NextDouble()), (float)MathHelper.Lerp(10, 470, (float)rnd.NextDouble())); } [/code] i tried to seed the random number with the current time multiplied by the object's hash value but that put all the waypoints at the same spot.
[QUOTE=iPope;17320314]The first steps in to the world of rougelikes: [img]http://filesmelt.com/downloader/rougelike.png[/img] Made by MetallicLion: [img]http://filesmelt.com/downloader/rougelike1.png[/img] Apparently it is a spaceship, looks more like an entrance hall. Not shown is swords, which are in the map format but not programmed.[/QUOTE] A few tips: Use a dictionary when your maps are loaded into memory. Everyone who is familiar with c++ would know them as a map. You have a unique key (in this case a coordinate), and can have any number of values associated with it, so you could have a coordinate contain both an enemy AND an item (something that, AFAIK, is not done in other roguelikes) If you are developing on windows you can access the win32 functions (set foreground and stuff) by using import ctypes if you're doing this for any other platform just import curses. If you're doing both but want it all in one script, and easy way to do it is import sys if sys.platform =='win32': import ctypes else: import curses Try to use unicode, so that you can use special characters, as ASCII can't really contain everything ever. Also, in case you did not know yet, Python Documentation is your best friend. And if all else fails, say "fuck it", use Pygame to loadup a font, and render letters as bitmaps instead, because curses can be a huge bitch. Oh one last thing, for the love of christ upgrade to python 2.6.2 at the least.
Command prompt version of yahtzee... I like it :P [editline]04:33AM[/editline] [QUOTE=Foda;17331672]does anyone have a solution to random numbers generating the SAME number? i'm making lists of a set of random waypoints: [code] protected override void Initialize() { ...... npc_test.Reset( new Vector2((float)screenWidth / 4, (float)screenHeight / 4)); npc_test.RandomizeWaypoint(); npc_test2.Reset( new Vector2((float)screenWidth / 4, (float)screenHeight / 4)); npc_test2.RandomizeWaypoint(); npc_test3.Reset( new Vector2((float)screenWidth / 2, (float)screenHeight / 2)); npc_test3.RandomizeWaypoint(); [/code] but it seems to be generating too fast. i use this to make a random waypoint: [code] // Method to generate a random position on the screen. private Vector2 GetRandomPosition() { Random rnd = new Random(); rnd.NextDouble(); return new Vector2((float)MathHelper.Lerp(10, 630, (float)rnd.NextDouble()), (float)MathHelper.Lerp(10, 470, (float)rnd.NextDouble())); } [/code] i tried to seed the random number with the current time multiplied by the object's hash value but that put all the waypoints at the same spot.[/QUOTE] use the time as a seed :P
[QUOTE=Foda;17331672]does anyone have a solution to random numbers generating the SAME number? i'm making lists of a set of random waypoints: [code] protected override void Initialize() { ...... npc_test.Reset( new Vector2((float)screenWidth / 4, (float)screenHeight / 4)); npc_test.RandomizeWaypoint(); npc_test2.Reset( new Vector2((float)screenWidth / 4, (float)screenHeight / 4)); npc_test2.RandomizeWaypoint(); npc_test3.Reset( new Vector2((float)screenWidth / 2, (float)screenHeight / 2)); npc_test3.RandomizeWaypoint(); [/code] but it seems to be generating too fast. i use this to make a random waypoint: [code] // Method to generate a random position on the screen. private Vector2 GetRandomPosition() { Random rnd = new Random(); rnd.NextDouble(); return new Vector2((float)MathHelper.Lerp(10, 630, (float)rnd.NextDouble()), (float)MathHelper.Lerp(10, 470, (float)rnd.NextDouble())); } [/code] i tried to seed the random number with the current time multiplied by the object's hash value but that put all the waypoints at the same spot.[/QUOTE] seed properly
[QUOTE=Foda;17331672]does anyone have a solution to random numbers generating the SAME number? i'm making lists of a set of random waypoints: [code] protected override void Initialize() { ...... npc_test.Reset( new Vector2((float)screenWidth / 4, (float)screenHeight / 4)); npc_test.RandomizeWaypoint(); npc_test2.Reset( new Vector2((float)screenWidth / 4, (float)screenHeight / 4)); npc_test2.RandomizeWaypoint(); npc_test3.Reset( new Vector2((float)screenWidth / 2, (float)screenHeight / 2)); npc_test3.RandomizeWaypoint(); [/code] but it seems to be generating too fast. i use this to make a random waypoint: [code] // Method to generate a random position on the screen. private Vector2 GetRandomPosition() { Random rnd = new Random(); rnd.NextDouble(); return new Vector2((float)MathHelper.Lerp(10, 630, (float)rnd.NextDouble()), (float)MathHelper.Lerp(10, 470, (float)rnd.NextDouble())); } [/code] i tried to seed the random number with the current time multiplied by the object's hash value but that put all the waypoints at the same spot.[/QUOTE] You only seed once at the start of your program.
The problem is due to the seed being the same for each random. That constructor for 'Random' sets the seed to the current time. So you can either make your own random class to handle seeding better or just create 1 'Random' object.
Been working on optimising my lighting system now it's pretty much finished. I've switched from a linked list of light objects to an array of them which has taken a massive load off the garbage collector, and optimised some other bits, but I still don't think it's fast enough. It seems most of the frame rate killing seems to be this part, which I imagine is because there's simply so many unless there's a faster way of doing: [code] glColor3f(0, 0, 0) glBegin(GL_POLYGON) glVertex2f(point1.x, point1.y) glVertex2f(point2.x, point2.y) glVertex2f(point4.x, point4.y) glVertex2f(point3.x, point3.y) glEnd() [/code] I suppose I'll have the shadows optional unless I can speed them up significantly, here's the frame rate difference: [img]http://img.meteornet.net/uploads/pj492qf0/rate.jpg[/img] We've also done the backend for the PVS-type system, which is going to work via doors, and I also did a little chat area system using that.
Make the walls black.
[QUOTE=ZomBuster;17336711]Make the walls black.[/QUOTE] But then how can you see the walls? As nice as it'd be to not have to expend more resources making them exempt from shadowing, it looks god awful.
[QUOTE=Chandler;17331872]A few tips: Use a dictionary when your maps are loaded into memory. Everyone who is familiar with c++ would know them as a map. You have a unique key (in this case a coordinate), and can have any number of values associated with it, so you could have a coordinate contain both an enemy AND an item (something that, AFAIK, is not done in other roguelikes) If you are developing on windows you can access the win32 functions (set foreground and stuff) by using import ctypes if you're doing this for any other platform just import curses. If you're doing both but want it all in one script, and easy way to do it is import sys if sys.platform =='win32': import ctypes else: import curses Try to use unicode, so that you can use special characters, as ASCII can't really contain everything ever. Also, in case you did not know yet, Python Documentation is your best friend. And if all else fails, say "fuck it", use Pygame to loadup a font, and render letters as bitmaps instead, because curses can be a huge bitch. Oh one last thing, for the love of christ upgrade to python 2.6.2 at the least.[/QUOTE] I have discovered curses and similar are huge bitches and I can't be bothered with them so I'm guna use pygame. Changing the strings to unicode is also on my to-do. And changing it to using dictionary's is way overdue. Also I already know everything you have already said, I have been using python for quite some time. And I think I'll stick to 2.5.2 thanks :D
[QUOTE=Catdaemon;17336753]But then how can you see the walls? As nice as it'd be to not have to expend more resources making them exempt from shadowing, it looks god awful.[/QUOTE] You can still see them, they are just black. Of course when there is no light you wouldn't see them. If you want them visible at all times just make them a dark color, but not entirely black.
-A user/upload system for a new Music site me and my friend are making. -Writing a tutorial on basic PHP stuff -Learning PBASIC and trying to find out how to actually use microcontrollers
Shadows on looks so much better :(.
Keep shadows, 90fps is fine :P + Planning a PHP framework thing.
Switched over to a dictionary system for my rougelike, in theory should be better. Apart from now it crashes my computer when I run it. [b]Edit:[/b] Got it working, now to switch everything over to pygame :( Oh, and I got only rendering the top object on that tile, and optimized the whole map rendering section a ton. Not in speed but in adding a new object now takes a second(un coded objects).
Do we have a chatroom for the programming forum yet? on IRC? Gamesurge? [editline]07:34PM[/editline] Looks like we do, #fpcoders
fp programmers steam chat
Right now I'm finishing up my Tokenizer for Jazz, I wanted to redo the parser completely seeing as the syntax made no sense unless you've worked with really low-level languages such as assembly.
[QUOTE=r4nk_;17339547]fp programmers steam chat[/QUOTE] Ew, steam chat.
[QUOTE=Dr Magnusson;17339583]Right now I'm finishing up my Tokenizer for Jazz, I wanted to redo the parser completely seeing as the syntax made no sense unless you've worked with really low-level languages such as assembly.[/QUOTE] This project sounds interesting. Maybe I'll look into one time when I haven't got so many projects to program.
[QUOTE=r4nk_;17339547]fp programmers steam chat[/QUOTE] Could someone send me an invite to the group? Please? :smile:
[QUOTE=Robber;17339719]Could someone send me an invite to the group? Please? :smile:[/QUOTE] ditto
[QUOTE=garry;17339488]Do we have a chatroom for the programming forum yet? on IRC? Gamesurge? [editline]07:34PM[/editline] Looks like we do, #fpcoders[/QUOTE] I'm in there.
i would invite u guys but im on my side in my bed watching arrested development and typing with 1 hand + on screen keyboard.
the irc channel is full of trolls.
Uh, no?
Sorry, you need to Log In to post a reply to this thread.