SuperDisk
|
|
« Reply #20 on: November 20, 2012, 04:36:39 PM » |
|
No one gave me any enlightenment on how to cleanly fix the circular imports, so for now I'm just doing the stupid import states.minicitystate and using it rather than doing from states.minicitystate import MiniCityState and just using MiniCityState. Whatever. The project continues In the news department, I gave the credits screen its own state rather than having FallingButton, because it was just causing more harm than coolness. The image is still a button though.
|
|
|
Logged
|
|
|
|
SuperDisk
|
|
« Reply #21 on: November 22, 2012, 09:14:47 AM » |
|
Didn't work on anything much yesterday but did make a small game: https://github.com/SuperDisk/DEBATEIt's inspired by Oddball's Argue Mentor, but made in Python. This doesn't seem related to MegaCity, but it contains some tests of network code that I'm going to incorporate to MegaCity (in a much cleaner way than that, of course) But yeah. Rules are about the same thing as Oddball's, but you can set your own topic and timeout.
|
|
|
Logged
|
|
|
|
SuperDisk
|
|
« Reply #22 on: November 25, 2012, 11:12:23 AM » |
|
Added creation and deletion of saves. (Just blank files, because of no gameplay yet )
|
|
|
Logged
|
|
|
|
SuperDisk
|
|
« Reply #23 on: November 25, 2012, 07:42:02 PM » |
|
Tile tests with gameplay. A map full of tiles runs at about 50 FPS, which is below my target 60.. Probably needs more optimization. (Should I be merging this all into one post?)
|
|
|
Logged
|
|
|
|
Belimoth
|
|
« Reply #24 on: November 25, 2012, 07:45:14 PM » |
|
No, separate updates are acceptable.
|
|
|
Logged
|
|
|
|
SuperDisk
|
|
« Reply #25 on: November 26, 2012, 01:48:09 PM » |
|
Found the reason for some of my framerate woes. The collision checking function loops though all objects in the room and does pygame's colliderect method with them. I didn't know this was incredibly superslow until each object does this every frame with 1024 objects. Time for fixes. EDIT: Actually, it's not colliderect at all! It's just looping through all objects for every object is.. really slow. I have no idea how to get around this. 2EDIT: Actually, it's none of that. My entire system of optimization was just slowing the entire thing down. When I disable the optimizer, my framerate spikes up from the usual 50 to 80. What a waste of work.
|
|
« Last Edit: November 26, 2012, 02:32:03 PM by SuperDisk »
|
Logged
|
|
|
|
SuperDisk
|
|
« Reply #26 on: November 29, 2012, 05:27:33 PM » |
|
Added chip (tile) placement and editing. Works at 60 FPS and you can place and remove chips. I'd make a GIF but my host dumped me for too much RAM use.
|
|
|
Logged
|
|
|
|
SuperDisk
|
|
« Reply #27 on: December 01, 2012, 11:09:51 AM » |
|
Added a (world) Generator class that functions like so: class Generator: def __init__(self, chipboard): self.board = chipboard
def generate(self): for pos, chip in self.board: self.board.setChip(pos, Grass())
self.chipboard = ChipBoard((255, 255)) self.generator = Generator(self.chipboard) self.generator.generate()
And that would generate you a flatmap of grass. It also lets me have multiple world generators or let users make their own or something. Yay.
|
|
|
Logged
|
|
|
|
kamac
|
|
« Reply #28 on: December 01, 2012, 11:13:06 AM » |
|
Could you please add some working screens? Every picture you uploaded till now doesn't work anylonger.
|
|
|
Logged
|
|
|
|
SuperDisk
|
|
« Reply #29 on: December 01, 2012, 11:36:44 AM » |
|
The host I had dumped me, and the Gifs that my giffer makes error out on tinypic, imageshack, and some other site that I forgot the name of. I suppose I'll try to find a host.
|
|
|
Logged
|
|
|
|
kamac
|
|
« Reply #30 on: December 01, 2012, 01:44:53 PM » |
|
|
|
|
Logged
|
|
|
|
SuperDisk
|
|
« Reply #31 on: December 01, 2012, 02:06:31 PM » |
|
I cropped the image to just the relevant parts. Yay.
|
|
« Last Edit: December 01, 2012, 02:21:16 PM by SuperDisk »
|
Logged
|
|
|
|
pluckyporcupine
|
|
« Reply #32 on: December 01, 2012, 02:30:42 PM » |
|
I always use imgur.
|
|
|
Logged
|
|
|
|
SuperDisk
|
|
« Reply #33 on: December 01, 2012, 06:24:01 PM » |
|
Just read about a cool SDL hack and I thought I must try it. Had to replace Pygame's input things with my own (GetAsyncKeyState rather than Pygame's listening to window events) and it kinda works except the mouse is offsetted by a lot.
|
|
|
Logged
|
|
|
|
SuperDisk
|
|
« Reply #34 on: December 04, 2012, 02:47:54 PM » |
|
Horrible web design. I got the HWND stuff automated so now if I just run the Java app the game loads as well. And on the non WebCity department: Everyone loves animated water, right? This game is actually progressing far faster than I thought it would.
|
|
« Last Edit: December 06, 2012, 01:06:38 PM by SuperDisk »
|
Logged
|
|
|
|
makerimages
|
|
« Reply #35 on: December 06, 2012, 06:13:23 AM » |
|
need actual ingame scrrens, or a follow wont happn
|
|
|
Logged
|
Makerimages-Its in the pixel
|
|
|
SuperDisk
|
|
« Reply #36 on: December 06, 2012, 01:02:37 PM » |
|
There are some actual ingame screens, but they keep getting taken down by horrible hosts around the world. What do you mean by follow?
|
|
|
Logged
|
|
|
|
SuperDisk
|
|
« Reply #37 on: December 12, 2012, 05:42:06 PM » |
|
Now that I've got a 32x32 editable terrain, it's time to expand my horizons into infinity.. Here comes the hard part of splitting it up into chunks and making it not lagtastical.
|
|
|
Logged
|
|
|
|
SuperDisk
|
|
« Reply #38 on: January 18, 2013, 10:55:11 AM » |
|
After delaying a long time on this, I picked it back up for a bit to correct some problems. Complexity has been added, and there is a lot of cruft in the engine. Here are a few dandies. '''1/18/2013 This flag was a horrible idea, so now, it's turned off''' optimize = False #optimize = self.elementcount < 1024
''''11/26/2012 Optimizer disabled''' #Lags the game much more than it ever fixed. Sigh. #Update these rects after element updation if optimize: updatethese = [] However! Not everything is cruft. I added a new thing called the "Sub-Engine" that lets you specify a Frame, and it will load it as an element in the currently running Frame. Think Sub-Applications in MMF2.
|
|
|
Logged
|
|
|
|
SuperDisk
|
|
« Reply #39 on: February 09, 2013, 01:53:04 PM » |
|
Fixed the sub-engine so it doesn't load all the resource files each time you create one. Nextly is for ChipEngine modifications and then perhaps some gameplay! This is moving at an utterly glacial pace.
|
|
|
Logged
|
|
|
|
|